API Documentation

Table of Contents

Query

Field Argument Type Description
attributes [Attribute!]!

Get all attributes

manufacturers [Company!]!

Get manufacturer companies

ids [String!]

list of company IDs. Omit to fetch all manufacturers.

slugs [String!]

list of URL slugs for /manufacturers paths

sellers [Company!]!

Get seller companies (distributors)

ids [String!]

list of company IDs. Omit to fetch all sellers.

slugs [String!]

list of URL slugs for /distributors paths

categories [Category!]!

Get categories

ids [String!]

list of category IDs. Omit to fetch all categories.

paths [String!]

list of /electronic-parts SEO page paths for categories.

parts [Part]!

Get parts by ID.

ids [String!]!

list of part IDs. APIv3 UIDs are also supported.

country String!

user's country

currency String!

user's currency

distributorapi Boolean

fetch latest pricing and stock data from distributor API. Company.is_distributorapi indicates if a distributor supports this feature.

distributorapi_timeout String!

how long to wait for distributor API to respond as a duration string (e.g. 3s or 500ms)

custom_pricing_credentials [ApiCredentials!]

if needed, pass along credentials for API integrations

suggest [Suggestion!]!

Attempt to complete a partial query string. Used for autosuggest / typeahead text inputs.

q String!

partial query string

category_id String

category_id to scope suggestions to

part_numbers_only Boolean

only return part number suggestions

search PartResultSet!

Search parts, including filters, pagination, aggregation, sorting

q String

the query to search

country String!

user's country

currency String!

user's currency

start Int

offset in the result set

limit Int

page size of results

sort String

field to sort by. See sort values

sort_dir SortDirection

direction of sort: asc or desc

in_stock_only Boolean

filter to remove parts with no stocking distributors

filters Map

a key: value map of filters. See filter values

distributorapi Boolean

fetch latest pricing and stock data from distributor API. Company.is_distributorapi indicates if a distributor supports this feature.

distributorapi_timeout String!

how long to wait for distributor API to respond as a duration string (e.g. 3s or 500ms)

custom_pricing_credentials [ApiCredentials!]

if needed, pass along credentials for API integrations

search_mpn PartResultSet!

Search parts by mpn only, including filters, pagination, aggregation, sorting

q String

the query to search on mpn

country String!

user's country

currency String!

user's currency

start Int

offset in the result set

limit Int

page size of results

sort String

field to sort by. See sort values

sort_dir SortDirection

direction of sort: asc or desc

in_stock_only Boolean

filter to remove parts with no stocking distributors

filters Map

a key: value map of filters. See filter values

distributorapi Boolean

fetch latest pricing and stock data from distributor API. Company.is_distributorapi indicates if a distributor supports this feature.

distributorapi_timeout String!

how long to wait for distributor API to respond as a duration string (e.g. 3s or 500ms)

custom_pricing_credentials [ApiCredentials!]

if needed, pass along credentials for API integrations

spelling_correction [SpellingCorrection!]!

Suggest an alternate q when no results are found

q String!

query string to correct

multi_match [PartMatch!]!

Match multiple manufacturer + mpn pairs at once. Useful for when you have a list of parts, as with a BOM (Bill of Materials)

queries [PartMatchQuery!]!

list of inputs to attempt to match

options PartMatchOptions

options when matching such as applying filters or only including authorized or in-stock parts

country String!

user's country

currency String!

user's currency

distributorapi Boolean

fetch latest pricing and stock data from distributor API. Company.is_distributorapi indicates if a distributor supports this feature.

distributorapi_timeout String!

how long to wait for distributor API to respond as a duration string (e.g. 3s or 500ms)

custom_pricing_credentials [ApiCredentials!]

if needed, pass along credentials for API integrations

Objects

AppliedFilter

Used to show the filters that are applied to current search.

Field Argument Type Description
shortname String!

shortname is the key in the filters Map. Usually an attribute shortname, or manufacturer_id, distributor_id, etc.

name String!

human readable name to display in the UI

values [String!]!

values in the filter Map.

display_values [String!]!

