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
ApiKeyAuthx-api-key<token>Your API key. Include it in the x-api-key header for every request.
query*stringKeyword, 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?stringGrainger 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?booleanWhen true, return rendered HTML as {"result": "..."} instead of JSON. Defaults to false.
fields?stringComma-separated list of response fields to return, with dot notation for nested fields (e.g. name,location.city).
is_async?booleanRun the request as a background job: the API answers 202 with a job_id to poll on GET /v1/jobs/{id}.
falsesoft_fail?booleanReturn HTTP 200 even when the request fails; the error is in the error field of the body.
falseSuccessful response
application/json- response
url?stringquery?stringregion?stringcategories?array<>total_results?integercurl -X GET 'https://api.piloterr.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}