grainger.com APIgrainger.com ↗
Access Grainger's industrial supply catalog via API. Retrieve categories, subcategories, product search results, specs, and pricing across millions of SKUs.
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'
Get all top-level product categories from Grainger.com. Returns a flat list of category names, URLs, and URL slugs.
No input parameters required.
{
"type": "object",
"fields": {
"categories": "array of objects with name (string), url (string), and slug (string)"
},
"sample": {
"data": {
"categories": [
{
"url": "https://www.grainger.com/category/safety",
"name": "Safety",
"slug": "safety"
},
{
"url": "https://www.grainger.com/category/tools",
"name": "Tools",
"slug": "tools"
}
]
},
"status": "success"
}
}About the grainger.com 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.
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.
- 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 | 250 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.