human readable values to display in the UI

Attribute

Defines an attribute like Capacitance or Resistance.

Field Argument Type Description
id ID!

Internal Octopart ID

name String!

display name

shortname String!

use as key for sort or filter in part search

group String!

use to group together similar attributes, e.g. Technical, Physical, Compliance

value_type String!

The type of the value

units_name String!

The short name of the units

units_symbol String!

The symbol of the units

AttributeGroup

Groups similar attributes together, as can be seen with column groups in specs view

Field Argument Type Description
name String!

Name of group, e.g. Technical, Physical, Compliance

attributes [Attribute!]!

Attributes in group

Blurb

Information for use on /electronic-parts Category pages.

Field Argument Type Description
name String!

Category name.

path_name String!

Path to /electronic-parts Category page.

description String!

Short description of Category.

content String!

Longer description of Category.

meta_description String!

Description used in webpage metadata - SEO optimised

meta_title String!

Title used in webpage metadata - SEO optimised

CadBucket

cad_agg produces a CadBucket with the count of parts that have CAD Symbol + Footprint and 3D model

Field Argument Type Description
cad_state String!
count Int

Category

A Category exists in a Category tree. Examples include Passive Components or Capacitors. The path field is helpful to see where a category is in the tree. Category id 4161 is the root of tree.

Field Argument Type Description
id ID!

Octopart internal id. Root id is 4161

parent_id ID!

ID of parent category.

name String!

Display name

ancestors [Category!]!

List of all ancestor in category tree.

children [Category!]!

List of direct children in category tree.

path String!

Slash separated path. Can be used to visit URL for category page. (e.g. /electronic-parts/circuit-protection/esd-and-circuit-protection-ics)

relevant_attributes [Attribute!]!

List of Attributes deemed to be relevant to this category. (e.g. Resistance for Resistor category). Useful for showing contextual filters in UI.

blurb Blurb

Blurb for Category, used on /electronic-parts pages.

num_parts Int!

Number of parts in Category.

CategoryBucket

category_agg produces a CategoryBucket with category + counts

Field Argument Type Description
category Category!
count Int

Company

A company record represents a manufacturer or distributor, depending on context.

Field Argument Type Description
id ID!

Octopart internal id

name String!

Display name of company

aliases [String!]!

Aliases of company

display_flag String

The country code for the display flag

homepage_url String

Homepage URL of company

slug String!

Used for URLs like /manufacturers/aimtec or /distributors/digi-key

is_verified Boolean!

True if a manufacturer participates in Octopart's Verified Manufacturer program. See verified for more information.

is_broker ⚠️ Boolean!

True if a distributor is a broker. See authorized for more information.

⚠️ DEPRECATED

use PartSeller.is_broker instead

is_distributorapi Boolean!

True if a distributor has an API integration with Octopart to provide latest pricing and stock data.

is_octocart_supported Boolean!

True if Octocart is supported for this distributor

CompanyBucket

manufacturer_agg and distributor_agg produce a CompanyBucket with company + counts

Field Argument Type Description
company Company!
count Int

Country

A country's name, country code, and continent code.

Field Argument Type Description
name String!
country_code String!
continent_code String!

Description

Textual description of a part

Field Argument Type Description
text String!

Description text

credit_string String!

Source of description. Used for attribution.

credit_url String!

Source URL of description. Used for attribution.

Document

Document represents a PDF file and can be a Datasheet, Compliance Document, PCN, etc.

Field Argument Type Description
name String!
page_count Int
created_at Time
url String!
credit_string String!
credit_url String!
mime_type String!

DocumentCollection

DocumentCollection groups documents together by type: Datasheets, Compliance Statements.

Field Argument Type Description
name String!

Name of group, e.g. Datasheets

documents [Document!]!

List of Documents in group

Image

Image of a part. In the case of some symbol and footprint images, the scaled version may not actually be scaled and cropped, and may need to be scaled using CSS or other techniques.

Field Argument Type Description
url_largest ⚠️ String!

⚠️ DEPRECATED

use url instead

url_55px ⚠️ String!

⚠️ DEPRECATED

