# LocalHarvest Farm & CSA Directory Scraper (`compute-edge/localharvest-scraper`) Actor

Scrape farm, CSA, farmers market, and farm stand listings from LocalHarvest.org. Extracts farm name, description, products, address, GPS coordinates, website, phone, and photos. Supports city, state, and category search modes.

- **URL**: https://apify.com/compute-edge/localharvest-scraper.md
- **Developed by:** [Compute Edge](https://apify.com/compute-edge) (community)
- **Categories:** Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## LocalHarvest Farm & CSA Directory Scraper

**Extract farm, CSA, and farmers market listings from LocalHarvest.org** — the leading directory for local food in the United States with over 80,000 listings. This Actor scrapes farm names, descriptions, products, addresses, GPS coordinates, websites, phone numbers, farming practices, and photos from LocalHarvest's comprehensive directory of family farms, CSA programs, farmers markets, farm stands, and u-pick operations.

Whether you are building a local food discovery app, conducting agricultural market research, analyzing organic farming trends, or sourcing farm-fresh suppliers, this scraper provides clean, structured data from one of America's most trusted farm directories.

### What data can you scrape from LocalHarvest?

| Field | Description |
|-------|-------------|
| **name** | Farm or market name |
| **description** | Full farm description with details about offerings |
| **type** | Classification: Family Farm, Farmers Market, CSA, Farm Stand, U-Pick |
| **products** | List of products and crops offered (seasonal) |
| **address** | Street address |
| **city** | City |
| **state** | State |
| **postalCode** | ZIP code |
| **latitude / longitude** | GPS coordinates for mapping |
| **website** | Farm website URL |
| **phone** | Phone number |
| **imageUrl** | Farm photo URL |
| **farmingPractices** | Certifications: Certified Organic, naturally grown, grass fed, etc. |
| **detailUrl** | LocalHarvest profile URL |

### Why Scrape LocalHarvest? Top Use Cases

- **No login required** — all farm data is publicly accessible
- **Three search modes** — search by city, by state, or by category
- **Rich data extraction** — products, farming practices, GPS, and contact info
- **Fast and efficient** — uses CheerioCrawler (no browser needed), keeping compute costs minimal
- **Two scraping modes** — quick listing overview or full detail page extraction
- **80,000+ listings** — covers farms, CSAs, farmers markets, farm stands, and u-pick across the US

### How to scrape LocalHarvest farm data

1. Go to the [LocalHarvest Scraper](https://apify.com/seatsignal/localharvest-scraper) page on Apify Store
2. Click **Try for free**
3. Select a **Search Type**: By City, By State, or By Category
4. Enter a **Location** — for city search use the format `portland-or`, for state search use `california`
5. If searching by category, choose from: Organic Farms, CSA Programs, Farmers Markets, Farm Stands, U-Pick
6. Toggle **Scrape Detail Pages** on for complete farm data (description, products, GPS, contact) or off for a quick listing
7. Set **Max Requests** to control the scope of your scrape
8. Click **Start** and wait for results

### Input example

```json
{
    "searchType": "city",
    "location": "portland-or",
    "scrapeDetails": true,
    "maxRequestsPerCrawl": 100
}
````

### Output example

Each farm listing returns a JSON object like this:

```json
{
    "detailUrl": "https://www.localharvest.org/hood-river-organic-M20287",
    "name": "Hood River Organic",
    "type": "Family Farm",
    "description": "Hood River Organic is proud to be a cooperative CSA in the NW to offer boxes of local and organic produce year-round...",
    "address": "4780 Dee Hwy",
    "city": "Hood River",
    "state": "OR",
    "postalCode": "97031",
    "phone": "(541) 354-2111",
    "website": "https://hoodriverorganic.com",
    "latitude": 45.57,
    "longitude": -121.62,
    "imageUrl": "https://lh-images.us-east-1.linodeobjects.com/d9d3d8b3-37c3-4c7e-9c84-07ad19d4ccce.jpg",
    "products": ["beets", "cabbage", "carrots", "kale", "mushrooms", "apples", "pears", "beef", "cheese", "eggs", "honey"],
    "farmingPractices": ["Certified Organic", "naturally grown", "grass fed/pastured"]
}
```

### How much does it cost to scrape LocalHarvest?

This Actor uses **CheerioCrawler** (no browser), so compute costs are very low.

| Scenario | Requests | Est. Results | Est. Compute | Est. Actor Fee |
|----------|----------|-------------|-------------|----------------|
| One city with details | 15 | ~12 | ~$0.01 | ~$0.02 |
| One state category | 50 | ~40 | ~$0.02 | ~$0.08 |
| Large regional scrape | 200 | ~150 | ~$0.05 | ~$0.30 |

Actor pricing: **$0.002 per result** + minimal compute costs. A typical city scrape costs under $0.05 total.

### Input parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `searchType` | string | Yes | `city` | Search mode: `city`, `state`, or `category` |
| `location` | string | No | `portland-or` | City-state slug (e.g., `portland-or`) or state name (e.g., `california`) |
| `category` | string | No | `organic-farms` | Farm category: `organic-farms`, `csa`, `farmers-markets`, `farm-stands`, `u-pick` |
| `scrapeDetails` | boolean | No | `true` | Visit detail pages for full data (description, products, GPS, contact info) |
| `maxRequestsPerCrawl` | integer | No | `100` | Safety limit on total HTTP requests (1-5000) |

### Search type examples

**By City** — Find farms near a specific city:

```json
{"searchType": "city", "location": "portland-or"}
{"searchType": "city", "location": "austin-tx"}
{"searchType": "city", "location": "san-francisco-ca"}
```

**By State** — Browse all farms in a state by category:

```json
{"searchType": "state", "location": "california", "category": "organic-farms"}
{"searchType": "state", "location": "oregon", "category": "csa"}
```

**By Category** — Browse all farms in a nationwide category:

```json
{"searchType": "category", "category": "farmers-markets"}
{"searchType": "category", "category": "u-pick"}
```

### Tips for best results

- **Finding city slugs**: Go to [localharvest.org](https://www.localharvest.org), search for a city, and copy the URL slug (e.g., `portland-or`, `austin-tx`)
- **Quick mode**: Set `scrapeDetails` to `false` for a fast list of farm names, types, and locations without visiting each detail page
- **Full data mode**: Keep `scrapeDetails` as `true` to get descriptions, products, farming practices, GPS coordinates, and contact info
- **Large scrapes**: Increase `maxRequestsPerCrawl` for bigger geographic areas. Each listing page shows ~10-15 farms.

### Integrations

Connect LocalHarvest farm data with your workflow:

- **API** — Access results programmatically via the [Apify API](https://docs.apify.com/api/v2)
- **Webhooks** — Get notified when a scrape completes
- **Zapier / Make** — Pipe results into Google Sheets, CRMs, or databases
- **Python / Node.js** — Use the [Apify SDK](https://docs.apify.com/sdk/js) to run and retrieve data

### FAQ

#### Is it legal to scrape LocalHarvest?

Yes. LocalHarvest.org is a public directory of farms, CSA programs, and farmers markets. All farm listings are voluntarily published by agricultural businesses on the public directory. This Actor only accesses publicly available data and does not bypass authentication or access restricted content.

#### How much does it cost to scrape LocalHarvest?

The Actor charges $0.002 per result plus minimal Apify compute costs. A typical city scrape costs under $0.05 total. See the pricing table above for detailed estimates by scenario.

#### Can I export LocalHarvest data to Excel or CSV?

Yes. Apify supports exporting data in JSON, CSV, Excel, XML, HTML, and RSS formats. After the Actor run completes, go to the Dataset tab and choose your preferred export format.

#### How often is the LocalHarvest data updated?

You can schedule this Actor to run at any interval — daily, weekly, or monthly. LocalHarvest listings are maintained by the farms themselves, so data freshness varies by listing.

#### What types of farms and listings are included?

LocalHarvest covers five main listing types: Family Farms, CSA (Community Supported Agriculture) programs, Farmers Markets, Farm Stands, and U-Pick operations. The directory contains over 80,000 listings across the United States.

### Other Scrapers by SeatSignal

- [Hotfrog Business Directory Scraper](https://apify.com/seatsignal/hotfrog-scraper) — Scrape business listings from 18+ countries
- [USDA FoodData Central Scraper](https://apify.com/seatsignal/usda-fooddata-scraper) — Extract USDA food nutrition data
- [IQS Directory Scraper](https://apify.com/seatsignal/iqsdirectory-scraper) — Scrape industrial B2B supplier listings
- [EPA ECHO Environmental Compliance Scraper](https://apify.com/seatsignal/epa-echo-scraper) — Extract compliance data for EPA-regulated facilities
- [NREL Alternative Fuel Stations Scraper](https://apify.com/seatsignal/nrel-alt-fuel-stations-scraper) — Extract EV charging and alternative fuel station data

### Legal disclaimer

This Actor extracts publicly available farm and agricultural business information from LocalHarvest.org. It does not extract private user data, bypass authentication, or access protected content. The scraped data consists of farm listings that agricultural businesses have voluntarily published on LocalHarvest's public directory.

Users are responsible for ensuring their use of scraped data complies with applicable laws, including GDPR and CCPA. For questions about data usage, consult a legal professional.

### Support

- **Issues?** Open an issue on the Actor's Apify page
- **Custom data needs?** Contact us for enterprise agricultural data solutions

# Actor input Schema

## `searchType` (type: `string`):

How to search for farms.

## `location` (type: `string`):

City-state (e.g., portland-or) or state name (e.g., california) depending on search type.

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

Farm category (only used with category search type).

## `scrapeDetails` (type: `boolean`):

Visit each farm's detail page for full data (slower but more complete).

## `maxRequestsPerCrawl` (type: `integer`):

Maximum total HTTP requests. Safety limit to prevent runaway costs.

## Actor input object example

```json
{
  "searchType": "city",
  "location": "portland-or",
  "category": "organic-farms",
  "scrapeDetails": true,
  "maxRequestsPerCrawl": 100
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# 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 = {
    "location": "portland-or"
};

// Run the Actor and wait for it to finish
const run = await client.actor("compute-edge/localharvest-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 = { "location": "portland-or" }

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

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

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

```

## CLI example

```bash
echo '{
  "location": "portland-or"
}' |
apify call compute-edge/localharvest-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=compute-edge/localharvest-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "LocalHarvest Farm & CSA Directory Scraper",
        "description": "Scrape farm, CSA, farmers market, and farm stand listings from LocalHarvest.org. Extracts farm name, description, products, address, GPS coordinates, website, phone, and photos. Supports city, state, and category search modes.",
        "version": "0.1",
        "x-build-id": "bl0cIA9gCpN12qBX3"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/compute-edge~localharvest-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-compute-edge-localharvest-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/compute-edge~localharvest-scraper/runs": {
            "post": {
                "operationId": "runs-sync-compute-edge-localharvest-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/compute-edge~localharvest-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-compute-edge-localharvest-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "searchType"
                ],
                "properties": {
                    "searchType": {
                        "title": "Search Type",
                        "enum": [
                            "city",
                            "state",
                            "category"
                        ],
                        "type": "string",
                        "description": "How to search for farms.",
                        "default": "city"
                    },
                    "location": {
                        "title": "Location",
                        "type": "string",
                        "description": "City-state (e.g., portland-or) or state name (e.g., california) depending on search type."
                    },
                    "category": {
                        "title": "Category",
                        "enum": [
                            "organic-farms",
                            "csa",
                            "farmers-markets",
                            "farm-stands",
                            "u-pick"
                        ],
                        "type": "string",
                        "description": "Farm category (only used with category search type).",
                        "default": "organic-farms"
                    },
                    "scrapeDetails": {
                        "title": "Scrape Detail Pages",
                        "type": "boolean",
                        "description": "Visit each farm's detail page for full data (slower but more complete).",
                        "default": true
                    },
                    "maxRequestsPerCrawl": {
                        "title": "Max Requests",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum total HTTP requests. Safety limit to prevent runaway costs.",
                        "default": 100
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
