# Land And Farm Scraper (`solidcode/landandfarm-scraper`) Actor

\[💰 $1.1 / 1K] Extract US farm, ranch, hunting land, timberland and rural property listings from Land And Farm. Filter by state, county, acreage, price and property type. Get prices, acreage, price history, broker contacts, photos and GPS coordinates.

- **URL**: https://apify.com/solidcode/landandfarm-scraper.md
- **Developed by:** [SolidCode](https://apify.com/solidcode) (community)
- **Categories:** Real estate, Agents, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.10 / 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.
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

## Land And Farm Scraper

Pull farm, ranch, hunting-land, timberland and rural acreage listings from Land And Farm at scale — asking price, price per acre, acreage, GPS coordinates, full price history, broker contacts, photo galleries and sold-comparable records for properties across all 50 US states. Built for land investors, rural brokerages, timberland and agricultural analysts, hunting-lease operators and land-flipping teams who need a clean, structured rural-property dataset without clicking through search pages one county at a time.

### Why This Scraper?

- **Roughly 518,000 active rural listings plus a 190,000-property sold archive** — the entire Land And Farm inventory across all 50 states, searchable by state, county or city in plain English ("Travis County, TX").
- **13 land-specific property types** — Farms, Ranches, Hunting Land, Timberland, Recreational Land, Undeveloped Land, Residential Land, Commercial Land, Horse Property, Waterfront, Lakefront, Riverfront and Beachfront — or search all types at once. Not a generic house-listing filter list.
- **Sold comparables with final sale price and sale date** — switch Availability to "Sold only" and every row returns its closing price and closing date, the raw material for land appraisals, CMA reports and per-acre valuation models.
- **Price per acre as both a field and a sort order** — `pricePerAcre` is on every row, and you can order a whole search by price per acre low-to-high or high-to-low to surface the cheapest ground in a county in a single run.
- **Owner financing and mineral rights as searchable filters** — two deal criteria land investors underwrite on that general real-estate tools simply do not expose. Sit alongside virtual tour, property video, exterior 3D tour and custom parcel map.
- **41 optional refinement filters across five groups** — 13 recreational activities (fishing, horseback riding, boating, off-roading, skiing, aviation, conservation and more), 9 terrain settings (mountain, riverfront, lakefront, island, desert, off-grid), 6 current land uses (pasture, vineyard, orchard, poultry, homestead, hobby farm), 7 dwelling types (barndominium, log cabin, tiny home, lake house and more) and 6 must-have features.
- **Complete price and acreage history per property** — every listing event with its date, price, dollar change, acreage and acreage change, so you can see how long a parcel has sat and how far the seller has moved.
- **Broker contact block on every single row** — agent name, brokerage, phone and profile link come with the basic listing; turn on full details and you also get license number, brokerage city, state, ZIP and website.
- **GPS coordinates and full-resolution photo galleries** — latitude and longitude on every row for mapping and GIS overlays with no geocoding step, plus every listing photo (59 on an average property, up to 299 on a large ranch portfolio), video links, 3D tours, survey documents, MLS number and parcel number.

### Use Cases

**Land Investment & Acquisition**

- Rank every parcel in a county by price per acre to find undervalued ground
- Screen for owner-financed deals and properties with mineral rights included
- Track price drops with the exact dollar and percentage change on each listing
- Build acquisition pipelines filtered to a target acreage band and price band

**Appraisal & Comparable Sales**

- Pull the sold archive for a county with final sale prices and sale dates
- Compare active asking prices against recent closings in the same market
- Segment comparables by acreage band, terrain type and current land use
- Track how far listings move from list price to sale price over time

**Agricultural & Timberland Analysis**

- Map pasture, vineyard, orchard and poultry-farm inventory by state
- Monitor timberland supply and pricing across the Southeast and Northwest
- Flag irrigated parcels for water-rights and crop-suitability research
- Feed acreage and price-per-acre series into farmland index models

**Brokerage & Lead Generation**

- Build broker and brokerage contact lists with phone, license number and website
- Identify the most active land brokerages in any county or region
- Spot listings going stale that may be ready for a co-broke conversation
- Track competitor inventory by brokerage across a whole state

**Recreational & Hunting Land**

- Find hunting land filtered by conservation, camping and off-roading suitability
- Locate waterfront, lakefront and riverfront parcels for lease programs
- Filter for barndominiums, log cabins and guest houses already on the land
- Target off-grid and mountain parcels for recreational lease portfolios

**Market Monitoring & Data Products**

- Refresh a rural-land database on a schedule with current pricing and status
- Feed listing counts and median price-per-acre into dashboards
- Power land-search products and alerting on newly listed acreage
- Enrich lending and insurance records with parcel size and location data

### Getting Started

#### Simplest Run — Just a Location

```json
{
  "searchLocations": ["Texas"],
  "maxResults": 50
}
```

#### Ranches in One County, Priced and Sized

```json
{
  "searchLocations": ["Travis County, TX"],
  "propertyType": "ranches",
  "minAcres": 25,
  "maxAcres": 500,
  "maxPrice": 5000000,
  "sortBy": "price_per_acre_low_high",
  "maxResults": 200
}
```

#### Sold Comparables for Appraisal Work

```json
{
  "searchLocations": ["Hays County, TX", "Blanco County, TX"],
  "availability": "sold_only",
  "minAcres": 10,
  "sortBy": "recently_changed",
  "maxResults": 500,
  "includePropertyDetails": true
}
```

#### Paste Land And Farm URLs

```json
{
  "startUrls": [
    "https://www.landandfarm.com/search/texas/ranches-for-sale/",
    "https://www.landandfarm.com/property/rmr-ranch-36955247/"
  ],
  "maxResults": 100
}
```

#### Full-Featured Investor Screen

```json
{
  "searchLocations": ["Montana", "Wyoming"],
  "propertyType": "hunting-land",
  "minAcres": 160,
  "minPrice": 250000,
  "maxPrice": 3000000,
  "minBeds": "2",
  "minBaths": "1",
  "availability": "available",
  "saleType": "for_sale",
  "sortBy": "price_per_acre_low_high",
  "activities": ["fishing", "conservation", "camping"],
  "geography": ["mountain", "riverfront"],
  "landUses": ["pasture"],
  "housingTypes": ["log-cabin", "barndominium"],
  "features": ["owner-financing", "mineral-rights"],
  "residence": "yes",
  "hoa": "none",
  "maxResults": 500,
  "includePropertyDetails": true
}
```

### Input Reference

#### What to Scrape

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `startUrls` | array | `["https://www.landandfarm.com/search/texas/ranches-for-sale/"]` | Paste Land And Farm URLs directly — a search page or a single property page. Filters already in the URL are kept; the filter settings below do not apply to these URLs. |
| `searchLocations` | array | `[]` | Search by typing a place instead of building a URL. Works with a state ("Texas"), a county ("Travis County, TX") or a city ("Austin, TX"). Each location becomes its own search using the filters below. |

#### Search Filters

Applied to `searchLocations` only — Start URLs carry their own filters.

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `propertyType` | string | `"all"` | All Types, Farms, Ranches, Hunting Land, Timberland, Recreational Land, Undeveloped Land, Residential Land, Commercial Land, Horse Property, Waterfront, Lakefront, Riverfront, Beachfront. |
| `minAcres` | integer | empty | Only properties of at least this many acres. |
| `maxAcres` | integer | empty | Only properties up to this many acres. |
| `minPrice` | integer | empty | Only properties priced at or above this amount (USD). |
| `maxPrice` | integer | empty | Only properties priced at or below this amount (USD). |
| `minBeds` | string | `"0"` | Any, 1+ bedrooms, 2+ bedrooms, 3+ bedrooms, 4+ bedrooms. Choose Any for land with or without a house. |
| `minBaths` | string | `"0"` | Any, 1+ bathrooms, 2+ bathrooms, 3+ bathrooms, 4+ bathrooms. Choose Any for land with or without a house. |
| `availability` | string | `"active"` | Active (available + under contract), Available only, Under contract only, Active plus sold properties, Sold only, or Off market only. |
| `saleType` | string | `"any"` | Any, Standard sale only, or Auctions only. |
| `sortBy` | string | `"default"` | Best match (site default), Price: low to high, Price: high to low, Price per acre: low to high, Price per acre: high to low, Acres: small to large, Acres: large to small, Newest listings first, Recently changed first. |

#### More Filters

Optional extras — leave empty to skip. Also applied to `searchLocations` only.

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `activities` | array | `[]` | Fishing, Horseback riding, Boating, Canoeing / kayaking, Aquatic sports, Beach, Camping, RVing, Off-roading, Golfing, Skiing, Aviation, Conservation. |
| `geography` | array | `[]` | Rural, Mountain, Riverfront, Lakefront, Beachfront, Island, Desert, Resort, Off grid. |
| `landUses` | array | `[]` | Homestead, Pasture, Hobby farm, Vineyard, Orchard, Poultry farm. |
| `housingTypes` | array | `[]` | Barndominium, Log cabin, Cottage, Lake house, Guest house, Mobile home, Tiny home. |
| `features` | array | `[]` | Owner financing available, Mineral rights included, Has a property video, Has a virtual tour, Has an exterior 3D tour, Has a custom parcel map. |
| `residence` | string | `"any"` | Doesn't matter, Must have a house, or Bare land only (no house). |
| `hoa` | string | `"any"` | Doesn't matter, Mandatory HOA, Voluntary HOA, or No HOA. |

#### Options

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `maxResults` | integer | `100` | Maximum properties to collect across every URL and location. Set to `0` to collect everything each search can return. |
| `includePropertyDetails` | boolean | `true` | Open each property page to also collect the full description, amenities, price history, all photos, documents, MLS and parcel numbers, and the broker's address and license number. Turn off for a fast overview. |

### Output

One flat row per property. Example with `includePropertyDetails` turned on:

```json
{
  "listingId": 36955247,
  "propertyId": 12874503,
  "url": "https://www.landandfarm.com/property/rmr-ranch-36955247/",
  "title": "RMR Ranch",
  "price": 4250000,
  "priceDisplay": "$4,250,000",
  "pricePerAcre": 8500,
  "acres": 500,
  "propertyTypes": ["Ranches", "Hunting Land", "Recreational Land"],
  "status": "Available",
  "address": "1420 County Road 210",
  "city": "Dripping Springs",
  "county": "Hays County",
  "state": "Texas",
  "stateCode": "TX",
  "zip": "78620",
  "region": "Texas Hill Country",
  "latitude": 30.190228,
  "longitude": -98.086655,
  "beds": 4,
  "baths": 3,
  "halfBaths": 1,
  "homeSqft": 3850,
  "hasHouse": true,
  "isIrrigated": true,
  "listingDate": "2026-05-14T00:00:00",
  "lastUpdated": "2026-07-15T09:51:00",
  "priceChangeAmount": -250000,
  "priceChangePercentage": -5.6,
  "priceChangeDate": "2026-07-02T00:00:00",
  "isAuction": false,
  "auctionStartDate": null,
  "auctionEndDate": null,
  "salePrice": null,
  "saleDate": null,
  "brokerName": "Jane Whitaker",
  "brokerCompany": "Hill Country Land Group",
  "brokerPhone": "(512) 555-0142",
  "brokerUrl": "https://www.landandfarm.com/broker/hill-country-land-group/",
  "brokerLicenseNumber": "0651234",
  "brokerCity": "Austin",
  "brokerState": "TX",
  "brokerZip": "78704",
  "brokerWebsite": "https://hillcountrylandgroup.com",
  "mlsId": "1789234",
  "parcelId": "R-1420-0021",
  "executiveSummary": "Turnkey working ranch with live water, ag exemption and a four-bedroom main house.",
  "description": "Five hundred acres of rolling Hill Country ranch land with over half a mile of Onion Creek frontage...",
  "highlights": ["Live water on Onion Creek", "Ag exemption in place", "Two stocked ponds"],
  "directions": "From Austin take US-290 west for 22 miles, turn south on County Road 210.",
  "amenities": ["Land: Water Features: Creek", "Improvements: Barns: Equipment barn", "Recreation: Hunting: Whitetail deer"],
  "priceHistory": [
    { "date": "2026-07-02T00:00:00", "price": 4250000, "priceDelta": -250000, "acres": 500, "acresDelta": 0, "eventTitle": "Price Decreased" },
    { "date": "2026-05-14T00:00:00", "price": 4500000, "priceDelta": null, "acres": 500, "acresDelta": null, "eventTitle": "Listed" }
  ],
  "imageCount": 114,
  "images": ["https://assets.landandfarm.com/resizedimages/10000/0/h/80/1-98765432"],
  "hasVideo": true,
  "hasVirtualTour": false,
  "videoUrl": "https://player.vimeo.com/video/912345678",
  "documents": [{ "caption": "Survey plat", "url": "https://assets.landandfarm.com/documents/plat.pdf" }],
  "detailsFetched": true
}
```

#### Core Fields

| Field | Type | Description |
|-------|------|-------------|
| `listingId` | number | Stable Land And Farm listing identifier — use this to deduplicate |
| `propertyId` | number | Property number that appears in the listing URL |
| `url` | string | Full link to the property page |
| `title` | string | Listing headline, e.g. "RMR Ranch" |
| `price` | number | Asking price in USD |
| `priceDisplay` | string | Price as shown on the site, e.g. "$4,250,000" |
| `pricePerAcre` | number | Asking price divided by acreage |
| `acres` | number | Total acreage |
| `propertyTypes` | array | Readable type labels, e.g. `["Ranches", "Hunting Land"]` |
| `status` | string | Available, Under Contract, Off Market or Sold |
| `detailsFetched` | boolean | Whether the full property page was opened for this row |

#### Location & Geography

| Field | Type | Description |
|-------|------|-------------|
| `address` | string | Street address where the seller published one |
| `city` | string | City |
| `county` | string | County |
| `state` | string | Full state name |
| `stateCode` | string | Two-letter state abbreviation |
| `zip` | string | ZIP code |
| `region` | string | Named region, e.g. "Texas Hill Country" (full details only) |
| `latitude` | number | GPS latitude |
| `longitude` | number | GPS longitude |
| `directions` | string | Driving directions written by the broker (full details only) |

#### Structure & Land Use

| Field | Type | Description |
|-------|------|-------------|
| `beds` | number | Bedrooms in the home on the property |
| `baths` | number | Full bathrooms |
| `halfBaths` | number | Half bathrooms |
| `homeSqft` | number | Home square footage |
| `hasHouse` | boolean | Whether a residence is included |
| `isIrrigated` | boolean | Whether the land is irrigated (full details only) |
| `amenities` | array | Grouped amenity labels such as "Land: Water Features: Creek" (full details only) |

#### Dates, Price Changes & Sale History

| Field | Type | Description |
|-------|------|-------------|
| `listingDate` | string | When the property was first listed (ISO 8601) |
| `lastUpdated` | string | When the listing was last modified (ISO 8601) |
| `priceChangeAmount` | number | Dollar amount of the most recent price change |
| `priceChangePercentage` | number | Percentage of the most recent price change |
| `priceChangeDate` | string | Date of the most recent price change |
| `isAuction` | boolean | Whether the property is going to auction |
| `auctionStartDate` | string | Auction opening date |
| `auctionEndDate` | string | Auction closing date |
| `salePrice` | number | Final sale price on sold listings |
| `saleDate` | string | Date the property sold |
| `priceHistory` | array | Every listing event: `date`, `price`, `priceDelta`, `acres`, `acresDelta`, `eventTitle` (full details only) |

#### Broker Contacts

| Field | Type | Description |
|-------|------|-------------|
| `brokerName` | string | Listing agent name |
| `brokerCompany` | string | Brokerage name |
| `brokerPhone` | string | Contact phone number |
| `brokerUrl` | string | Link to the broker's Land And Farm profile |
| `brokerLicenseNumber` | string | Real estate license number (full details only) |
| `brokerCity` | string | Brokerage city (full details only) |
| `brokerState` | string | Brokerage state (full details only) |
| `brokerZip` | string | Brokerage ZIP code (full details only) |
| `brokerWebsite` | string | Brokerage website (full details only) |

#### Media & Documents

| Field | Type | Description |
|-------|------|-------------|
| `imageCount` | number | Number of photos on the listing |
| `images` | array | Full-resolution photo URLs |
| `hasVideo` | boolean | Whether the listing has a video |
| `hasVirtualTour` | boolean | Whether the listing has a virtual tour |
| `videoUrl` | string | Direct video link (full details only) |
| `virtualTourUrl` | string | Direct 3D or virtual tour link (full details only) |
| `documents` | array | Attached files such as survey plats: `caption` and `url` (full details only) |

#### Description & Identifiers

| Field | Type | Description |
|-------|------|-------------|
| `descriptionSnippet` | string | Short listing teaser — present only when full details are turned off |
| `description` | string | Complete listing write-up (full details only, replaces `descriptionSnippet`) |
| `executiveSummary` | string | Broker's one-paragraph summary (full details only) |
| `highlights` | array | Up to four selling-point bullets written by the broker (full details only) |
| `mlsId` | string | MLS number where the broker published one (full details only) |
| `parcelId` | string | County parcel number (full details only) |

### Tips for Best Results

- **Split big states into counties.** Land And Farm serves at most 500 properties for any one search, so a statewide Texas run stops at 500 no matter how many listings exist. Listing ten county names in `searchLocations` gives you up to 500 from each — the single biggest lever on total coverage.
- **Run the same search twice with opposing sorts.** Because the 500-result ceiling decides *which* properties you see, running once with "Price per acre: low to high" and again with "Price per acre: high to low" captures both ends of a market that a single run would miss.
- **Search by city or county, never by ZIP code.** ZIP-code searches return no results on Land And Farm. "Austin, TX" and "Travis County, TX" both work; `78701` will come back empty.
- **Use acreage and price bands to slice past the ceiling.** Three runs at 0–50, 50–250 and 250+ acres each get their own 500-property allowance, which is how you collect a whole state completely.
- **Start with `maxResults` at 10–50.** Check the columns match what you need, then raise it. A 100-property run with full details finishes in well under a minute, so scaling up is cheap.
- **Turn off full details for inventory counts.** Price, acreage, price per acre, address, GPS coordinates, beds/baths, broker phone and photos are all on the basic listing row already — leave details on only when you need descriptions, amenities, price history, documents or MLS numbers.
- **Include a state hint on ambiguous place names.** "Springfield" exists in dozens of states and names with apostrophes need the state to resolve — write "Coeur d'Alene, ID" rather than "Coeur d'Alene".

### Pricing

**From $1.10 per 1,000 results** — a flat per-property rate whether you collect a quick inventory count or a fully enriched dataset with descriptions, price history and photo galleries. Bronze, Silver and Gold subscribers pay progressively less; the table below shows total cost at each discount tier.

| Results | No discount | Bronze | Silver | Gold |
|---------|-------------|--------|--------|------|
| 100 | $0.13 | $0.125 | $0.115 | $0.11 |
| 1,000 | $1.30 | $1.25 | $1.15 | $1.10 |
| 10,000 | $13.00 | $12.50 | $11.50 | $11.00 |
| 100,000 | $130.00 | $125.00 | $115.00 | $110.00 |

A "result" is one property row in your dataset. No compute or time-based charges — you pay per result, plus a small fixed per-run start fee.

### Integrations

Export data in JSON, CSV, Excel, XML, or RSS. Connect to 1,500+ apps via:

- **Zapier** / **Make** / **n8n** — Workflow automation
- **Google Sheets** — Direct spreadsheet export
- **Slack** / **Email** — Notifications on new results
- **Webhooks** — Trigger your own services when a run finishes
- **Apify API** — Full programmatic access

### Legal & Ethical Use

This actor is built for legitimate land-market research, property valuation, comparable-sales analysis and brokerage lead generation. You are responsible for complying with applicable laws and Land And Farm's Terms of Service. Broker contact details are published by the brokerages themselves for business enquiries — do not use them for spam, harassment or any unlawful purpose, and respect fair housing rules and marketing-consent laws when contacting anyone in the data.

# Actor input Schema

## `startUrls` (type: `array`):

Paste Land And Farm URLs directly — either a search page (e.g. https://www.landandfarm.com/search/texas/ranches-for-sale/) or a single property page (e.g. https://www.landandfarm.com/property/rmr-ranch-36955247/). Any filters already in the URL are kept. The filter settings below do NOT apply to these URLs — everything comes from the URL itself.

## `searchLocations` (type: `array`):

Search by typing a place instead of building a URL. Works with a state ('Texas'), a county ('Travis County, TX') or a city ('Austin, TX'). Each location becomes its own search using the filters below.

## `propertyType` (type: `string`):

Narrow results to one kind of property. Only applies to Search Locations — URLs above bring their own property type.

## `minAcres` (type: `integer`):

Only show properties of at least this many acres. Leave empty for no minimum.

## `maxAcres` (type: `integer`):

Only show properties up to this many acres. Leave empty for no maximum.

## `minPrice` (type: `integer`):

Only show properties priced at or above this amount. Leave empty for no minimum.

## `maxPrice` (type: `integer`):

Only show properties priced at or below this amount. Leave empty for no maximum.

## `minBeds` (type: `string`):

Only show properties with a home of at least this many bedrooms. Choose 'Any' for land with or without a house.

## `minBaths` (type: `string`):

Only show properties with a home of at least this many bathrooms. Choose 'Any' for land with or without a house.

## `availability` (type: `string`):

Which listings to include. The sold archive is useful for comparable-sales research — 'Sold only' returns past sales with their final sale price and sale date.

## `saleType` (type: `string`):

Include everything, only standard listings, or only properties going to auction.

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

Order of the results. Because each search caps out at 500 properties, sorting decides WHICH 500 you get — run the same search sorted low-to-high and high-to-low to capture both ends of the market.

## `activities` (type: `array`):

Only show properties suited to these activities. Selecting several narrows the search further.

## `geography` (type: `array`):

Only show properties in these kinds of settings.

## `landUses` (type: `array`):

Only show properties currently used this way.

## `housingTypes` (type: `array`):

Only show properties with one of these kinds of dwelling on them.

## `features` (type: `array`):

Only show properties offering these. 'Owner financing' and 'Mineral rights' are especially useful for investors.

## `residence` (type: `string`):

Whether the land must include a residence.

## `hoa` (type: `string`):

Filter by whether the property belongs to an HOA.

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

Maximum number of properties to collect across every URL and location. Set to 0 to collect everything each search can return. Tip: start with 10-50 to check the output, then increase. Note: Land And Farm itself only serves the first 500 properties of any one search, so to go beyond 500 split the work into several narrower searches (by county, acreage band or price band) or add more locations. As a safety limit, no single run will ever collect more than 100,000 properties in total, no matter how many searches or locations you combine.

## `includePropertyDetails` (type: `boolean`):

Open each property page to also collect the full description, amenities, price history, all photos, documents, MLS and parcel numbers, and the broker's address and license number. Slower, but far richer data. Turn off for a fast overview.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.landandfarm.com/search/texas/ranches-for-sale/"
  ],
  "searchLocations": [],
  "propertyType": "all",
  "minBeds": "0",
  "minBaths": "0",
  "availability": "active",
  "saleType": "any",
  "sortBy": "default",
  "activities": [],
  "geography": [],
  "landUses": [],
  "housingTypes": [],
  "features": [],
  "residence": "any",
  "hoa": "any",
  "maxResults": 100,
  "includePropertyDetails": true
}
```

# Actor output Schema

## `overview` (type: `string`):

Table of collected properties with price, acreage, location and broker.

## `brokers` (type: `string`):

Listing agent and brokerage contact details for every property.

# 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 = {
    "startUrls": [
        "https://www.landandfarm.com/search/texas/ranches-for-sale/"
    ],
    "searchLocations": [],
    "propertyType": "all",
    "minBeds": "0",
    "minBaths": "0",
    "availability": "active",
    "saleType": "any",
    "sortBy": "default",
    "activities": [],
    "geography": [],
    "landUses": [],
    "housingTypes": [],
    "features": [],
    "residence": "any",
    "hoa": "any",
    "maxResults": 100,
    "includePropertyDetails": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("solidcode/landandfarm-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 = {
    "startUrls": ["https://www.landandfarm.com/search/texas/ranches-for-sale/"],
    "searchLocations": [],
    "propertyType": "all",
    "minBeds": "0",
    "minBaths": "0",
    "availability": "active",
    "saleType": "any",
    "sortBy": "default",
    "activities": [],
    "geography": [],
    "landUses": [],
    "housingTypes": [],
    "features": [],
    "residence": "any",
    "hoa": "any",
    "maxResults": 100,
    "includePropertyDetails": True,
}

# Run the Actor and wait for it to finish
run = client.actor("solidcode/landandfarm-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 '{
  "startUrls": [
    "https://www.landandfarm.com/search/texas/ranches-for-sale/"
  ],
  "searchLocations": [],
  "propertyType": "all",
  "minBeds": "0",
  "minBaths": "0",
  "availability": "active",
  "saleType": "any",
  "sortBy": "default",
  "activities": [],
  "geography": [],
  "landUses": [],
  "housingTypes": [],
  "features": [],
  "residence": "any",
  "hoa": "any",
  "maxResults": 100,
  "includePropertyDetails": true
}' |
apify call solidcode/landandfarm-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/nsjLhCBcZjpVnfOQQ/builds/hVUCdaPfmMmTJ5BDO/openapi.json