use url instead

url_75px ⚠️ String!

⚠️ DEPRECATED

use url instead

url_90px ⚠️ String!

⚠️ DEPRECATED

use url instead

url String!

Image URL

credit_string String!

Source of description. Used for attribution.

credit_url String!

Source URL of description. Used for attribution.

Offer

An offer is a specific buyable part from a distributor, with specific packaging, pricing, stock, moq.

Field Argument Type Description
_cache_id String!

Cache ID

id ID!

Octopart internal ID for this offer

sku String!

Stock Keeping Unit used by internally by distributor

eligible_region String

The code indicating the region(s) for which offer is valid

inventory_level Int!

Number of units available to be shipped. (aka Stock, Quantity)

packaging String

Packaging of parts (eg Tape, Reel)

moq Int

Minimum Order Quantity: smallest number of parts that can be purchased

prices [PricePoint!]!

The price points of the offer, sorted by minimum order quantity

click_url String!

The URL to view offer on distributor website. This will redirect via Octopart's server.

internal_url String!

Octopart internal URL for this offer.

updated Time!

The last time data was received from distributor feed or API for this offer.

factory_lead_days Int

Number of days to acquire parts from factory.

on_order_quantity Int

Number of parts on order from factory.

factory_pack_quantity Int

Order multiple for factory orders.

order_multiple Int

Number of items which must be ordered together.

multipack_quantity Int

The quantity of parts as packaged by the seller.

is_custom_pricing Boolean!

Whether this offer is specific to the customer making the request.

Part

Part model contains the relevant data around a part, including: datasheets, specs, sellers + offers, images, etc.

Field Argument Type Description
_cache_id String!

Cache ID

id ID!

Octopart internal ID for this part. Appears at the end of PDP URL / slug field.

name String!

manufacturer + mpn for easy display

mpn String!

Manufacturer Part Number

generic_mpn String!

Best guess at a generic MPN

manufacturer Company!

Company that manufactures this part

manufacturer_url String

A link to the manufacturer detail page for this part or series.

free_sample_url String

A link to a manufacturer page to request free sample kits for this part.

document_collections [DocumentCollection!]!

Documents including Datasheets, Compliance Documents, PCNs

short_description String!

Best description around 110 characters long, as can be seen on SERP or PDP. May need truncation if all descriptions are long.

descriptions [Description!]!

All part descriptions from sources

images [Image!]!

All part images

specs [Spec!]!

Attribute values for this part

slug String!

Path component of PDP URL (e.g. /ad7792bruz-analog+devices-402798)

octopart_url String!

A link to the part page on Octopart. Do not include rel="nofollow" when linking to this URL.

similar_parts [Part!]!

Parts identified by Octopart to be similar in specs and functionality.

companion_products [SponsoredPart!]!

Parts identified by the manufacturer as companion products.

category Category
series PartSeries
best_image Image
best_datasheet Document
reference_designs [ReferenceDesign!]!
cad PartCad

Data about part's CAD model. If null cad_request_url can be used to request a CAD model be made.

cad_request_url String

URL to request a CAD model from eeconcierge if a part doesn't already have a CAD model. Will be null part is not eligible, e.g. a multimeter

v3uid ID!

The UID from Octopart APIv3. Provided for backwards compatibility, in general ID should be used.

counts Map!

A Map of number of related objects. Can be used to know the number of images or descriptions without having to request those related objects.

median_price_1000 PricePoint

The median USD price at quantity 1,000, discarding outliers. A reasonable estimate of average price for a part.

total_avail Int!

Sum of stock available across all distributors

avg_avail Float!

The average stock level at each distributor

sellers [PartSeller!]!

Companies with Offers for this part

include_brokers Boolean!
authorized_only Boolean!
estimated_factory_lead_days Int

The estimated factory lead time in days derived from trusted distributor offers.

aka_mpns [String!]!

This part might be known by these alternate MPNs

PartCad

Field Argument Type Description
add_to_library_url String

URL to add this part to your Upverter library. Requires an Upverter account.

has_3d_model Boolean!

