# Zoro Search ## Overview | Property | Value | |----------|-------| | **Status** | active | | **Method** | `GET` | | **Endpoint** | `/v2/zoro/search` | | **Base URL** | `https://api.piloterr.com` | | **Credit Cost** | 2 credits per call | | **Documentation** | https://www.piloterr.com/library/zoro-search | ## Description Search Zoro by keyword or category URL. Returns product cards with USD price, brand, Zoro number, and pagination. ## Authentication - **Key Name:** `x-api-key` - **Location:** HTTP Header - **Get an API key:** https://app.piloterr.com/register ## Example Request ```bash curl --location --request GET 'https://api.piloterr.com/v2/zoro/search' \ --header 'Content-Type: application/json' \ --header 'x-api-key: YOUR_API_KEY' ``` ## Example Response ### BearKat (BK1) safety glasses ```json { "results": [ { "url": "https://www.zoro.com/mcr-safety-bearkat-bk1-safety-glasses-duramass-hard-coat-clear-lens-non-slip-temple-frameless-bk110/i/G2426514/", "brand": "Mcr Safety", "image": "https://www.zoro.com/static/cms/product/full/7e6737c8-0823-4e5f-9c53-2002b0476883.jpeg", "price": 1.39, "title": "BearKat (BK1), Safety Glasses, Duramass Hard Coat, Clear Lens, Non-Slip Temple, Frameless", "mfr_no": "BK110", "rating": 4.86, "zoro_no": "G2426514", "currency": "USD", "price_unit": "ea", "review_count": 49, "package_price": 16.68, "price_display": "$1.39", "package_quantity": 12, "package_price_display": "$16.68" } ], "pagination": { "next": "https://www.zoro.com/safety-glasses/c/6214/?q=safety+glasses&page=2", "page": 1, "per_page": 36, "total_pages": null, "total_results": 3000 } } ``` ## Documentation ## Overview Search the Zoro catalog on zoro.com by keyword or by a search or category URL. ## Quickstart Keyword ``` GET https://api.piloterr.com/v2/zoro/search?query=safety%20glasses ``` Page 2 ``` GET https://api.piloterr.com/v2/zoro/search?query=safety%20glasses&page=2 ``` Category URL ``` GET https://api.piloterr.com/v2/zoro/search?query=https://www.zoro.com/safety-glasses/c/6214/ ``` ## Parameters | Parameter | Type | Required | Default | What to pass | What changes in the JSON | |---|---|---|---|---|---| | `query` | string | yes | empty, which returns 400 | A keyword, a Zoro search URL, or a category URL | A keyword builds `/search?q=...`. Each card has `price` as a USD number and `price_display` as the dollar string. A product URL returns 400. | | `page` | integer | no | omit for page 1 | An integer from 1 | Page 2 adds `page=2`, sets `pagination.page` to 2, and returns the next cards. `pagination.next` is the next page URL, or null on the last page. | | `return_page_source` | boolean | no | false | `true` or `false` | `true` replaces `results` and `pagination` with `result`, the rendered HTML. | ## Response fields `price` is the unit amount. `price_display` is the label, such as `$1.39`. When the card is sold in multiples, `package_quantity`, `package_price`, and `package_price_display` are added. When Zoro prints an approximate count such as `3,000+`, `total_results` is that floor and `total_pages` is null. ## Use cases - Match a maintenance part to a Zoro number and unit price - Walk a category with `pagination.next` ## Error codes | Code | Meaning | |---|---| | 400 | Empty query, a non-Zoro URL, a product URL, or a page below 1 | | 404 | The page did not contain product cards | | 500 | The page could not be rendered |