# Grainger API

> Grainger returns industrial supply product details and public USD list prices as a workflow and API.

Grainger, also known as W.W. Grainger, returns product details and public USD list prices through Search products. Search products takes product words or a Grainger item number, with an optional maximum number of products.

- Page: https://fous.com/workflows/grainger
- Handle: `@grainger`
- Category: [Commerce](https://fous.com/workflows/category/commerce)
- Source website: https://grainger.com
- Last verified: Sep 29, 2026
- Fous is not affiliated with Grainger.

## Methods

### Search products

Operation `search_products`, version 1. 1 credit per call.

Search Grainger supplies by words or item number and get product details and public USD list prices in site order. Category searches currently expose only the first 25 products; availability depends on the public price display.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `query` | string | yes | `"nomatchesqjzxqv99"` | Product words or Grainger item number, such as safety glasses or 4VCH6. |
| `max_results` | integer | no | `3` | Maximum number of products, such as 12. Category pages may show only the first 25. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "query"
  ],
  "properties": {
    "query": {
      "type": "string",
      "description": "Product words or Grainger item number, such as safety glasses or 4VCH6.",
      "examples": [
        "nomatchesqjzxqv99",
        "paper towels",
        "4VCH6"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 24,
      "maximum": 48,
      "minimum": 1,
      "description": "Maximum number of products, such as 12. Category pages may show only the first 25.",
      "x-fous-developer": true,
      "examples": [
        3
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "query": "nomatchesqjzxqv99"
    },
    {
      "query": "paper towels",
      "max_results": 3
    },
    {
      "query": "4VCH6"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `products` | array |  |  |
| `products[].brand` | string or null | `"SCOTT"` |  |
| `products[].price` | number or null | `90.67` |  |
| `products[].currency` | string | `"USD"` |  |
| `products[].image_link` | string or null | `"https://static.grainger.com/rp/s/is/image/Grainger/58671_P01__HFMQ_v2"` |  |
| `products[].price_unit` | string or null | `"pack of 6"` |  |
| `products[].availability` | string or null | `"In Stock"` |  |
| `products[].product_link` | string | `"https://www.grainger.com/product/SCOTT-Paper-Towels-Brown-413ZH3"` |  |
| `products[].product_name` | string or null | `"SCOTT Paper Towels: Brown, 8 in Roll Wd, 900 ft Roll Lg, 1 3/4 in Core Dia, Absorbent"` |  |
| `products[].key_attributes` | array |  |  |
| `products[].grainger_item_number` | string | `"413ZH3"` |  |
| `products[].manufacturer_model_number` | string or null | `"58671"` |  |

**Example input**

```json
{
  "query": "nomatchesqjzxqv99"
}
```

**Example output**

```json
{
  "products": []
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@grainger",
  "visibility": "public",
  "operation": "search_products",
  "version": 1,
  "input": {
    "query": "nomatchesqjzxqv99"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@grainger\",\n  \"visibility\": \"public\",\n  \"operation\": \"search_products\",\n  \"version\": 1,\n  \"input\": {\n    \"query\": \"nomatchesqjzxqv99\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@grainger",
  "visibility": "public",
  "operation": "search_products",
  "version": 1,
  "input": {
    "query": "nomatchesqjzxqv99"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@grainger","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Find supplies by product name or item number
- Compare public list prices across products
- Review product brands, availability, and key attributes
- Collect manufacturer model numbers for purchasing research

## FAQ

### Is Fous affiliated with Grainger?

No. Fous is not affiliated with Grainger. This workflow reads the public grainger.com website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a Grainger account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from grainger.com when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### What products match a search term or item number?

Search products returns matching product names, brands, item numbers, and other product details.

### What public list prices are shown for products?

Search products returns public USD list prices and price units when displayed.

### Which products are available?

Search products returns availability information when shown for a product.

## Related

- [Walmart API](https://fous.com/workflows/walmart.md): Walmart helps shoppers find products from Walmart and marketplace sellers, view details, prices, ratings and reviews; availability uses Walmart’s default location, not ZIP codes.
- [Costco API](https://fous.com/workflows/costco.md): Costco returns US product prices/details and warehouse hours/services/gas prices; delivery affects availability, member prices may be hidden, and posted gas and holiday hours may differ.
- [Lowe's API](https://fous.com/workflows/lowes.md): Lowe’s offers home improvement products and supplies, with current prices, ratings, specifications, images, and nearby-store pickup availability; delivery estimates and aisle details appear when available.
- [Home Depot API](https://fous.com/workflows/home-depot.md): Home Depot offers home improvement products with prices, ratings, availability, and delivery options, plus nearby stores’ distances, regular hours, and services; holiday hours may differ and coverage varies.
- [Thomasnet API](https://fous.com/workflows/thomasnet.md): Find North American industrial suppliers.
- [Amazon API](https://fous.com/workflows/amazon.md): Amazon returns publicly shown product listings, prices, details, ratings, reviews, current best sellers, and Today's Deals; availability and content vary by store, location, and access.
- [Best Buy API](https://fous.com/workflows/best-buy.md): Best Buy returns US electronics and appliance listings, prices, deals, specifications, images, reviews, and nearby store pickup and shipping details; prices and availability can change by location and before checkout.
- [Aldi API](https://fous.com/workflows/aldi.md): Search groceries and prices at ALDI US.
- [All Commerce workflows](https://fous.com/workflows/category/commerce)