If true, a STEP model will be included with the tool-specific downloads.

has_altium Boolean!
has_eagle Boolean!
has_orcad Boolean!
has_kicad Boolean!
download_url_altium String!
download_url_eagle String!
download_url_orcad String!
download_url_kicad String!
footprint_image_url String
symbol_image_url String

PartMatch

Field Argument Type Description
reference String

Will match reference supplied in PartMatchQuery.

hits Int!

Number of parts matched

parts [Part!]!

Matched parts (may be subset, based on start + limit)

error String

Possible error message

PartResult

Field Argument Type Description
_cache_id String!

Cache ID

part Part!

The part object

explain ⚠️ String!

⚠️ DEPRECATED

always empty

aka_mpn String

If the search q is an alternate MPN for this part, the aka_mpn will be populated with this alternate MPN.

description String!

Description with query terms highlighted. Often this is the same as part.short_description, but if the search q matched on a different description it may be longer than part.short_description and require truncation.

PartResultSet

Result of part search.

Field Argument Type Description
total ⚠️ Int!

⚠️ DEPRECATED

use hits instead

hits Int!

Number of parts in result set

results [PartResult!]

Contains nested part along side some fields specific to the query that explain reason for match.

specs_view_attribute_groups [AttributeGroup!]!

Grouped attributes used to render the columns in specs view.

warnings [String!]

If an invalid query was modified or rejected, warnings indicate this fact to the user. For example if query contained too many tokens, some tokens may be ignored.

spec_aggs [SpecAgg!]!

Perform aggregations on Spec values across multiple Attributes. You must specify attribute_names for this field to be populated. attribute_names should be a list of Attribute.shortname values (e.g. capacitance or voltage_rating_dc)

attribute_names [String!]!

a list of Attribute.shortname values to aggregate on (e.g. capacitance or voltage_rating_dc)

size Int!

number of spec value buckets to return (default 10)

manufacturer_agg [CompanyBucket!]!

Aggregate on manufacturers for this result set

size Int!

number of buckets to return (default 10)

distributor_agg [CompanyBucket!]!

Aggregate on distributors for this result set

size Int!

number of buckets to return (default 10)

category_agg [CategoryBucket!]!

Aggregate on categories for this result set

size Int!

number of buckets to return (default 10)

cad_agg [CadBucket!]!

Aggregate on the availability of CAD models for the result set

suggested_categories [CategoryBucket!]!

Categories that are determined by search algo to be related to the search term. Useful for suggesting a Category filter in the search UI.

suggested_filters [Attribute!]!

Attributes that are determined by search algo to be related to the search term. Useful for suggesting most relevant filters in the search UI.

all_filters [Attribute!]!

Full list of available Attributes in the result set

applied_category Category

If a Category filter is applied, this will be the Category

applied_filters [AppliedFilter!]!

If filters are applied, this will contain display information

PartSeller

A company with offers for a given part

Field Argument Type Description
_cache_id String!

Cache ID

company Company!

The distributor

country String

Distributor's country

offers [Offer!]!

List of offers. Multiple offers may exist in different packaging. While multiple geo-targeted offers may exist, currently the API only exposes one geo-targeted offer at a time based on country parameter. Please contact us if you have a need to see all geo-targeted offer variants.

is_authorized Boolean!

True if the distributor is an authorized distributor for this manufacturer. See authorized for more information.

is_broker Boolean!

True if the distributor is a Non-Authorized Dealer. See authorized for more information.

is_rfq Boolean!

True if you can request a quote from this seller.

ships_to_countries [Country!]!

List of countries the seller ships to. An empty list represents zero shipping restrictions.

PartSeries

A Part can be a member of a PartSeries, which represents a product line or "family" of parts from the manufacturer.

See series page for examples.

Field Argument Type Description
id ID!

Octopart internal ID for this series

name String!

Name of the part series

url String!

Octopart URL for this series, specific to the parent part

PricePoint

Price in a specific currency + quantity. By supplying a currency parameter the API will populate an estimated converted_price in the user's desired currency.

Field Argument Type Description
_cache_id String!

