Piloterr

Grainger Search

GET
/v2/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
headerx-api-key<token>

Your API key. Include it in the x-api-key header for every request.

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:

Example: ca

return_page_source?boolean

When true, return rendered HTML as {"result": "..."} instead of JSON. Defaults to false.

Response Body

Successful response

application/json
  1. response
url?string
query?string
region?string
categories?array<>
total_results?integer
Example Request
curl -X GET 'https://api.piloterr.com/v2/grainger/search?query=string'
Example Response
{  "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}