# Grainger Scraper — Product Prices, SKU, Specs & Stock (`crawloop/grainger-scraper`) Actor

Grainger scraper for industrial MRO catalog data: product URLs, item # / SKU, keyword search and category listings. Extract item numbers, brand, list price, technical specs, images and availability — Grainger API alternative for procurement and MCP / Python / Node pipelines.

- **URL**: https://apify.com/crawloop/grainger-scraper.md
- **Developed by:** [Andrej Kiva](https://apify.com/crawloop) (community)
- **Categories:** E-commerce, AI, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.19 / 1,000 product results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Grainger Scraper — Product Prices, SKU, Specs & Stock

> **Industrial MRO catalog data** — Grainger product enrichment next to DigiKey and RS Online for procurement, price monitoring, and MRO / facilities workflows.

| DigiKey | RS Online | Grainger |
| :--- | :--- | :--- |
| [DigiKey Product Scraper](https://apify.com/crawloop/digikey-product-scraper) | [RS Online Scraper](https://apify.com/crawloop/rs-online-scraper) | **Grainger Scraper** ◄── you are here |

> **Disclaimer:** Unofficial Actor for publicly accessible Grainger product and catalog pages. **Grainger** and related names are trademarks of W.W. Grainger, Inc. Not affiliated with, sponsored by, or endorsed by W.W. Grainger. Provided for informational and research purposes only. You are responsible for complying with applicable laws and Grainger terms of use. Public list prices may differ from contract / account pricing.

Use this **Grainger scraper** as a **Grainger API alternative** to scrape **industrial MRO products** into clean JSON. Look up **product URLs**, **Grainger item # (SKU)**, **keywords / manufacturer part numbers**, or **category listings**, then export **item number**, **brand**, **list price**, **technical specifications**, **images**, **UNSPSC**, and **availability** for **Python**, **Node.js**, and **MCP** / AI assistants.

Ideal for procurement teams, MRO price monitoring, CMMS / ERP catalog sync, and multi-distributor sourcing pipelines alongside DigiKey and RS Online.

***

### Key Features

- **Grainger product scraper** — enrich PDPs from product detail URLs
- **SKU / item # lookup** — resolve Grainger item numbers to full product records
- **Keyword search** — catalog queries and manufacturer part-number searches
- **Category crawl** — paginated `/category/…` assortment harvest
- **Optional PDP enrich** — upgrade listing rows to full specs + price
- **Specs map** — technical attributes as key/value pairs and attribute rows
- **Hardened browser path** — Camoufox + sticky residential for public catalog pages
- **Region-aware base URL** — US or Canada storefront host

***

### Use Cases

| Use case | What you get | Why it helps |
| :--- | :--- | :--- |
| **MRO price monitoring** | Item #, brand, list price | Track industrial supply unit costs over time |
| **SKU / catalog enrichment** | Specs, images, UNSPSC, model | Fill ERP / CMMS product master data |
| **Assortment harvest** | Category / search listing rows | Build safety, electrical, abrasives shortlists |
| **Cross-distributor compare** | Same model / MPN vs DigiKey / RS | Multi-source procurement research |
| **Facilities / maintenance sourcing** | Public availability signals | Spot stock cues before ordering |

***

### When to use this Actor

- You need a **Grainger product scraper** for item #, brand, list price, and specs
- Batch **SKU enrichment** or **keyword / category** crawls for MRO assortment
- Export dataset JSON into Python, Node.js, or MCP agents for procurement workflows

### When not to use this Actor

- **Contract / punchout / EDI** enterprise pricing that requires a Grainger account
- **Cart / checkout / quote** automation
- Other distributors — use sibling Actors for DigiKey / RS Online / Rockwell

***

### Input Parameters

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `productUrls` | Array | — | Grainger product detail URLs |
| `skus` | Array | — | Grainger item # / SKU list |
| `keywords` | Array | — | Catalog keyword or MPN queries |
| `categoryUrls` | Array | — | Category listing URLs (or bare paths) |
| `maxItems` | Integer | `50` | Maximum billable dataset items |
| `maxPages` | Integer | `1` | Max listing pages per query/URL (1–40) |
| `enrichListingProducts` | Boolean | `false` | Fetch full PDP for each listing row |
| `baseUrl` | String | `https://www.grainger.com` | Regional storefront |
| `requestDelaySecs` | Number | `1.5` | Delay between HTML navigations |
| `browserEngine` | String | `auto` | `auto` / `camoufox` / `firefox` |
| `proxyConfiguration` | Object | Residential US | Sticky RESIDENTIAL required for stable access |

#### Input Example — PDP + SKU

```json
{
  "productUrls": [
    "https://www.grainger.com/product/SQUARE-D-Terminal-Block-End-Barrier-5B359"
  ],
  "skus": ["5B359", "3FRU1"],
  "maxItems": 25,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "US"
  }
}
```

#### Input Example — category / keyword listings

```json
{
  "keywords": ["nitrile gloves"],
  "categoryUrls": ["safety/eye-face-protection"],
  "maxItems": 100,
  "maxPages": 3,
  "enrichListingProducts": false
}
```

***

### Output Format

| `recordType` | Meaning |
| :--- | :--- |
| `product` | Full product enrichment |
| `listing` | Search or category row |
| `error` | Fetch or parse failure |

#### Key product fields

| Field | Description |
| :--- | :--- |
| `sku` / `productId` | Grainger item number |
| `manufacturerProductNumber` | Manufacturer model / MPN |
| `brand` | Brand name |
| `title` | Product title |
| `unitPrice` / `unitPriceValue` | List price text + parsed number |
| `currency` | ISO currency when known |
| `availability` / `inStock` | Public stock signal when present |
| `specifications` | Technical key/value map |
| `attributes` | Specs as `{name, value}` rows |
| `breadcrumb` | Category path |
| `images` | Image URLs |
| `unspsc` | UNSPSC when published |

#### Output Example

```json
{
  "source": "grainger",
  "recordType": "product",
  "url": "https://www.grainger.com/product/SQUARE-D-Terminal-Block-End-Barrier-5B359",
  "sku": "5B359",
  "productId": "5B359",
  "manufacturerProductNumber": "9080GP6B",
  "brand": "SQUARE D",
  "title": "SQUARE D Terminal Block End Barrier: Natural, DIN Rail Mount",
  "unitPrice": "$2.74",
  "unitPriceValue": 2.74,
  "currency": "USD",
  "unspsc": "39121410",
  "specifications": {
    "Color": "Natural",
    "Material": "Nylon",
    "Mounting Type": "DIN Rail Mount"
  },
  "images": ["https://static.grainger.com/rp/s/is/image/Grainger/5B361_AS01"],
  "scrapedAt": "2026-08-10T08:00:00Z"
}
```

***

### Integration examples

#### Node.js

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('crawloop/grainger-scraper').call({
  skus: ['5B359'],
  maxItems: 10,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("crawloop/grainger-scraper").call(
    run_input={"skus": ["5B359"], "maxItems": 10}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/crawloop~grainger-scraper/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"skus":["5B359"],"maxItems":10}'
```

***

### MCP and AI assistants

Use this Actor from AI tools via [Apify MCP](https://docs.apify.com/platform/integrations/mcp). Connect your Apify account, then call `crawloop/grainger-scraper`.

Example prompts:

- "Run Grainger Scraper for item 5B359 and return brand, list price, UNSPSC, and specifications"
- "Scrape Grainger category safety/eye-face-protection for 50 listing rows as JSON"
- "Chain DigiKey Product Scraper then Grainger Scraper to compare distributor prices for the same MPN"

***

### Suite next step

After Grainger enrichment, compare electronics / industrial distributor coverage with [DigiKey Product Scraper](https://apify.com/crawloop/digikey-product-scraper) or [RS Online Scraper](https://apify.com/crawloop/rs-online-scraper). For automation OEM parts, continue with [Rockwell Product Scraper](https://apify.com/crawloop/rockwell-product-scraper).

***

### FAQ

**Is this a Grainger API?**\
No. It is an unofficial **Grainger API alternative** that scrapes publicly visible catalog pages into a structured dataset.

**Do I need a Grainger account?**\
No for public list-price / catalog fields. Contract prices and account-only stock are out of scope.

**Can I scrape Grainger with Python or Node.js?**\
Yes — use the Apify client examples above, or call the Actor from MCP / AI assistants.

**Why residential proxy?**\
Public catalog pages are bot-protected. Sticky Apify RESIDENTIAL US (or CA) sessions are required for reliable access.

**Why did my broad keyword return few products or an error?**\
Some broad queries redirect to a category hub. Use a more specific keyword, an item #, or a `categoryUrls` path.

**Listing vs product records?**\
`listing` rows come from search/category pages. Enable `enrichListingProducts` (or pass `productUrls` / `skus`) for full PDP fields including richer specs and prices.

***

### Related Actors

- [DigiKey Product Scraper](https://apify.com/crawloop/digikey-product-scraper)
- [RS Online Scraper](https://apify.com/crawloop/rs-online-scraper)
- [Rockwell Product Scraper](https://apify.com/crawloop/rockwell-product-scraper)

# Actor input Schema

## `productUrls` (type: `array`):

Grainger product detail page URLs (…/product/…-{SKU}).

## `skus` (type: `array`):

Grainger item # / SKU values (e.g. 5B359). Resolved via search then enriched from the PDP when possible.

## `keywords` (type: `array`):

Catalog keyword or manufacturer part-number searches.

## `categoryUrls` (type: `array`):

Grainger /category/… URLs (or bare category paths like safety/eye-face-protection).

## `maxItems` (type: `integer`):

Stop after this many billable dataset items (product / listing).

## `maxPages` (type: `integer`):

Maximum listing pages per keyword or category URL.

## `enrichListingProducts` (type: `boolean`):

When scraping search/category listings, also fetch full PDP data for each row.

## `baseUrl` (type: `string`):

Grainger host for HTML scraping (US .com or Canada .ca).

## `requestDelaySecs` (type: `number`):

Pause between HTML navigations on the same browser session.

## `browserEngine` (type: `string`):

Camoufox is preferred against DataDome; Firefox is the fallback when Camoufox is unavailable.

## `proxyConfiguration` (type: `object`):

Apify Proxy settings. Sticky RESIDENTIAL US is strongly recommended — Grainger blocks datacenter and naive HTTP.

## Actor input object example

```json
{
  "productUrls": [
    "https://www.grainger.com/product/SQUARE-D-Terminal-Block-End-Barrier-5B359"
  ],
  "skus": [
    "5B359",
    "3FRU1"
  ],
  "maxItems": 50,
  "maxPages": 1,
  "enrichListingProducts": false,
  "baseUrl": "https://www.grainger.com",
  "requestDelaySecs": 1.5,
  "browserEngine": "auto",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Default dataset items.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "productUrls": [
        "https://www.grainger.com/product/SQUARE-D-Terminal-Block-End-Barrier-5B359"
    ],
    "skus": [
        "5B359",
        "3FRU1"
    ],
    "baseUrl": "https://www.grainger.com",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawloop/grainger-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "productUrls": ["https://www.grainger.com/product/SQUARE-D-Terminal-Block-End-Barrier-5B359"],
    "skus": [
        "5B359",
        "3FRU1",
    ],
    "baseUrl": "https://www.grainger.com",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("crawloop/grainger-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "productUrls": [
    "https://www.grainger.com/product/SQUARE-D-Terminal-Block-End-Barrier-5B359"
  ],
  "skus": [
    "5B359",
    "3FRU1"
  ],
  "baseUrl": "https://www.grainger.com",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call crawloop/grainger-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawloop/grainger-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Cyi1fcXhI2N1aENXC/builds/pYnLwe6SkhQ8hFE26/openapi.json
