# RanchLand Scraper (`crawlerbros/ranchland-scraper`) Actor

Scrape ranch, farm and recreational land listings from RanchLand (ranchland.com) - Mason & Morse Ranch Company's US Western marketplace. Search by keyword, browse by state or property type, filter by price/acres/status, and enrich with photos, brokers, maps and brochures.

- **URL**: https://apify.com/crawlerbros/ranchland-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Automation, Lead generation, Real estate
- **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/actors/running/actors-in-store.md#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

## RanchLand Scraper

Scrape **RanchLand (ranchland.com)** — the US Western ranch, farm and recreational land marketplace run by Mason & Morse Ranch Company. Search by keyword, browse by state or property type, filter by price / acreage / status, and pull rich detail: descriptions, map coordinates, brokers, photos, brochures, audio tours and video. HTTP-only scraping of public pages — no auth, no cookies, no paid proxy.

### Data Source

**This actor scrapes RanchLand (ranchland.com), a same-category replacement for the originally requested RanchFlip (ranchflip.com).**

RanchFlip is a US ranch-for-sale marketplace that is **genuinely unreachable from automated infrastructure**: every non-browser path returns a Cloudflare "Sorry, you have been blocked" 403. Verified during development with plain HTTP (403), `curl_cffi` TLS impersonation across 4 browser profiles (all 403), headless Playwright (403), and even a Google Translate server-side mirror fetch (Cloudflare "Just a moment" challenge). RanchLand — the same niche (Western US ranches, farms, hunting and recreational land for sale) — serves its listing pages and listing-search endpoints openly with no WAF, so it works reliably on the free Apify plan with no proxy at all.

Listing data is read from the same server-side endpoints the site's own browse pages use (`/pb/plugin/par_search.php` + `/pb/plugin/par.php`), so browse pages, filters and detail pages all return real, current inventory — active listings plus the broker's sold archive.

### What this actor does

- **Seven modes:** `search`, `byState`, `byType`, `byIds`, `byUrl`, `newListings`, `soldProperties`
- **16 US states** browse (Arizona → Wyoming) and **12 property types** (cattle ranches, hunting land, farms, timberland, equestrian, ranchettes, …)
- **Filters:** keyword, state, property type, price range, acreage range, listing status, sort order
- **Rich detail option:** description, street address, postal code, GPS coordinates, brokers, brochure PDF, audio tour, video
- **Media URLs are directly hotlinkable** — images, brochures and audio load from any client with no referer tricks
- **Empty fields are omitted** — no `null`s in the dataset

### Output per listing

- `id` — RanchLand listing ID (e.g. `3578`)
- `name` — listing name (e.g. `L Cross Ranch`)
- `city`, `county`, `state` — parsed from the listing location
- `acres` — total acreage (number)
- `price` — asking price in USD (number), `priceDisplay` (e.g. `$45,000,000`)
- `summary` — short teaser from the search card
- `imageUrl` — main photo (absolute, hotlinkable)
- `listingStatus` — `active` or `sold`
- `listingUrl` / `sourceUrl` — canonical listing page
- With `includeDetails: true` (always for `byIds` / `byUrl`):
  - `description` — full marketing description
  - `streetAddress`, `postalCode` — where published by the broker
  - `latitude`, `longitude` — map coordinates
  - `brokers[]` — listing agent names
  - `brochureUrl` — property brochure (PDF)
  - `audioUrl` — narrated tour (MP3)
  - `videoUrl` — YouTube walkthrough
- `recordType: "ranchListing"`, `scrapedAt`

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `search` | `search` / `byState` / `byType` / `byIds` / `byUrl` / `newListings` / `soldProperties` |
| `searchQuery` | string | `ranch` | Keyword matched against descriptions (mode=search) |
| `state` | string | – | One of 16 states (mode=search / byState) |
| `propertyType` | string | – | One of 12 types (mode=search / byType) |
| `minPrice` / `maxPrice` | int | – | Price band in USD (0–100,000,000) |
| `minAcres` / `maxAcres` | number | – | Size band in acres (0–1,000,000) |
| `listingStatus` | string | `activeAndSold` | `activeAndSold` / `activeOnly` / `soldOnly` |
| `sortBy` | string | `newest` | `newest` / `priceAscending` / `acreageAscending` |
| `includeDetails` | bool | `false` | Fetch full detail pages (slower) |
| `listingIds` | array | – | IDs to look up (mode=byIds) |
| `listingUrls` | array | – | Listing URLs to fetch (mode=byUrl) |
| `maxItems` | int | `50` | Hard cap (1–1000) |
| `proxyConfiguration` | object | off | Optional; AUTO proxy only if you need it |

#### Example: keyword search with filters

```json
{
  "mode": "search",
  "searchQuery": "trout",
  "state": "colorado",
  "minAcres": 100,
  "maxPrice": 15000000,
  "listingStatus": "activeOnly",
  "includeDetails": true,
  "maxItems": 20
}
```

