Grainger APIgrainger.com ↗
Access Grainger's industrial supply catalog via API. Retrieve categories, subcategories, product search results, specs, and pricing across millions of SKUs.
What is the Grainger API?
The Grainger.com API provides 5 endpoints covering Grainger's industrial supply catalog, from top-level category navigation down to individual product specifications and pricing. Using get_product_details, you can retrieve a product's SKU, brand, unit price, short description, and a full key-value specifications object for any product URL. Additional endpoints support category traversal, subcategory filter facets, and keyword or part-number search.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/790ef36d-29a9-4b59-b132-59923c47f4a0/get_all_top_level_categories' \ -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 grainger-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.
from parse_apis.grainger.com_product_catalog_api import Grainger, Category, Subcategory, CategoryDetail, SubcategoryDetail, Product, ProductDetail
grainger = Grainger()
# List all top-level categories in the catalog
for category in grainger.categories.list():
print(category.name, category.slug)
# Navigate into a category to see its subcategories
safety = Category(_api=grainger, slug="safety", url="https://www.grainger.com/category/safety", name="Safety")
cat_detail = safety.subcategories()
print(cat_detail.name, cat_detail.description)
for subcat in cat_detail.subcategories:
print(subcat.name, subcat.url)
# Get detailed info for a subcategory including product count and filters
eye_protection = Subcategory(_api=grainger, url="https://www.grainger.com/category/safety/eye-face-protection", name="Eye & Face Protection")
detail = eye_protection.detail()
print(detail.name, detail.product_count)
for f in detail.filters:
print(f.attribute, f.values)
# Search for products by keyword
for product in grainger.products.search(query="nitrile gloves"):
print(product.name, product.sku, product.price_formatted)
# Drill into full product details
full = product.details()
print(full.brand, full.description, full.price)
for spec_key, spec_val in full.specifications.items():
print(spec_key, spec_val)
Get all top-level product categories from Grainger.com. Returns a flat list of category names, URLs, and URL slugs. Use this as the entry point to navigate the catalog hierarchy.
No input parameters required.
{
"type": "object",
"fields": {
"categories": "array of category objects with name, url, and slug"
},
"sample": {
"data": {
"categories": [
{
"url": "https://www.grainger.com/category/abrasives",
"name": "Abrasives",
"slug": "abrasives"
},
{
"url": "https://www.grainger.com/category/safety",
"name": "Safety",
"slug": "safety"
}
]
},
"status": "success"
}
}About the Grainger API
Category and Subcategory Navigation
get_all_top_level_categories returns a flat list of every top-level category on Grainger.com — each entry includes a name, a url, and a slug. From there, get_category_subcategories accepts a category_url and returns the category's name, a breadcrumbs array showing the full navigation path, a description string, and a subcategories array with names and URLs. Both endpoints are designed to chain: you can walk the full category tree by repeatedly calling get_category_subcategories with subcategory URLs returned by previous calls.
Subcategory Filtering and Product Counts
get_subcategory_detail goes one level deeper. Given a category_url, it returns a product_count integer showing how many SKUs are in that subcategory, plus a filters array. Each filter object includes an attribute name (e.g. "Brand", "Trade Designation") and an array of available values — only values with at least one matching product in that subcategory are included. This makes it straightforward to build faceted browsing or to understand what brand and spec options are stocked in any given area of the catalog.
Product Search
search_products accepts a query string — either a keyword or a part number — and returns a count, the echoed query, and a products array. Each product entry includes name, sku, url, price, price_formatted, image_url, and manufacturer_part_number. Note that broad search terms (e.g. "safety gloves") may redirect to a category page rather than a product list; in those cases, the response returns a category_url and an empty products array. Using specific terms or part numbers yields direct product results.
Product Details
get_product_details accepts a product_url and returns the most granular data in the API: sku, url, name, brand, price (numeric or null), price_formatted, a description string, and a specifications object containing key-value pairs for all technical attributes listed on the product page — dimensions, material, certifications, voltage ratings, and whatever else Grainger publishes for that item.
The Grainger API is a managed, monitored endpoint for grainger.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when grainger.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 grainger.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?+
- Build a parts sourcing tool that maps manufacturer part numbers to Grainger SKUs and current unit prices using
search_productsandget_product_details. - Populate an internal procurement catalog by walking the category tree with
get_all_top_level_categoriesandget_category_subcategories. - Generate faceted search filters for a custom procurement UI using the
filtersarray fromget_subcategory_detail. - Monitor price changes on specific industrial SKUs by polling
get_product_detailswith stored product URLs. - Extract technical specifications (material, dimensions, ratings) from
get_product_detailsto feed product comparison tables. - Estimate category coverage and assortment size for supplier analysis using
product_countfromget_subcategory_detail. - Route part-number lookups to exact product pages by passing Grainger or manufacturer part numbers to
search_products.
| 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 Grainger have an official developer API?+
What does `get_product_details` return in the specifications field?+
specifications field is a key-value object whose keys and values come directly from the product page's attribute table. The exact keys vary by product type — a drill bit might have entries like "Drill Bit Point Angle" and "Overall Length", while a safety glove might have "Material" and "ANSI Cut Level". There is no fixed schema; the shape reflects whatever Grainger publishes for that specific item.Does `search_products` always return product listings?+
category_url string and an empty products array. Specific product names, model numbers, or Grainger SKUs reliably return product-level results.Does the API return customer reviews or Q&A content?+
Does the API support pagination for search results or subcategory product listings?+
search_products endpoint returns a single page of results for a query. Deep pagination across all products in a subcategory is not currently supported by these endpoints — get_subcategory_detail returns a total product_count and filter facets, but not the product listings themselves. You can fork the API on Parse and revise it to add paginated product listing support for subcategory URLs.