Search Endpoint
GET https://api.elexess.com/functions/v1/search
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
searchterm | string | Yes | Part number to search for (1–256 characters after trimming) |
supplier | string | No | Comma-separated supplier filter |
stream | boolean | No | Enable SSE streaming (true/false) |
currency | string | No | Preferred response currency when the team has no saved currency; defaults to EUR |
team_id | number | No | Positive integer team override when using a JWT with multiple team memberships |
nocache | boolean | No | Bypass driver cache (Pro/Enterprise only) |
mode | string | No | part (default), item or auto. See Item Search |
quantity | number | No | Item search only: whole quantity from 1 to 10,000,000 that the combined list is sorted by; defaults to 1 |
link_ids | string | No | Item search only: comma-separated ids of the item's part numbers to search (links[].id from the items endpoint), for items with more than 10, or when fewer searches are left than the item needs |
preview | boolean | No | Item search only: true finds the item and lists the part numbers a search would cover, with credits_needed, without searching or using a credit. Always answers JSON. See Item Search |
max_credits | number | No | Item search only: whole number from 1 to 999. An item whose search would need more credits is not searched; the answer is the same as preview=true |
Authentication
- Recommended:
Authorization: el_live_*team API token - Also supported: user JWT bearer token
- Web clients require a signed-in user session. External integrations should use team API tokens; project anonymous credentials cannot authenticate a search
JSON Response
When stream is not set or false:
{
"searchterm": "LM358",
"currency": "EUR",
"result_count": 42,
"results": [
{
"supplier": "Farnell",
"supplier_part_number": "1564674",
"manufacturer": "Texas Instruments",
"manufacturer_part_number": "LM358P",
"description": "Op Amp Dual GP ±16V/32V 8-Pin PDIP",
"stock": 4523,
"delivery_lead_time_days": 3,
"factory_lead_time_weeks": null,
"lead_time": null,
"prices": [
{ "quantity": 1, "price": 0.452, "currency": "EUR" },
{ "quantity": 10, "price": 0.389, "currency": "EUR" },
{ "quantity": 100, "price": 0.312, "currency": "EUR" }
],
"package": "PDIP-8",
"country_of_origin": "Malaysia",
"country_short_code": "MY",
"tariff_code": "85423390",
"tariff_code_system": "cn_eu",
"rohs": true,
"product_url": "https://...",
"datasheet_url": "https://...",
"image_url": "https://..."
}
],
"supplier_statuses": [
{ "supplier": "Farnell", "status": "success", "count": 12, "runtime_ms": 342 },
{ "supplier": "Anglia", "status": "error_service_unavailable", "count": 0, "runtime_ms": 20003 },
{ "supplier": "Mouser", "status": "success_empty_result", "count": 0, "runtime_ms": 430 }
]
}
Field Notes
stockisnullwhen availability is unknown; zero means confirmed no stock.moqandpacking_unitconstrain order quantities. Choose only an eligible price break at or below the requested quantity; a larger break does not price a smaller order.observed_atis the original observation time, including cache hits.from_cacheidentifies cache hits;cacheable=falseprohibits retaining that offer in browser caches. Missing retention metadata should be treated as permission not established.- Offers may retain their original currency when no fresh, positive exchange rate is available. Inspect every price currency before comparing values; GBP is supported.
delivery_lead_time_daysis the distributor's shipping or delivery estimate in days, ornullwhen the supplier does not provide one.factory_lead_time_weeksis the manufacturer's replenishment lead time in weeks, ornullwhen unavailable. It is not an estimate for an in-stock order.lead_timeis a deprecated compatibility field. Its legacy supplier mappings may have ambiguous units; do not use it to infer delivery dates. Use the two semantic fields above.country_of_originandcountry_short_code(ISO 3166-1 alpha-2) are where the part was made, as the supplier reports it, ornull. They are not filled in from the supplier's own country.tariff_codeis the supplier's customs tariff code, ornull. Use it only together withtariff_code_system:cn_eu(EU Combined Nomenclature, 8 digits, what an EU export declaration needs),taric(CN plus 2 digits),eu_national(TARIC plus 1 digit),hts_us(US Harmonized Tariff Schedule),hs6(6-digit Harmonized System) ornullwhen the supplier does not say which schedule the code follows. Every EU system starts with the CN code.currencyreports the selected response currency. A saved team currency takes precedence over thecurrencyquery parameter.supplier_statuses[]mirrors the per-supplier outcome of each driver invocation and matches the SSEsupplier_result/supplier_empty/supplier_error/supplier_skippedevents. Consumers should use this field to distinguish "supplier returned no matches" from "supplier API was unavailable". Values:success,success_empty_result,error_service_unavailable,error_rate_limited,error,skipped_line_card. See the Supplier Status Endpoint for status-page-wide availability.skipped_line_cardmeans the supplier was not asked. Some suppliers, such as manufacturer stores, only sell certain manufacturers' parts. They are searched only when the catalog or another supplier's offers show that the part comes from one of those manufacturers. A skipped supplier is neither an error nor "no results", and it never counts towardall_suppliers_failed.
SSE Response
When stream=true, the response uses Server-Sent Events:
Event: search_start
event: search_start
data: {"searchterm":"LM358","currency":"EUR","supplier_count":25}
Event: supplier_result
Sent for each supplier that returns results:
event: supplier_result
data: {"supplier":"Farnell","status":"success","count":5,"runtime_ms":342,"items":[...]}
Event: supplier_empty
Sent when a supplier returns no results:
event: supplier_empty
data: {"supplier":"Buerklin","status":"success_empty_result","runtime_ms":180}
Event: supplier_error
Sent when a supplier fails:
event: supplier_error
data: {"supplier":"Schukat","status":"error_service_unavailable","error":"Supplier request failed","runtime_ms":20004}
Event: supplier_skipped
Sent when a supplier was not asked because it does not sell this part's manufacturer:
event: supplier_skipped
data: {"supplier":"Texas Instruments","status":"skipped_line_card","runtime_ms":0}
A supplier that has not answered after about 23 seconds (33 for Digi-Key) is
reported with supplier_error and error_service_unavailable, and the search
continues without it.
Keep-alive comments
While suppliers are still running, the stream sends a comment line every 10 seconds:
: keepalive
Server-Sent Events parsers ignore lines that start with :. If you parse the stream
yourself, skip them; they carry no data and only keep idle-timeout proxies and
clients from closing the connection.
Event: search_complete
Final event with summary:
event: search_complete
data: {"searchterm":"LM358","total_results":42,"all_suppliers_failed":false}
all_suppliers_failed is true only when every queried supplier failed with an
availability or rate-limit error. This is the streaming equivalent of the REST path
returning 503 (see Error Responses), so a client can distinguish a genuine "no matches"
result from a full upstream outage.
Stream End
data: [DONE]
Item Search
With mode=item or mode=auto, the search term can be one of your team's item numbers, or the customer part number of one of your items. The term is matched ignoring case and surrounding spaces. An item number always wins over a customer part number. The item's part numbers are searched in one request:
- Part numbers searched: approved part numbers first, then part numbers in qualification, each in your preference order. Blocked part numbers are never searched, and their offers are left out.
- Credits: one search credit per part number searched, reserved together before any supplier is called. The credits of part numbers that never started are refunded on a best-effort basis: when the search reaches its time limit, the response reports the refunded credits in
credits_refunded; when you cancel the request, the refund is attempted too, though no response reports its result. - Limit: at most 10 part numbers per search. An item with more lists its part numbers without searching; choose up to 10 with
link_ids. - Shared customer part numbers: when several of your items have the searched customer part number, nothing is searched and no credit is used. The response lists up to 20
candidates(id,item_number,description,customer_name,customer_part_number) withnot_searched: "several_items"anditem: null, plusmore_candidates: truewhen there are more. Search again with the item number you want. auto: searches the item when the term is one of your item numbers or customer part numbers, and the part number otherwise. Withoutmode, a search is always a part number search, as before.- Preview:
preview=trueanswers JSON, even withstream=true, without searching and without using a credit. For an item it returns the item, itspart_numbers,not_searched: "preview",credits_neededandplanned_part_numbers, the part numbers a search would cover in order. Shared customer part numbers still return their candidates. Inautomode, a term that is not one of your items returnsmode: "part"withcredits_needed: 1.
The response adds the item and its part numbers, and every result carries item_match. REST results come as one list sorted by unit price at quantity:
{
"mode": "item",
"searchterm": "640609F",
"currency": "EUR",
"quantity": 100,
"item": {
"id": 7,
"item_number": "640609F",
"description": "Power inductor 2.2 µH",
"customer_name": null,
"customer_part_number": null
},
"part_numbers": [
{
"part_number": "74275022",
"searched": true,
"links": [{ "id": 11, "manufacturer_part_number": "74275022", "manufacturer": "Würth Elektronik", "approval_status": "approved" }]
}
],
"supplier_count": 25,
"credits_reserved": 1,
"credits_refunded": 0,
"deadline_reached": false,
"result_count": 12,
"results": [
{
"supplier": "Mouser",
"manufacturer": "Würth Elektronik",
"manufacturer_part_number": "74275022",
"item_match": { "part_number": "74275022", "link_id": 11, "approval_status": "approved", "flags": [] }
}
],
"supplier_statuses": [{ "supplier": "Mouser", "part_number": "74275022", "status": "success", "count": 3, "runtime_ms": 412 }]
}
item_match.flags can contain:
| Flag | Meaning |
|---|---|
qualification | The part number is still in qualification for the item |
manufacturer_not_approved | The item lists this part number from a different manufacturer |
manufacturer_unresolved | The item's manufacturer for this part number is not recognised yet |
part_number_differs | The supplier returned a different part number for the search |
When nothing can be searched, the response has not_searched set to no_searchable_part_numbers, too_many_part_numbers (with max_part_numbers) or several_items (with candidates), no results, and no credit is used. With stream=true, search_start carries the item fields above, every supplier event carries part_number, and search_complete adds mode, credits_refunded and deadline_reached.
Error Responses
| Status | Body | Description |
|---|---|---|
| 400 | {"error":"searchterm is required"} | Missing or empty search term |
| 400 | {"error":"searchterm must be <= 256 characters"} | Search term exceeds 256 characters |
| 400 | {"error":"team_id must be a positive integer"} | Invalid team override |
| 400 | {"error":"mode must be auto, item or part"} | Invalid mode |
| 400 | {"error":"quantity must be a whole number from 1 to 10000000"} | Invalid quantity in item or auto mode |
| 400 | {"error":"link_ids must be a comma-separated list of ids"} | Malformed link_ids in item or auto mode |
| 400 | {"error":"Item search needs a team"} | mode=item without a team |
| 400 | {"error":"link_ids must name searchable part numbers of this item"} | link_ids names a part number the item does not have, or a blocked one |
| 404 | {"error":"Item not found"} | mode=item and the term is neither one of your item numbers nor a customer part number of one of your items |
| 401 | {"error":"Missing authorization header"} or {"error":"Unauthorized"} | Missing, invalid, revoked, or expired credentials |
| 403 | {"error":"The nocache option is available only on Pro and Enterprise plans."} | nocache=true requested without Pro/Enterprise access |
| 404 | {"error":"No suppliers available"} or {"error":"No runnable suppliers available"} | Filter matches no available supplier or none has a runnable configuration |
| 429 | {"error":"Rate limit exceeded","current":500,"limit":500} | Monthly quota exhausted. An item search also returns needed (credits the search requires), remaining (credits left this month), mode: "item", item and part_numbers; retry with link_ids naming at most remaining part numbers |
| 500 | {"error":"Internal server error"} | Internal error |
| 503 | {"error":"Upstream temporarily unavailable"} | Transient upstream failure or every queried supplier was unavailable or rate-limited. The streaming path signals an aggregate supplier outage via all_suppliers_failed in search_complete. Retry after the response's Retry-After interval. |
Related Endpoints
- Watchlist Endpoint
- Parts Endpoint
- Items Endpoint
- Team Part Endpoint
- Manufacturers Endpoint
- Suppliers Endpoint
- Supplier Status Endpoint
When every runnable supplier is temporarily unavailable or throttled, the REST
response is HTTP 503 with code: "supplier_unavailable" and Retry-After. SSE
reports all_suppliers_failed: true in search_complete. A successful empty
search does not set these failure markers. Authentication-service failures retain
their separate error response and do not set the supplier-failure code.