#### Example: browse by state

```json
{
  "mode": "byState",
  "state": "texas",
  "maxItems": 100
}
```

#### Example: browse by property type

```json
{
  "mode": "byType",
  "propertyType": "hunting-land-for-sale",
  "minPrice": 1000000,
  "maxItems": 50
}
```

#### Example: lookup by URL

```json
{
  "mode": "byUrl",
  "listingUrls": [
    "https://www.ranchland.com/ranches-for-sale/colorado/l-cross-ranch-3578"
  ]
}
```

### Use cases

- **Ranch acquisition leads** — monitor new listings and sold comparables across Western states
- **Land market analytics** — track asking prices and acreage by state, type and over time
- **Hunting / recreational property research** — filter hunting land, water features, and large acreage
- **Broker & listing intelligence** — which agents list which properties, and at what price points
- **Investment screening** — price band + acreage sweep across multiple states in one run

### FAQ

**What's RanchLand?** RanchLand is the listing marketplace of Mason & Morse Ranch Company, one of the oldest Western US land brokerage firms (est. 1963), with ranch, farm and recreational land listings across 16 states. See [ranchland.com](https://www.ranchland.com).

**Why is this scraping RanchLand instead of RanchFlip?** RanchFlip (ranchflip.com) blocks all automated traffic with a Cloudflare WAF — including residential proxies and full browsers — so no free-plan Apify actor can read it. RanchLand covers the same niche (US ranch / land for sale) and is openly accessible.

**Is the data current?** Yes — listings are read live from the site's own listing endpoints at run time, including new listings and the sold archive.

**Why don't all listings have `description` or `latitude`?** Detail fields only exist on the listing's detail page; the site itself omits them for some properties. Fields are only emitted when the site provides them.

**Why are some fields missing in list mode?** Without `includeDetails`, records come from the compact search cards (name, location, price, acres, summary, photo). Turn on `includeDetails` for full records.

**What does `listingStatus` mean?** `active` = currently for sale; `sold` = sold properties in the broker's archive.

**How does the sort work?** `newest` returns the latest listings first. Price and acreage sorts are applied by the site's search engine and are low-to-high.

**Does this actor require a proxy or login?** No. All data is public; the proxy field is optional and defaults to off.

**Is this affiliated with RanchLand / Mason & Morse?** No — this is an independent third-party actor using the publicly available listing pages.

**Rate limits?** None documented. The actor pages politely with small delays between requests.

# Actor input Schema

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

What to fetch.

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

Free-text keyword matched against listing descriptions, e.g. `trout`, `hunting`, `irrigated` (mode=search).

## `state` (type: `string`):

Browse listings in a single US state (mode=search / mode=byState).

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

Browse listings of a specific type (mode=search / mode=byType).

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

Drop listings priced below this amount.

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

Drop listings priced above this amount.

## `minAcres` (type: `number`):

Drop listings smaller than this size.

## `maxAcres` (type: `number`):

Drop listings larger than this size.

## `listingStatus` (type: `string`):

Filter by availability.

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

Sort results. Newest is the default; price/acres sort ascending server-side.

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

Fetch each listing's detail page for description, map coordinates, brokers, brochure/audio/video links. Slower; recommended with smaller maxItems.

## `listingIds` (type: `array`):

RanchLand listing IDs, e.g. `3578`. Full detail is always fetched for this mode.

## `listingUrls` (type: `array`):

Full ranchland.com listing URLs, e.g. `https://www.ranchland.com/ranches-for-sale/colorado/l-cross-ranch-3578`.

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

Hard cap on emitted records.

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

Optional. The site is openly accessible without a proxy; enable Apify proxy (AUTO) only if you need it.

## Actor input object example

```json
{
  "mode": "search",
  "searchQuery": "ranch",
  "listingStatus": "activeAndSold",
  "sortBy": "newest",
  "includeDetails": false,
  "listingIds": [],
  "listingUrls": [],
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `listings` (type: `string`):

Dataset containing all scraped RanchLand listings.

# 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": "ranch",
    "listingStatus": "activeAndSold",
    "sortBy": "newest",
    "includeDetails": false,
    "listingIds": [],
    "listingUrls": [],
    "maxItems": 5,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/ranchland-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": "ranch",
    "listingStatus": "activeAndSold",
    "sortBy": "newest",
    "includeDetails": False,
    "listingIds": [],
    "listingUrls": [],
    "maxItems": 5,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/ranchland-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": "ranch",
  "listingStatus": "activeAndSold",
  "sortBy": "newest",
  "includeDetails": false,
  "listingIds": [],
  "listingUrls": [],
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call crawlerbros/ranchland-scraper --silent --output-dataset

```

## MCP server setup

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