Welcome to Octopart. Octopart is a search engine for electronic parts.  more...
api
Search API FAQ
The search API opens up Octopart's search functionality to developers interested in querying the database for parts. The documentation and sample code below are provided to help you get started; please e-mail us with questions, bug reports or suggestions.
URL

To access the API directly, send an HTTP GET request to the following URL:

http://octopart.com/api/search

The following example illustrates an API call to search for 'capacitors'.

http://octopart.com/api/search?keywords=capacitors

The URL parameters are described in greater detail below.

URL Parameters
Parameter Name Format Description
keywords string Specifies keywords to search for.
numresults integer Specifies number of results to return. Defaults to 10.
pagenum integer Specifies page number of results to return. Defaults to 1.
Response Format

The search API returns a JSON object filled with a response to the query. The object contains a list of parts under the "parts" key, and an integer detailing the total number of results under the "total" key. An example is shown below; the format of the "Parts" list is described in detail below the example.

{"total": 1, 

"parts": [

{"mpn": "SN74LS74AN", 

"manufacturer": "Texas Instruments",

"keywords": "Flip Flop Logic IC; Logic Type:Flip-Flop; Logic Family:74LS; Logic Base Number:7474; Supply Voltage Nom, Vcc:5V; Package\/Case:14-DIP; Leaded Process Compatible:Yes; Number of Circuits:2; Series:74LS RoHS Compliant: Yes", 

"infopage_url": "http:\/\/octopart.com\/info\/Texas+Instruments\/SN74LS74AN", 

"attributes": [

{"type": "text", 

"values": ["Compliant"], 

"name": "RoHS"},

"suppliers": [

{"sku": "SN74LS74AN", 

"quantity_in_stock": 100, 

"supplier_url": "http:\/\/octopart.com\/rtrack?vid=11&url=http%3A%2F%2Fwww.gerberelec.com%2Fbrowse%2F%3FPartNo%3DSN74LS74AN&clicktype=vendorpart_clickthrough&origin_page=api&vendor_number=SN74LS74AN&sid=3039&vpid=2175578&link_type=hyperlink", 

"current": 1, 

"pricing": [

{"currency": "USD", 

"price": 0.2265, 

"price_break": 1}], 

"name": "Gerber"}, 

"datasheet": {

"url": "http:\/\/alpha.octopart.com\/Texas_Instruments__SN74LS74AN.pdf"}, 

"image": {

"orig_url": "http:\/\/delta.octopart.com\/Texas_Instruments__SN74LS74AN.gif", 

"thumb_url": "http:\/\/delta.octopart.com\/Texas_Instruments__SN74LS74AN__0.thumb.gif"}

}

]

}

Part Result Format
Parameter Name Format Description
mpn String Manufacturer's part number of matching part.
manufacturer String Manufacturer of matching part.
infopage_url String Link to Octopart landing page for matching part.
keywords String List of common keywords associated with matching part.
attributes List A list of attributes describing this part. Each attribute is returned as a dictionary in the format described below.
suppliers List A list of suppliers for this part. Each supplier is returned as a dictionary in the format described below.
datasheet Dictionary The 'url' key corresponds to the datasheet for this part; set to None if none exist in the database.
image Dictionary Image of matching part; the URL for the thumbnail is under the 'thumb_url' key and the URL for the original is under the 'orig_url' key.
Attribute Format
Parameter Name Format Description
name String Name of attribute.
type String Type of attribute, either 'number-unit' or 'text'.
values List List of attribute values for matching part.
units String For 'number-unit' type filter, units of the list of values.
Suppliers Format
Parameter Name Format Description
name String Name of supplier.
sku String Supplier's part number.
supplier_url String URL to supplier's part page.
current Integer Suppliers with current value of 1 regularly send Octopart updated information; suppliers with current value of 0 may have out of date informtion.
quantity_in_stock Integer Supplier reported inventory of matching part.
pricing List List of dictionaries describing price breaks; each price break has a 'price' key, a 'currency' key and a corresponding 'price_break' key.
Javascript Library

For your convenience, a javascript library to interact with the Octopart Search API is available for download. The class and methods are described below. The library depends on jQuery and json2.

Method Name Description
SetKeywords Accepts string as input; sets keywords argument of API.
SetPageNum Set the page number of results to return.
SetNumResults Sets the number of results to return.
Query Sends query to server; accepts function callback which is executed
Example: Build your own custom Octopart

An example of the search API in action:

http://octopart.com/api/example

Terms of Service and Attribution

Users of the Octopart Search API must display the words "Powered by Octopart" clearly wherever the API is used. The word "Octopart" must be a hyperlink to http://octopart.com'

Users of the Octopart Search API are bound by the following Terms of Service.

Thank you for using the Octopart application programming interface (the "Octopart API"). By using the Octopart API, you agree to these terms of use (the "Terms of Use"). If you disagree with any of the terms below, Octopart does not grant you a license to use the Octopart API.


Octopart Inc. ("Octopart") reserves the right to update and change, from time to time, these Terms of Use and all documents incorporated by reference. You can always find the most recent version of these Terms of Use at http://octopart.com/api/legal. Octopart may change these Terms of Use by posting a new version without notice to you. Use of the Octopart API after such change constitutes acceptance of such changes.


1. Licensed Uses and Restrictions.


The Octopart API is owned by Octopart and is licensed to you on a worldwide (except as limited below), non-exclusive, nonsublicensable basis on the terms and conditions set forth herein. These Terms of Use define legal use of the Octopart API, all updates, revisions, substitutions, and any copies of the Octopart API made by or for you. All rights not expressly granted to you are reserved by Octopart.


a. Subject to the restrictions set forth in these Terms of Use, YOU MAY use the Octopart API and any updates provided by Octopart (in its sole discretion). Your license to the Octopart API under these Terms of Use continues until it is terminated by either party. You may terminate the license by discontinuing use of all or any of the Octopart API. Octopart may terminate the license at any time for any reason. These Terms of Use terminate automatically if (i) you violate any term of these Terms of Use, (ii) Octopart publicly posts a written notice of termination on Octopart's Web site, (iii) Octopart sends a written notice of termination to you, or (iv) Octopart ceases providing access to the Octopart API to you.


b. Unless otherwise specified, use and redistribution of all computer code made available at http://octopart.com/api/faq is permitted in source and binary forms, with or without modification, subject to the BSD License, Copyright © 2006 by the Open Source Institute. The following conditions must be met:


(i) Redistributions in source code form must contain the copyright notice "Copyright © Octopart Inc. 2008, All Rights Reserved", this list of conditions, and the following disclaimer.


(ii) Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution.


(iii) Neither the name of Octopart nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission of Octopart.


DISCLAIMER TO BE INCLUDED WITH OCTOPART COMPUTER CODE


THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


c. If your product or service uses or is based upon the Octopart API, then YOU SHALL comply with the Attribution Policy located at http://octopart.com/api/faq


e. If you wish to confirm that your application constitutes an acceptable use of the Octopart API or wish to inquire about rate limit increases, contact us via email at contact@octopart.com


f. YOU SHALL NOT:


(i) use the Octopart API in connection with or to promote any products, services, or materials that constitute, promote or are used primarily for the purpose of dealing in: spyware, adware, or other malicious programs or code, counterfeit goods, items subject to US embargo, hate materials (e.g. Nazi memorabilia) or materials urging acts of terrorism or violence, police items, unlicensed trade or dealing in stocks and securities, gambling items, professional services regulated by state licensing regimes, non-transferable items such as airline tickets or event tickets, non-packaged food items, weapons and accessories;


(ii) use the Octopart API in any manner or for any purpose that violates any law or regulation, any right of any person, including but not limited to intellectual property rights, rights of privacy, or rights of personality, or in any manner inconsistent with the Octopart TOS or these Terms of Use;


(iii) use the Octopart API to operate nuclear facilities, life support, or other mission critical application where human life or property may be at stake. You understand that the Octopart API is not designed for such purposes and that their failure in such cases could lead to death, personal injury, or severe property or environmental damage for which Octopart is not responsible;


(iv) sell, lease, share, transfer, or sublicense the Octopart API or access or access codes thereto or derive income from the use or provision of the Octopart API, whether for direct commercial or monetary gain or otherwise, without Octopart's prior, express, written permission; or


(v) use the Octopart API in a manner that exceeds reasonable request volume, constitutes excessive or abusive usage, or otherwise fails to comply or is inconsistent with any part of the Octopart API documentation located within http://octopart.com/api/faq, as determined by Octopart in its sole discretion;.


(vi) use the Octopart API in a product or service that competes with products or services offered by Octopart.


2. Ownership and Relationship of Parties.


The Octopart API may be protected by copyrights, trademarks, service marks, international treaties, and/or other proprietary rights and laws of the U.S. and other countries. Octopart's rights apply to the Octopart API and all output and executables of the Octopart API, excluding any software components developed by you which do not themselves incorporate the Octopart API or any output or executables of the Octopart API. You agree to abide by all applicable proprietary rights laws and other laws, as well as any additional copyright notices or restrictions contained in these Terms of Use and in the TOS. Octopart owns all rights, title, and interest in and to the Octopart API. These Terms of Use grant you no right, title, or interest in any intellectual property owned or licensed by Octopart, including (but not limited to) the Octopart API and Octopart trademarks.


3. Support.


Octopart may elect to provide you with support or modifications for the Octopart API (collectively, "Support"), in its sole discretion, and may terminate such Support at any time without notice to you. Octopart may change, suspend, or discontinue any aspect of the Octopart API at any time, including the availability of any Octopart API. Octopart may also impose limits on certain features and services or restrict your access to parts or all of the Octopart API or the Octopart Web site without notice or liability. Please register your application for priority notification of status alerts.


4. Fees and Payments.


Octopart reserves the right to charge fees for future use of or access to the Octopart API or the Octopart services and Web sites (collectively, "Octopart API Services") in Octopart's sole discretion. If Octopart decides to charge for the Octopart API Services, such charges will be disclosed to you prior.


5. Disclaimer of Any Warranty.


SOME OF THE OCTOPART API IS EXPERIMENTAL AND MAY HAVE, ERRORS, BUGS, OR INTERRUPTIONS. THE DATA MAY NOT BE RELIABLE, ACCURATE, COMPLETE, OR OTHERWISE VALID.


THE OCTOPART API IS PROVIDED "AS IS" WITH NO WARRANTY, EXPRESS OR IMPLIED, OF ANY KIND AND OCTOPART EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES AND CONDITIONS, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AVAILABLILTIY, SECURITY, TITLE AND/OR NON-INFRINGEMENT.


YOUR USE OF OCTOPART API IS AT YOUR OWN DISCRETION AND RISK, AND YOU WILL BE SOLELY RESPONSIBLE FOR ANY DAMAGE THAT RESULTS FROM THE USE OF ANY OCTOPART API INCLUDING, BUT NOT LIMITED TO, ANY DAMAGE TO YOUR COMPUTER SYSTEM OR LOSS OF DATA.


6. Limitation of Liability.


OCTOPART SHALL NOT, UNDER ANY CIRCUMSTANCES, BE LIABLE TO YOU FOR ANY INDIRECT, INCIDENTAL, CONSEQUENTIAL, SPECIAL OR EXEMPLARY DAMAGES ARISING OUT OF OR IN CONNECTION WITH USE OF THE OCTOPART API, WHETHER BASED ON BREACH OF CONTRACT, BREACH OF WARRANTY, TORT (INCLUDING NEGLIGENCE, PRODUCT LIABILITY OR OTHERWISE), OR ANY OTHER PECUNIARY LOSS, WHETHER OR NOT OCTOPART HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. UNDER NO CIRCUMSTANCES SHALL OCTOPART BE LIABLE TO YOU FOR ANY AMOUNT.


7. Exclusions and Limitations.


SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF CERTAIN WARRANTIES OR THE LIMITATION OR EXCLUSION OF LIABILITY FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES. ACCORDINGLY, SOME OF THE ABOVE LIMITATIONS OF SECTIONS 5 AND 6 MAY NOT APPLY TO YOU.


8. Release and Waiver.


To the maximum extent permitted by applicable law, you hereby release and waive all claims against Octopart, and its subsidiaries, affiliates, officers, agents, licensors, co-branders or other partners, and employees from any and all liability for claims, damages (actual and/or consequential), costs and expenses (including litigation costs and attorneys' fees) of every kind and nature, arising from or in any way related to your use of Octopart API. If you are a California resident, you waive your rights under California Civil Code § 1542, which states, "A general release does not extend to claims which the creditor does not know or suspect to exist in his favor at the time of executing the release, which if known by him must have materially affected his settlement with the debtor." You understand that any fact relating to any matter covered by this release may be found to be other than now believed to be true and you accept and assume the risk of such possible differences in fact. In addition, you expressly waive and relinquish any and all rights and benefits which you may have under any other state or federal statute or common law principle of similar effect, to the fullest extent permitted by law.


9. Hold Harmless and Indemnity.


To the maximum extent permitted by applicable law, you agree to hold harmless and indemnify Octopart and its subsidiaries, affiliates, officers, agents, licensors, co-branders or other partners, and employees from and against any third party claim arising from or in any way related to your use of Octopart API, including any liability or expense arising from all claims, losses, damages (actual and/or consequential), suits, judgments, litigation costs and attorneys' fees, of every kind and nature. Octopart shall use good faith efforts to provide you with written notice of such claim, suit or action.


10. General Terms.


10.1 Relationship of the Parties. Notwithstanding any provision hereof, for all purposes of the Terms of Use, you and Octopart shall be and act independently and not as partner, joint venturer, agent, employee or employer of the other. You shall not have any authority to asstion of Lawsuit and Choice of Law. The Terms of Use and the relationship between you and Octopart shall be governed by the laws of the State of California without regard to its conflict of law provisions. You and Octopart agree to submit to the personal jurisdiction of the courts located within the county of San Francisco, California.


10.4 No Waiver of Rights by Octopart. Octopart's failure to exercise or enforce any right or provision of the Terms of Use shall not constitute a waiver of such right or provision.


10.5 Miscellaneous. The section headings and subheadings contained in this agreement are included for convenience only, and shall not limit or otherwise affect the terms of the Terms of Use. Any construction or interpretation to be made of the Terms of Use shall not be construed against the drafter. The Terms of Use constitute the entire agreement between Octopart and you with respect to the subject matter hereof.