Discover/Grainger API
live

Grainger APIgrainger.com

Access Grainger's industrial supply catalog via API. Retrieve categories, subcategories, product search results, specs, and pricing across millions of SKUs.

Endpoint health
verified 7d ago
get_all_top_level_categories
get_category_subcategories
get_subcategory_detail
search_products
get_product_details
5/5 passing latest checkself-healing
Endpoints
5
Updated
21d ago

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.

Try it

No input parameters required.

api.parse.bot/scraper/790ef36d-29a9-4b59-b132-59923c47f4a0/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
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'
Python SDK · recommended

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)
All endpoints · 5 totalmissing one? ·

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.

Input

No input parameters required.

Response
{
  "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.

Reliability & maintenanceVerified

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.

Last verified
7d ago
Latest check
5/5 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a parts sourcing tool that maps manufacturer part numbers to Grainger SKUs and current unit prices using search_products and get_product_details.
  • Populate an internal procurement catalog by walking the category tree with get_all_top_level_categories and get_category_subcategories.
  • Generate faceted search filters for a custom procurement UI using the filters array from get_subcategory_detail.
  • Monitor price changes on specific industrial SKUs by polling get_product_details with stored product URLs.
  • Extract technical specifications (material, dimensions, ratings) from get_product_details to feed product comparison tables.
  • Estimate category coverage and assortment size for supplier analysis using product_count from get_subcategory_detail.
  • Route part-number lookups to exact product pages by passing Grainger or manufacturer part numbers to search_products.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 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.

Frequently asked questions
Does Grainger have an official developer API?+
Grainger offers an eProcurement integration program and an EDI/punchout catalog service for enterprise customers, documented at grainger.com/content/supplylink-eprocurement-solutions. These are business-agreement programs, not self-serve developer APIs. The Parse API provides programmatic access to catalog data without an enterprise contract.
What does `get_product_details` return in the specifications field?+
The 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?+
Not always. Broad or category-level queries (e.g. "safety gloves") can redirect to a parent category page instead of a product list. In those cases the response includes a 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?+
Not currently. The API covers product specifications, pricing, brand, SKU, category structure, and filter facets — but not user reviews, review counts, or Q&A data. You can fork the API on Parse and revise it to add an endpoint that retrieves review content for a given product URL.
Does the API support pagination for search results or subcategory product listings?+
The 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.
Page content last updated . Spec covers 5 endpoints from grainger.com.
Related APIs in EcommerceSee all →
graybar.com API
Search and discover electrical products on Graybar by name, SKU, or manufacturer part number, and view detailed specifications including pricing and availability.
screwfix.com API
Access Screwfix's full product catalog — browse category hierarchies, retrieve paginated product listings with pricing and ratings, fetch detailed product specifications, and search by keyword. Ideal for price monitoring, product research, and catalog analysis.
mouser.com API
mouser.com API
lowes.com API
Search and browse products from Lowe's, including product listings by category, detailed product information, and pricing. Retrieve comprehensive details on specific items to compare options and make informed purchasing decisions.
cityelectricsupply.com API
Search and browse City Electric Supply's product catalog across categories, view detailed product information with localized pricing and inventory based on a ZIP code, and manage a shopping cart. Access product details and real-time stock availability for any area.
menards.com API
Search Menards' complete product catalog across lumber, building materials, and all categories while viewing real-time pricing, sale prices, rebates, and final values. Browse by category or use search suggestions to find exactly what you need with full pricing transparency.
industrynet.com API
Find industrial suppliers and browse product categories across a comprehensive marketplace directory. Connect directly with suppliers by viewing detailed listings and submitting contact inquiries programmatically.
mcmaster.com API
Search McMaster-Carr's industrial supply catalog to discover products by category, view detailed listings with part numbers and prices, and apply filters to find exactly what you need. Look up specific part numbers to get complete product information and pricing in seconds.