Cache ID

quantity Int!

Minimum purchase quantity to get this price (aka price break)

price Float!

Price in currency

currency String!

Currency for price

converted_price Float!

Price converted to user's currency using foreign exchange rates.

Since this is an estimate, an indicator should be shown to user if currency != converted_currency.

converted_currency String!

Currency for converted_price. Will match value of currency argument.

conversion_rate Float!

The exchange rate used to calculate converted_price

ReferenceDesign

Field Argument Type Description
name String!
url String!

Spec

Represents a specific value of an Attribute for a given Part

Field Argument Type Description
attribute Attribute!
value String!

The actual value

si_value String!

The value of the spec in SI base units

value_type String!

The type of the value

units String!

The units of the value

units_name String!

The short name of the units

units_symbol String!

The symbol of the units

display_value String!

The formatted display value

SpecAgg

Field Argument Type Description
attribute Attribute!
buckets [SpecBucket!]!
min Float

min is the lowest spec value in this result set for numerical attributes

max Float

max is the greatest spec value in this result set for numerical attributes

si_min String

The min value in SI base units

si_max String

The max value in SI base units

display_min String

display_min is the formatted string of min

display_max String

display_max is the formatted string of max

value_type String!

The type of the value

units String

The units of the spec

units_name String

The short name of the units

units_symbol String

The symbol of the units

SpecBucket

Field Argument Type Description
display_value String!

display_value is the string value. For numerical attributes it is the formatted version of float_value

float_value Float

float_value is populated if the attribute is numeric

count Int

count will be null if aggregation timed out

SpellingCorrection

Field Argument Type Description
correction_string String!
hits Int!

SponsoredPart

Part identified by manufacturer as being a companion part, for instance a mated connector pair.

Field Argument Type Description
_cache_id String!

Cache ID

ppid ⚠️ ID!

⚠️ DEPRECATED

use part.id instead

source_id ⚠️ ID!

⚠️ DEPRECATED

unused

part Part!

Related part

url String!

URL to visit for related part

Suggestion

Suggests a query based on partial query input. Used for autocomplete / typeahead UIs.

Field Argument Type Description
text String!

Suggested text of longer query

in_category_name String!

If the suggestion should also apply a category_id filter, this is the category name

in_category_id String!

If the suggestion should also apply a category_id filter, this is the Category ID

Inputs

ApiCredentials

Field Type Description
api_name String!

The name of the API that you are providing credentials for. An Octopart representative will give this value to you if needed.

client_id String

Authentication details. client_id and client_secret should be given together when an API requires them.

client_secret String

Authentication details. client_id and client_secret should be given together when an API requires them.

username String

Authentication details. username and password should be given together when an API requires them.

password String

Authentication details. username and password should be given together when an API requires them.

api_key String

Authentication details. api_key should be given when an API requires it.

PartMatchOptions

Field Type Description
require_authorized_sellers Boolean

If true, only parts with at least one authorized seller will be returned.

require_stock_available Boolean

If true, only parts with stock available will be returned.

filters Map

a key: value map of filters. See filter values

PartMatchQuery

Field Type Description
mpn String
sku String
mpn_or_sku String
manufacturer String
seller String
start Int!
limit Int!
reference String

Enums

NexarFeatureID

Value Description
LEAD_TIME
LIFECYCLE
DATASHEETS
TECH_SPECS
CAD_MODELS
SIMILAR_PARTS
SUGGESTIONS
SPELLING_CORRECTIONS
INVENTORY_HISTORY

PlanTier

Value Description
FREE
BASIC
PRO
ENTERPRISE

Role

Value Description
DISTRIBUTOR
CADMODELS
INTERNAL
NEXARINTERNAL

SortDirection

Value Description
asc
desc

Scalars

Boolean

The Boolean scalar type represents true or false.

Float

The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.

ID

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

Int

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Map

A JSON Object with arbitrary keys and values. e.g. {"logicfunction": ["Buffer", "Transceiver", "Inverting"]}

String

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Time

A time in RFC3339 format e.g. 2006-01-02T15:04:05Z