Grainger Search
Search Grainger US or Canada by keyword, category URL or SKU. Returns product listings, category branches and suggestions via browser rendering.
Credit cost: 2 credits per call
Authentification
ApiKeyAuth x-api-key<token>
Your API key. Include it in the x-api-key header for every request.
In: header
Paramètres de requête
query*string
Keyword, full Grainger search/category URL, category path, or SKU.
Examples:
carolinahttps://www.grainger.com/search?searchQuery=carolina&searchBar=truehttps://www.grainger.com/category/abrasivescategory/abrasives3FRU1A full Grainger URL auto-detects region.
region?string
Grainger country when query is not a full URL (default: com).
Supported:
com→ www.grainger.com, USDca→ www.grainger.ca, CAD
Example: ca
return_page_source?boolean
When true, return rendered HTML as {"result": "..."} instead of JSON. Defaults to false.
Corps de la réponse
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v2/grainger/search?query=string"{ "url": "https://www.grainger.com/search?searchQuery=carolina&searchBar=true", "query": "carolina", "region": "com", "categories": [ { "url": "https://www.grainger.com/category/safety/footwear-footwear-accessories/safety-toe-work-boots-shoes", "title": "Close Match Safety-Toe Work Boots & Shoes" }, { "url": "https://www.grainger.com/category/safety/footwear-footwear-accessories/plain-toe-work-boots-shoes", "title": "Plain-Toe Work Boots & Shoes" } ], "total_results": 0}{ "error": "Bad Request"}{ "error": "Invalid API Key"}{ "error": "Payment required"}{ "error": "Rate limit exceeded for the API key: quota monthly"}{ "error": "Internal Error"}