Graybar APIgraybar.com ↗
Search Graybar's electrical product catalog by keyword, SKU, or manufacturer part number. Retrieve specs, brand, pricing, and availability for any Graybar SKU.
What is the Graybar API?
The Graybar API provides 3 endpoints to search and retrieve product data from Graybar.com, one of the largest electrical and industrial supply distributors in North America. search_products returns paginated results with SKUs, names, and prices for any keyword or SKU query. get_product_details exposes structured fields including brand, manufacturer part number, pack size, attributes, list price, unit price, and shipping/pickup availability for a given Graybar SKU.
curl -X GET 'https://api.parse.bot/scraper/7bac221b-f933-4c61-a16c-d944abe43fb5/search_products?page=0&query=conduit' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace graybar-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Graybar API — search electrical products by keyword or MPN, then drill into details."""
from parse_apis.graybar_api import Graybar, ProductNotFound
client = Graybar()
# Search by keyword — limit caps total items fetched across all pages.
for item in client.products.search(query="conduit", limit=5):
print(item.sku, item.name)
# Search by manufacturer part number and drill into the first match.
match = client.products.search_by_mpn(mpn="QO120", limit=1).first()
if match:
product = match.details()
print(product.name, product.brand, product.mfr_no, product.pack_size)
# Direct lookup by SKU with typed error handling.
try:
detail = client.products.get(sku="88225178")
print(detail.name, detail.brand, detail.availability.to_ship)
except ProductNotFound as exc:
print(f"SKU not found: {exc.sku}")
print("exercised: products.search / products.search_by_mpn / ProductSummary.details / products.get")
Full-text search over Graybar's product catalog by keyword or SKU. Returns a paginated list of matching products with SKU, name, and price (null for unauthenticated sessions). Manufacturers facet extracted when available. Pagination is zero-based; each page returns up to 20 items.
| Param | Type | Description |
|---|---|---|
| page | integer | Zero-based page number for pagination. |
| queryrequired | string | Search keyword or SKU to search for. |
{
"type": "object",
"fields": {
"page": "the zero-based page number echoed back",
"query": "the search query echoed back",
"products": "array of product objects, each with sku (string), name (string), and price (number or null)",
"manufacturers": "array of manufacturer name strings extracted from search facets"
},
"sample": {
"data": {
"page": 0,
"query": "conduit",
"products": [
{
"sku": "26254503",
"name": "Standard Weight General Purpose Slit Conduit NC Size 08/NW Size 7.5 Outside Diameter 10.0mm Inside Diameter 6.5mm Static",
"price": null
}
],
"manufacturers": []
},
"status": "success"
}
}About the Graybar API
Searching the Graybar Catalog
search_products accepts a required query string (keyword or Graybar SKU) and an optional zero-based page integer for pagination. Each response returns the echoed query and page, an array of products (each with sku, name, and price), and a manufacturers array pulled from search facets — useful for filtering or understanding which brands carry matching products. Prices may be null when no pricing is publicly visible for a given session.
Manufacturer Part Number Lookup
search_by_mpn targets searches by Manufacturer Part Number (MPN) rather than Graybar's own SKU or a text keyword. The response shape is identical to search_products (same products and manufacturers arrays), with page always returning 0. Results can include fuzzy matches, so cross-checking the returned sku values against get_product_details is advisable for strict MPN matching.
Full Product Details
get_product_details takes a Graybar sku (a numeric string such as '88225178') and returns the deepest level of product data available: name, brand, mfr_no (the manufacturer's own part number), pack_size, and an attributes object containing key-value pairs from the product specification sheet. Pricing is split into list_price and unit_price, both of which may be null for publicly unauthenticated lookups. The availability object exposes to_ship and for_pickup strings indicating stock status for each fulfillment channel. An alternate_products array lists related Graybar SKUs when alternatives are cataloged.
The Graybar API is a managed, monitored endpoint for graybar.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when graybar.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official graybar.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Cross-reference a vendor invoice's manufacturer part numbers against Graybar SKUs using
search_by_mpn. - Build a procurement comparison tool that pulls
list_priceandunit_pricefor a list of Graybar SKUs. - Catalog electrical components by iterating
search_productsresults and enriching withattributesfromget_product_details. - Monitor
availabilityfields (to_ship,for_pickup) to track in-stock status across Graybar's fulfillment channels. - Extract the
manufacturersfacet from search results to identify which brands Graybar carries for a product category. - Map internal part numbers to Graybar SKUs by querying
search_by_mpnwith each MPN in a bill of materials. - Identify substitute products using the
alternate_productsarray returned byget_product_details.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Graybar have an official public developer API?+
Why are `price`, `list_price`, and `unit_price` sometimes null?+
search_products returns price: null and get_product_details returns list_price: null and unit_price: null. Product names, SKUs, brand, manufacturer part numbers, and specification attributes are still returned regardless of pricing visibility.What does the `attributes` object in `get_product_details` contain?+
Does the API return product images or documents such as datasheets?+
How does pagination work in `search_products`?+
page parameter is zero-based, so the first page is page=0. The response echoes the page number back. search_by_mpn always returns page 0 and does not currently support pagination. If a search returns a large number of matches, iterating page in search_products is the way to walk through results.