> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrapeunblocker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Scrape Grainger product search

> Searches Grainger (grainger.com, US industrial supplies) for `query` and returns Grainger's first result rows (up to 25 items, in Grainger's order) as `products`: `position`, `sku` (Grainger item number), `productId`, `title`, `brand`, `manufacturerModel`, `url`, `image`, `price` (Grainger's signed-out Web Price), `priceLabel`, `priceType`, `wasPrice`, `quantityPricing`, `currency`, `status` (e.g. Sellable) and `specifications` (name / value, e.g. thread size, voltage, material). Grainger answers a keyword with the product category that matches it best: `category` names it, `totalResults` counts that category's matches, and `categories` lists the other matching categories with counts and links (search one of them by passing its link as `url`). A keyword that leads to a department page (subcategory tiles, no products) is answered from the subcategory holding the product line that matches it most often: `category` names that subcategory, `totalAcrossCategories` counts the department and `categories` lists its subcategories. Only the first result rows are returned (no paging). Stock is not included: Grainger checks it per ZIP code after the page loads.



## OpenAPI

````yaml /api-reference/openapi.json post /marketplace/grainger-search
openapi: 3.1.0
info:
  title: ScrapeUnblocker API
  description: >-
    Public API for the ScrapeUnblocker proxy/anti-bot service. Authenticate
    every request with the `x-scrapeunblocker-key` header. Documented here:
    page-source extraction, Google SERP scraping, image fetch, and the dedicated
    plugin endpoints (search engines, marketplaces, reviews, travel, social and
    more). All other paths exist for internal operations and are intentionally
    hidden from this spec.
  version: 3.0.0
servers:
  - url: https://api.scrapeunblocker.com
    description: Production
security: []
paths:
  /marketplace/grainger-search:
    post:
      tags:
        - Plugins
      summary: Scrape Grainger product search
      description: >-
        Searches Grainger (grainger.com, US industrial supplies) for `query` and
        returns Grainger's first result rows (up to 25 items, in Grainger's
        order) as `products`: `position`, `sku` (Grainger item number),
        `productId`, `title`, `brand`, `manufacturerModel`, `url`, `image`,
        `price` (Grainger's signed-out Web Price), `priceLabel`, `priceType`,
        `wasPrice`, `quantityPricing`, `currency`, `status` (e.g. Sellable) and
        `specifications` (name / value, e.g. thread size, voltage, material).
        Grainger answers a keyword with the product category that matches it
        best: `category` names it, `totalResults` counts that category's
        matches, and `categories` lists the other matching categories with
        counts and links (search one of them by passing its link as `url`). A
        keyword that leads to a department page (subcategory tiles, no products)
        is answered from the subcategory holding the product line that matches
        it most often: `category` names that subcategory,
        `totalAcrossCategories` counts the department and `categories` lists its
        subcategories. Only the first result rows are returned (no paging).
        Stock is not included: Grainger checks it per ZIP code after the page
        loads.
      operationId: grainger_search_marketplace_grainger_search_post
      parameters:
        - name: query
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              What to search, e.g. 'safety glasses', 'hex bolt', 'cordless
              drill' or a manufacturer model.
            title: Query
          description: >-
            What to search, e.g. 'safety glasses', 'hex bolt', 'cordless drill'
            or a manufacturer model.
        - name: max_results
          in: query
          required: false
          schema:
            type: integer
            description: >-
              Items to return (1-25); Grainger's first result rows for the
              keyword.
            default: 25
            title: Max Results
          description: >-
            Items to return (1-25); Grainger's first result rows for the
            keyword.
        - name: url
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Instead of `query`: a Grainger search link, e.g.
              https://www.grainger.com/search?searchQuery=hex+bolt.
            title: Url
          description: >-
            Instead of `query`: a Grainger search link, e.g.
            https://www.grainger.com/search?searchQuery=hex+bolt.
      responses:
        '200':
          description: JSON with a `products` array, the category and totals.
          content:
            application/json:
              schema: {}
        '400':
          description: Invalid parameters.
        '404':
          description: Grainger found no products for this search.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '502':
          description: >-
            Blocked by Grainger on every attempt, no results returned, or the
            call did not finish in time.
      security:
        - ScrapeUnblockerKey: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ScrapeUnblockerKey:
      type: apiKey
      in: header
      name: x-scrapeunblocker-key
      description: Your ScrapeUnblocker API key. Apply on every request.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.