# Agri Supply Scraper (`crawlerbros/agri-supply-scraper`) Actor

Scrape Agri Supply (agrisupply.com) - US farm, ranch & tractor supply retail. Search by keyword, browse curated categories & brands, or fetch by product URL. Full details: price, rating, reviews, specs, images, availability, SKU, category.

- **URL**: https://apify.com/crawlerbros/agri-supply-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Automation, E-commerce, Developer tools
- **Stats:** 2 total users, 1 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 and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

## Agri Supply Scraper

Scrape **Agri Supply** (agrisupply.com) — one of the largest US farm, ranch, tractor and country-store retailers. Search by keyword, browse curated categories and brands, or fetch products by URL, and get full product detail: prices (regular, sale and was-price), price per unit, ratings, review counts, descriptions, specifications, part numbers, image galleries, live availability and per-store inventory.

### What this actor does

- **Three modes:** `search` (keyword), `browseByCategory` (curated category or brand), `byUrl` (direct product links)
- **Full product detail:** name, SKU, brand, current price, was-price, sale price, price per unit (EA, BG, GL, …), rating, review count, description, specifications, part number, category path, image gallery
- **Live availability:** In stock / Temporarily out of stock per product, plus optional per-store inventory (store, quantity, in-store location)
- **Filters:** brand, category, min/max price, min rating, keyword-in-name/description
- **Sort options:** relevance, price low-high / high-low, name A-Z / Z-A, customer rating
- **Empty fields are omitted** — no `null` values in the dataset

### Output per product

- `name` — product title
- `sku` — Agri Supply item number (e.g. `112137`)
- `brand` — brand (e.g. `Carolina Cooker`, `Tarter`)
- `price` — current price in USD (sale price when on sale)
- `currencyCode` — always `USD`
- `priceUnit` — unit of measure (EA, BG, GL, 5G, …)
- `wasPrice` — original price when on sale
- `salePrice` — sale price when on sale
- `rating` — average customer rating (0–5)
- `reviewCount` — number of customer reviews
- `description` — short product description
- `specifications[]` — spec bullet list
- `partNumber` — manufacturer part number when listed
- `categories[]`, `categoryPath` — category breadcrumb (e.g. `Agricultural & Tillage > Agricultural & Parts > Tractor Seats`)
- `categoryIds[]` — category IDs from the breadcrumb
- `imageUrl` — main product image (xxl jpg)
- `images[]` — main + alternate gallery images
- `availability` — `In stock`, `Temporarily out of stock`, etc.
- `purchasable` — whether the item can be added to cart
- `storeAvailability[]` — per-store inventory `{store, quantity, location}` (when enabled)
- `productUrl`, `sourceUrl` — canonical product page URL
- `recordType: "product"`, `scrapedAt` — UTC ISO timestamp

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `search` | `search` / `browseByCategory` / `byUrl` |
| `searchQuery` | string | `tractor seat` | Free-text keyword query (mode=search) |
| `category` | select | – | Curated category or brand page (mode=browseByCategory); post-fetch category filter in other modes |
| `productUrls` | array | – | Product URLs to fetch (mode=byUrl) |
| `sortBy` | select | `score` | Relevance, price, name, rating ordering (mode=search, browseByCategory) |
| `brand` | select | – | Keep only products by this brand |
| `minPrice` | number | – | Drop products below this price (USD) |
| `maxPrice` | number | – | Drop products above this price (USD) |
| `minRating` | number | – | Drop products rated below this (0–5) |
| `containsKeyword` | string | – | Keep only products whose name or description contains this text |
| `includeDetails` | boolean | `true` | Fetch full detail pages (description, specs, reviews, images, availability) |
| `includeStoreAvailability` | boolean | `false` | Fetch per-store inventory for every product |
| `maxItems` | int | `50` | Hard cap (1–1000) |
| `proxyConfiguration` | object | off | Optional; only engaged if the site starts blocking |

#### Example: keyword search

```json
{
  "mode": "search",
  "searchQuery": "tractor seat",
  "maxItems": 20
}
```

#### Example: browse a category with filters

```json
{
  "mode": "browseByCategory",
  "category": "2200000",
  "sortBy": "price-lh",
  "minPrice": 20,
  "maxPrice": 200,
  "maxItems": 50
}
```

#### Example: weekly sale specials with store inventory

```json
{
  "mode": "browseByCategory",
  "category": "1690000",
  "includeStoreAvailability": true,
  "maxItems": 25
}
```

#### Example: fetch specific products by URL

```json
{
  "mode": "byUrl",
  "productUrls": [
    "https://www.agrisupply.com/tractor-seat-black-w-slide-/p/112137/",
    "https://www.agrisupply.com/drum-mower-45-bellonmit/p/123002/"
  ]
}
```

#### Example: brand-only results

```json
{
  "mode": "search",
  "searchQuery": "sprayer",
  "brand": "Fimco",
  "containsKeyword": "12v",
  "maxItems": 30
}
```

### Use cases

