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
Authorization
ApiKeyAuth x-api-key<token>
Your API key. Include it in the x-api-key header for every request.
In: header
Query Parameters
query*string
Keyword, full Grainger search/category URL, category path, or SKU.
Examples:
carolina
https://www.grainger.com/search?searchQuery=carolina&searchBar=true
https://www.grainger.com/category/abrasives
category/abrasives
3FRU1
A 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.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -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
}{
"error": "Bad Request"
}{
"error": "Invalid API Key"
}{
"error": "Payment required"
}{
"error": "Rate limit exceeded for the API key: quota monthly"
}{
"error": "Internal Error"
}