The Grainger Search endpoint searches Grainger US (grainger.com) or Canada (grainger.ca) by keyword, category URL or path.
It returns product listings when available, plus category branches and suggested products. Browser rendering is used because Grainger pages need JavaScript and scroll to load listings.
Costs 2 credits per call.
GET https://api.piloterr.com/v2/grainger/search?query=carolina
GET https://api.piloterr.com/v2/grainger/search?query=carolina®ion=ca
GET https://api.piloterr.com/v2/grainger/search?query=https://www.grainger.com/category/abrasives
GET https://api.piloterr.com/v2/grainger/search?query=3FRU1
| Parameter |
Type |
Required |
Description |
query |
string |
yes |
Keyword, search/category URL, category path, or SKU |
region |
string |
no |
com (default, USD) or ca (CAD). Detected from a full URL |
return_page_source |
boolean |
no |
Return rendered HTML instead of JSON (default: false) |
| Field |
Type |
Description |
region |
string |
com or ca |
query |
string |
Search keyword when present in the URL |
url |
string |
Resolved page URL |
total_results |
number |
Product count when available |
results |
array |
Product listings (sku, title, url, price, currency) |
categories |
array |
Category branches (title, url) when the page shows them |
suggested_products |
array |
Suggested products when there is no direct match |
no_results |
boolean |
true when the page reports an empty search |
Empty values are omitted from the JSON response.
| Code |
Meaning |
400 |
Empty or invalid query |
404 |
Rendered page has no usable data |
500 |
Rendering failed |