- **Price monitoring** — track regular vs sale prices and was-price discounts on farm equipment, fencing, tools and parts
- **Competitive intelligence** — catalog Agri Supply's assortment and pricing across categories and brands
- **Retail analytics** — review ratings, review counts and availability to gauge demand signals per SKU
- **Inventory research** — per-store stock levels for regional supply planning
- **Marketplace enrichment** — product descriptions, specifications, part numbers and images for downstream catalogs

### Data Source

This actor scrapes **https://www.agrisupply.com/** — the public retail website of Agri Supply Co. (Micro, North Carolina, USA), a family-owned US farm & tractor supply chain. All data comes from the public website's server-rendered pages and its public price/inventory endpoint. No login, no cookies, no API keys required. Data is as fresh as the live site at scrape time.

### Limitations

- **US-only retailer** — product assortment and pricing reflect Agri Supply's US store network; there is no international or regional variant of the site.
- **Category/brand enums are curated** — the input dropdowns cover ~40 popular categories and ~11 major brands. Products outside the curated list can still be found via `search` or `byUrl` modes, and the category filter also matches any category path found on a product page.
- **Reviews are summarized** — rating and review count are scraped; individual review text is not part of the output.
- **Store inventory is a snapshot** — quantities change in real time at stores; values reflect the moment of scraping.
- **Some products carry no rating or review count** — those fields are simply omitted for that record.

### FAQ

**Is this affiliated with Agri Supply?**
No. This is an independent, third-party actor that scrapes publicly available data from the agrisupply.com website.

**What does `price` vs `salePrice` vs `wasPrice` mean?**
When a product is on sale, `price` and `salePrice` are the current sale price and `wasPrice` is the pre-sale price. When not on sale, only `price` is present.

**Why do some records have no `rating` or `reviewCount`?**
The retailer only shows ratings for products that have customer reviews. Unrated products simply omit those fields.

**Can I scrape the whole catalog?**
Yes — run `browseByCategory` over the category enums, or use `search` with broad queries; `maxItems` caps each run at up to 1000 records per execution.

**Does it need a proxy?**
No. The site is directly accessible. A proxy can be enabled in the input if you ever see blocking — the actor only uses it when a request is refused.

**How fast is it?**
Approximately 1–3 products per second including full detail fetch. Setting `includeDetails: false` roughly doubles throughput for card-level data.

**Are image URLs permanent?**
Product images are served from agrisupply.com's public image CDN and are not signed — they can be hot-linked directly.

# Actor input Schema

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

What to fetch.

## `searchQuery` (type: `string`):

Free-text keyword query (mode=search).

## `category` (type: `string`):

(mode=browseByCategory) Browse target: curated category or brand page. In search/byUrl modes this acts as a post-fetch filter — only products whose category path matches are kept.

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

Full agrisupply.com product URLs, e.g. https://www.agrisupply.com/tractor-seat-black-w-slide-/p/112137/

## `sortBy` (type: `string`):

(mode=search, mode=browseByCategory) Result ordering.

## `brand` (type: `string`):

Post-fetch filter — keep only products by this brand.

## `minPrice` (type: `number`):

Post-fetch filter — drop products whose current price is below this. Applies to sale price when on sale.

## `maxPrice` (type: `number`):

Post-fetch filter — drop products whose current price is above this. Applies to sale price when on sale.

## `minRating` (type: `number`):

Post-fetch filter — drop products rated below this (0-5).

## `containsKeyword` (type: `string`):

Post-fetch filter — keep only products whose name or description contains this keyword (case-insensitive).

## `includeDetails` (type: `boolean`):

Fetch each product's detail page for description, specifications, review count, image gallery and store availability. When off, listing-card data only (name, SKU, brand, price, rating).

## `includeStoreAvailability` (type: `boolean`):

Fetch per-store inventory (store name, quantity, in-store location) for every product. Adds one request per product.

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

Hard cap on emitted records.

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

Optional. Only used if the site starts blocking (403/429). Leave empty for direct access.

## Actor input object example

```json
{
  "mode": "search",
  "searchQuery": "tractor seat",
  "productUrls": [],
  "sortBy": "score",
  "includeDetails": true,
  "includeStoreAvailability": false,
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `products` (type: `string`):

Dataset containing all scraped Agri Supply products.

# 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 = {
    "mode": "search",
    "searchQuery": "tractor seat",
    "productUrls": [],
    "sortBy": "score",
    "includeDetails": true,
    "includeStoreAvailability": false,
    "maxItems": 5,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/agri-supply-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 = {
    "mode": "search",
    "searchQuery": "tractor seat",
    "productUrls": [],
    "sortBy": "score",
    "includeDetails": True,
    "includeStoreAvailability": False,
    "maxItems": 5,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/agri-supply-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 '{
  "mode": "search",
  "searchQuery": "tractor seat",
  "productUrls": [],
  "sortBy": "score",
  "includeDetails": true,
  "includeStoreAvailability": false,
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call crawlerbros/agri-supply-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawlerbros/agri-supply-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/G8CMeDe8DjOiZVMao/builds/7BfI4XtfbV0EMUBaM/openapi.json
