# Grainger Scraper - $3 / 1000 Items (`scrapeunblocker/grainger-scraper`) Actor

Scrape Grainger industrial supplies: item number, brand, manufacturer model, Web Price, status and attributes for each search term, or one item with its unit, full specifications, UNSPSC, documents and alternates. $3 per 1000 items.

- **URL**: https://apify.com/scrapeunblocker/grainger-scraper.md
- **Developed by:** [Scrapeunblocker](https://apify.com/scrapeunblocker) (community)
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Grainger Scraper

Scrape **Grainger** (grainger.com, US industrial supplies) as clean JSON. Get the **search results** Grainger shows for a keyword or manufacturer model, or **item details** in full. Every search result comes with the **Grainger item number**, title, **brand**, **manufacturer model**, link and image, Grainger's signed-out **Web Price** (with the was-price on a sale), the sales **status** and the item's **attributes** (thread size, voltage, material...). Item details add the **unit** (e.g. pkg. of 100), quantity price breaks, the full **specifications** including **UNSPSC** and country of origin, description, **documents** (spec sheets, drawings), alternate items and the category path.

### Features

- **Search mode** - Grainger's first result rows for each search term (up to 25 items, in Grainger's order), with the category Grainger chose for the keyword and the other matching categories with their result counts (in the `LISTINGS` record).
- **Product mode** - one item per input (`products`: item number or product link) with unit, specifications, documents and alternates.
- **Many inputs per run** - search terms or items in parallel.

### Use cases

- **MRO price benchmarks** - Grainger's Web Price for the parts you buy.
- **Part cross-reference** - item numbers, manufacturer models and alternates.
- **Catalogue enrichment** - specifications, UNSPSC codes, images and spec sheets.
- **Assortment research** - which brands and how many items Grainger carries in a category.

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `mode` | string | `search` | `search` or `product`. |
| `queries` | array | `safety glasses` | Search terms or manufacturer models (search mode). |
| `products` | array | - | Grainger item numbers or product links (product mode). |
| `maxResults` | integer | `25` | Items per search term (1-25). |
| `concurrency` | integer | `2` | Inputs processed at the same time (1-3). |

#### Example input

```json
{
  "mode": "search",
  "queries": ["hex bolt", "nitrile gloves"],
  "maxResults": 25
}
```

### Output

One dataset item per item, with the input it came from. A search item (specifications shortened):

```json
{
  "mode": "search",
  "input": "cordless drill",
  "position": 1,
  "sku": "250TJ0",
  "productId": 6200036,
  "title": "BOSCH Drill Kit: Subcompact, 3/8 in Chuck, 1,750 RPM Max., Brushless, Battery Included, (2) 2.0 Ah",
  "brand": "BOSCH",
  "manufacturerModel": "GSR12V-300B22",
  "url": "https://www.grainger.com/product/BOSCH-Drill-Kit-Subcompact-250TJ0",
  "image": "https://static.grainger.com/rp/s/is/image/Grainger/250TJ0_AS01",
  "status": "Sellable",
  "price": 261.96,
  "priceLabel": "Web Price",
  "priceType": "REGULAR",
  "wasPrice": null,
  "quantityPricing": [],
  "currency": "USD",
  "specifications": [
    { "name": "Speed - Maximum", "value": "1,750 RPM" },
    { "name": "Brand", "value": "BOSCH" },
    { "name": "Motor Type", "value": "Brushless" }
  ]
}
```

A product-mode item adds `unitOfMeasure`, `discontinued`, `sellInfo`, `shippingWeight`, `description`, the full `specifications` (with UNSPSC and country of origin), `images`, `documents`, `alternateSkus` and `breadcrumbs`.

### Pricing

**$3 per 1000 items** (pay per result). A search term or item that returns nothing (no match, an unknown item number) is listed in the `ERRORS` record of the key-value store and is not charged.

### Notes

- Prices are Grainger's signed-out Web Price; an account may see its own contract price.
- Stock is not included: Grainger checks it per ZIP code at checkout.
- A broad keyword that Grainger sends to a department page (which lists categories, not items) returns no items; search a more specific term.

Built on the [ScrapeUnblocker](https://www.scrapeunblocker.com) API.

# Actor input Schema

## `mode` (type: `string`):

Search: Grainger's first result rows for each search term (up to 25 items) with brand, manufacturer model, Web Price and attributes. Product: one item each, with the unit, full specifications, documents and alternates.

## `queries` (type: `array`):

Used when What to scrape = Search. A keyword or manufacturer model, e.g. safety glasses, hex bolt, ball valve. One per line.

## `products` (type: `array`):

Used when What to scrape = Product. Grainger item numbers (1XE81) or product links (https://www.grainger.com/product/Hex-Head-Cap-Screw-Stainless-1XE81). One per line.

## `maxResults` (type: `integer`):

Upper limit of items for each search term (1-25; Grainger's first result rows).

## `concurrency` (type: `integer`):

How many search terms or products to process at the same time (1-3).

## Actor input object example

```json
{
  "mode": "search",
  "queries": [
    "safety glasses"
  ],
  "maxResults": 10,
  "concurrency": 2
}
```

# Actor output Schema

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

One item per product with the input it came from and, for a search, its position

## `listings` (type: `string`):

Per search term: the category Grainger chose, its result count and the other matching categories

## `errors` (type: `string`):

Inputs that returned no products (no match, unknown product, blocked), with the reason (not billed)

# 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 = {
    "queries": [
        "safety glasses"
    ],
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapeunblocker/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 = {
    "queries": ["safety glasses"],
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("scrapeunblocker/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 '{
  "queries": [
    "safety glasses"
  ],
  "maxResults": 10
}' |
apify call scrapeunblocker/grainger-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapeunblocker/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/JAgb7p5HWbGMghEa9/builds/0r6Ee7SeZ3oSse8Xo/openapi.json
