Part Limits and How They Work

Modified on Thu, 5 Oct, 2023 at 11:39 AM

Article Contents

What are Part Limits?


Part limits allow us to control who is using the Nexar API and moderate its usage. Any supply query (prefixed "sup") that returns parts and their data, will count that many parts against your part limit. Design queries (prefixed "des") do not cost anything. 

It's important to note the difference between a query and a part - if you make 10 queries that each return 100 parts then 1000 parts of your limit will be used up.


Limits are reset monthly on the 1st of each month and there is no rollover of parts that are unused into the next month's limit.


Each of your supply applications will have its own part limit. 

Upon signing up to Nexar, you will be given one evaluation app with a lifetime part limit of 1000. By default, any new applications will have a part limit of 0.


With an API plan, you can increase your limit as required.


How do Part Limits Work?


It's important to make the distinction between an API query and a part that is returned. Your limit is based on the number of parts returned - not how many queries you make. For most queries, the default is to return ten parts. Below are some example queries and their costs:


Categories Query - Free. No parts are returned in this query so it won't use up any of your limits.

query Categories {
    supCategories {
        id
        name
        path
    }
}



Basic Mpn Search - 10 parts. As mentioned previously, by default, 10 parts will be returned.

query MpnSearch {
    supSearchMpn {
        hits
        results {
            part {
                id
                name
                mpn
            }
        }
    }
}



Limited Mpn Search - 3 parts. By setting the "limit" input field, you can control how many parts are returned. (Maximum of 100) 

query LimitedMpnSearch {
    supSearchMpn (
        limit: 3
    ){
        hits
        results {
            part {
                id
                name
                mpn
            }
        }
    }
}



Multi Mpn Search - 2 parts. "supMultiMatch" returns 1 part per query as it looks for an exact match. In the query below, there are two queries costing 2 parts in total.

query MultiSearch {
    supMultiMatch (
        queries: [
            {mpn: "SY55855VKG"},
            {mpn: "SY89832UMG"},
        ]
    ){
        hits
        parts {
            id
            name
            mpn
        }
    }
}


How to check your limits and usage


You can check these in the Nexar portal. 



Alternatively, this data is available via the API. Please note that you will need to have an application with the design scope to make these queries as an access token with the "openid" and "user.access" scopes should be provided. You can generate an access token in the portal or you can fetch them programmatically. 

Please see our first-design-query example to see how to fetch design tokens programmatically.


Here's an example query:



query PartLimits {
    admOrganizations {
        id
        name
        applications {
            id
            name
            supplyCounts {
                partCounter
                partLimit
            }
        }
    }
}



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article