# Realtor.com Market Data Scraper: Prices, Schools, Commute (`happyendpoint/realtor-com-market-data-scraper`) Actor

Get local market figures from Realtor.com for a ZIP code, city, county or neighborhood: market heat score, median prices and days on market, neighborhood guides, area boundaries, new and price-cut listings, schools, districts and commute times.

- **URL**: https://apify.com/happyendpoint/realtor-com-market-data-scraper.md
- **Developed by:** [Happy Endpoint](https://apify.com/happyendpoint) (community)
- **Categories:** Real estate
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What this Actor does

Home prices tell you about one house; this Actor tells you about the area around it. Ask for a ZIP code's market heat, the median list, rent and sold prices of a city, county or neighborhood, a neighborhood guide with its statistics, the outline of an area drawn as a polygon, and a feed of new listings, open houses and price cuts for a city. Add the schools of a place with their ratings and enrolment, one school or one district in detail, and the minutes it takes to get from a home to a destination. Most operations return one record, and the school search returns one row per school.

The figures come from what Realtor.com shows to any visitor on its market, neighborhood, school and commute pages: heat scores, median prices, guide statistics, area outlines, school and district profiles and travel times.

### Use cases

- Compare median prices and days on the market across the cities of a metro before choosing where to invest.
- Rank ZIP codes by market heat for a monthly report.
- Add school ratings and district size to a spreadsheet of homes under review.
- Draw the outline of a neighborhood on your own map from its boundary polygon.
- Check how long the trip from a short list of homes to an office takes by car, on foot or by transit.
- Watch the price cuts and open houses of one city each week.

### How to use

1. Open the Actor's input form in Apify Console, or prepare a JSON input for the API.
2. Pick an `operation`: each one is a different kind of request to Realtor.com.
3. Set `maxItems` to the number of results you need. It is the only quantity setting; paging is handled for you.
4. Start the run. The results land in the run's dataset, where you can download them as JSON, CSV, Excel and
   other formats, or read them through the Apify API.

This is the example input, the one the input form starts with:

```json
{
  "operation": "geoStatistics",
  "maxItems": 1,
  "geoType": "city",
  "city": "Phoenix",
  "stateCode": "AZ"
}
```

### Input

| Field | Type | Description | Used by |
| --- | --- | --- | --- |
| `operation` | string | Which data to fetch. Each option is one kind of request. | all operations |
| `maxItems` | integer | The most results to return. The run stops once it has this many. | all operations |
| `postalCode` | string | A five-digit ZIP code. It needs no State code. | Market heat of a ZIP code, Market statistics of an area, Area outline, Schools in an area |
| `city` | string | The city name. Give its State code with it. | Market statistics of an area, Market feed of a city, Area outline, Schools in an area |
| `stateCode` | string | The two-letter state code, such as AZ. It goes with a City, a County or a Neighborhood. | Market statistics of an area, Market feed of a city, Area outline, Schools in an area |
| `neighborhoodSlug` | string | The Realtor.com identifier of a neighborhood. Take it from the slug_id of a row of the Location suggestions operation in the Realtor.com Scraper: Homes for Sale, Rent and Sold Actor. Neighborhood guide needs it. | Neighborhood guide |
| `geoType` | string | The kind of area that the market statistics describe. It decides which place fields to fill in. City is used when you leave it empty. | Market statistics of an area |
| `propertyId` | string | The Realtor.com ID of the home where the trip starts. Commute time only. | Commute time to a destination |
| `destinationAddress` | string | Where the trip ends. A place or landmark name works, such as a city, a campus or a station; a full address is not needed. | Commute time to a destination |
| `schoolId` | string | The ID of one school, as Schools in an area returns it. School details needs it. | School details |
| `county` | string | The county name without a trailing County. Give its State code with it. | Market statistics of an area, Area outline, Schools in an area |
| `neighborhood` | string | A neighborhood name. Give its City and State code with it, since names repeat across cities. | Market statistics of an area, Area outline, Schools in an area |
| `state` | string | The full name of a state, as an alternative to the State code when the area level is state. | Market statistics of an area |
| `location` | string | A place written as plain text, such as a city with its state code or a ZIP code. Area outline only; it overrides the other place fields. | Area outline |
| `byPropertyType` | string | A property type code, such as land, condos or single_family, to report the statistics for that type of home. Leave it empty for one blended set of figures. | Market statistics of an area |
| `status` | string | The kinds of listing counted inside the outline, separated by commas: for_sale, for_rent, sold, ready_to_build, off_market or other. Area outline only. | Area outline |
| `transportationType` | string | How the trip is made. Driving is used when you leave it empty. | Commute time to a destination |
| `withTraffic` | boolean | Add live traffic to a driving estimate. It is on unless you switch it off, and other modes ignore it. | Commute time to a destination |
| `educationLevel` | string | Only schools of this level. | Schools in an area |
| `schoolDistrictId` | string | The ID of a school district, as the school rows return it in their district block. Schools in an area uses it as a filter, and School district details needs it. | Schools in an area, School district details |

What each field accepts, the fields each operation requires and an example input for each are under Request and response schemas below.

### Output

Every row holds the run's own fields first (`operation`, `scrapedAt` and `sourceUrl`), then the
core fields `id`, `url`, `title`, `price`, `currency`, `location`, and then every field of the source item as Realtor.com
returns it. A field with no value on Realtor.com is empty in the row;
the example below shows only fields that have a value.
The dataset has an overview view and one view per operation.

The fields of each operation's rows are under Request and response schemas below.

An example of Market statistics of an area results.
Long lists show only their first items here; a real row holds everything in full:

```json output-excerpt
[
  {
    "operation": "geoStatistics",
    "scrapedAt": "2026-11-23T07:19:48.746Z",
    "housing_market": {
      "by_prop_type": [
        {
          "type": "single_family",
          "attributes": {
            "median_listing_price": 519450
          }
        },
        {
          "type": "condo_townhome_rowhome_coop",
          "attributes": {
            "median_listing_price": 315000
          }
        },
        {
          "type": "apartment"
        }
      ],
      "median_rent_price": 1606,
      "median_listing_price": 450000,
      "median_sold_price": 450000,
      "median_days_on_market": 65,
      "median_price_per_sqft": 281
    }
  }
]
```

### Pricing

This Actor uses pay-per-event pricing: a start fee of $0.002 for each run, plus
$0.002 for each result in the dataset. Every operation is priced the same way.

| Operation | Start fee per run | Price per result |
| --- | --- | --- |
| Market heat of a ZIP code | $0.002 | $0.002 |
| Neighborhood guide | $0.002 | $0.002 |
| Market statistics of an area | $0.002 | $0.002 |
| Commute time to a destination | $0.002 | $0.002 |
| Market feed of a city | $0.002 | $0.002 |
| Area outline | $0.002 | $0.002 |
| Schools in an area | $0.002 | $0.002 |
| School details | $0.002 | $0.002 |
| School district details | $0.002 | $0.002 |

Worked examples for one run:

| Results | Total cost |
| --- | --- |
| 10 | $0.022 |
| 100 | $0.202 |
| 1,000 | $2.002 |

Invalid input, a not-found answer or an internal error adds no charge of its own: such a run pays the start
fee plus only the results it delivered before it stopped (none for invalid input). To cap what one run may
cost, set the maximum cost per run when you start it.

### Limits and tips

- One run returns at most 1,000 results; the input form allows no higher `maxItems`.
- Set `maxItems` to what you need: you pay per result, and a smaller run finishes sooner.
- A request that matches nothing ends with an empty dataset and costs only the start fee.
- Only areas in the United States are covered.
- Market statistics follow the Area level: a city needs a State code, a county needs one too, a neighborhood needs a City and a State code, a state needs only the State code or State name, and a ZIP needs a ZIP code.
- Most operations answer with one record, so their runs return one row. Only Schools in an area returns many, up to 1,000.
- Market feed needs a City with its State code; its new listings, open houses and price cuts hold up to 20 homes each.
- Commute time needs the ID of a property and a destination, and works only for a property the site knows.
- Neighborhood guide needs a neighborhood slug, which the Location suggestions operation of the Realtor.com Scraper: Homes for Sale, Rent and Sold Actor returns.
- The district block of a school row holds the district ID to use in School district details.

### Resume a run that stopped at your cost limit

If you set a maximum cost per run and a run reaches it, the run stops early. To get the rest, resurrect the
run in Apify Console, or through the API, with a higher limit. The Actor resumes where it stopped: results
already in the dataset are not fetched or charged again, and the run still ends at `maxItems`.
Resurrecting can charge the start fee again.

### Running without input

The example input above is also this Actor's example run input. Apify's API documents that a run started with
no input at all uses the example run input: Market statistics of an area, at most 1 results,
which costs at most $0.004 (the start fee plus 1 results). For your own runs, always send an input with the fields you need.

### FAQ

#### Do I need an account on Realtor.com?

No. The Actor reads public data, so an Apify account is all you need.

#### How do I get the data into my own tools?

Download the dataset from the run's page, or read it through the Apify API and its integrations.

#### How do I find a school district ID?

Run Schools in an area for the place you care about. Each school row has a district block that holds the district ID and name, and you can paste that ID into School district details or into the School district ID filter.

#### Why does the market feed return a single row?

The feed is one record that holds several lists: new listings, open houses, price cuts, a price trend and neighborhoods. A news list is part of the record but comes back empty. Each list sits inside the row under its own key.

#### What does the market heat score tell me?

It is the score and label Realtor.com gives a ZIP code for how fast its homes are moving, with a short description. Use it to rank areas, not as a price forecast.

#### Do the rows contain personal data?

No row describes a private person. Schools and districts carry a phone number and a website, which are contact details of an institution.

### Request and response schemas

This section lists every input field with what it accepts, then, for each operation, the fields it reads, an
example input and the fields of its rows. All of it is built from this Actor's input schema and dataset views, so
it matches the input form; the Input table above describes each input field.

Every input field and what it accepts:

| Field | Label | Type | Allowed values and limits |
| --- | --- | --- | --- |
| `operation` | Operation | string | `marketHotness` (Market heat of a ZIP code), `neighborhoodInfo` (Neighborhood guide), `geoStatistics` (Market statistics of an area), `commuteTime` (Commute time to a destination), `marketFeed` (Market feed of a city), `mapBoundary` (Area outline), `schoolsSearch` (Schools in an area), `school` (School details), `schoolDistrict` (School district details) |
| `maxItems` | Maximum results | integer | 1 to 1,000; default 100 |
| `postalCode` | ZIP code | string | at most 10 characters |
| `city` | City | string | at most 100 characters |
| `stateCode` | State code | string | at most 2 characters |
| `neighborhoodSlug` | Neighborhood slug | string | at most 200 characters |
| `geoType` | Area level | string | `city` (City), `county` (County), `neighborhood` (Neighborhood), `state` (State), `zip` (ZIP code) |
| `propertyId` | Property ID | string | at most 50 characters |
| `destinationAddress` | Destination | string | at most 300 characters |
| `schoolId` | School ID | string | at most 100 characters |
| `county` | County | string | at most 100 characters |
| `neighborhood` | Neighborhood | string | at most 100 characters |
| `state` | State name | string | at most 50 characters |
| `location` | Location | string | at most 200 characters |
| `byPropertyType` | Split by property type | string | at most 100 characters |
| `status` | Listing status | string | matching `^(for_sale\|for_rent\|sold\|ready_to_build\|off_market\|other)(,(for_sale\|for_rent\|sold\|ready_to_build\|off_market\|other))*$` |
| `transportationType` | Travel mode | string | `driving` (Driving), `walking` (Walking), `cycling` (Cycling), `public_transport` (Public transit) |
| `withTraffic` | Include current traffic | boolean | - |
| `educationLevel` | School level | string | `elementary` (Elementary), `middle` (Middle), `high` (High), `private` (Private) |
| `schoolDistrictId` | School district ID | string | at most 100 characters |

- **Type** of a row field: its JSON type in the rows the operation returns; `-` means no type is listed for it.

Every row starts with these fields:

| Field | Type | Meaning |
| --- | --- | --- |
| `operation` | string | The operation that returned the row. |
| `scrapedAt` | string | When the row's page of results was read, as an ISO 8601 date and time in UTC. |
| `sourceUrl` | string or null | The item's own page: the `url` value when it is a full web link, else null. |
| `id` | any type, or null | The item's ID. |
| `url` | any type, or null | The item's link. |
| `title` | any type, or null | The item's title or name. |
| `price` | any type, or null | The item's price. |
| `currency` | any type, or null | The currency of the price. |
| `location` | any type, or null | The item's location. |

The six core fields, `id` to `location`, are null when the source has no such value or the operation
does not fill them. After them come the fields of the source item, each under the name Realtor.com gives it; a source
field with one of the names above, or named `raw`, is kept under `raw` instead.

#### Market heat of a ZIP code

Request: set `operation` to `marketHotness`.

- Required: `postalCode`.
- Optional: `maxItems`.

Example input. Replace each value in angle brackets with your own:

```json
{
  "operation": "marketHotness",
  "maxItems": 100,
  "postalCode": "<ZIP code>"
}
```

Response: the fields the dataset's Market heat of a ZIP code view shows. Each row also holds every other field of the
source item.

| Field | Type |
| --- | --- |
| `title` | string |
| `subtitle` | string |
| `hotness_score` | number |
| `hotness_badge` | string |
| `hotness_description` | string |

#### Neighborhood guide

Request: set `operation` to `neighborhoodInfo`.

- Required: `neighborhoodSlug`.
- Optional: `maxItems`.

Example input. Replace each value in angle brackets with your own:

```json
{
  "operation": "neighborhoodInfo",
  "maxItems": 100,
  "neighborhoodSlug": "<Neighborhood slug>"
}
```

Response: the fields the dataset's Neighborhood guide view shows. Each row also holds every other field of the
source item.

| Field | Type |
| --- | --- |
| `id` | string |
| `title` | string |
| `subtitle` | string |
| `url` | string |
| `total_homes_for_sale_count` | number |
| `statistics` | array |

#### Market statistics of an area

Request: set `operation` to `geoStatistics`.

- Required: none.
- Optional: `maxItems`, `postalCode`, `city`, `stateCode`, `geoType`, `county`, `neighborhood`, `state`, `byPropertyType`.

Example input:

```json
{
  "operation": "geoStatistics",
  "maxItems": 1,
  "city": "Phoenix",
  "stateCode": "AZ",
  "geoType": "city"
}
```

Response: the fields the dataset's Market statistics of an area view shows. Each row also holds every other field of the
source item.

| Field | Type |
| --- | --- |
| `housing_market` | object |

#### Commute time to a destination

Request: set `operation` to `commuteTime`.

- Required: `propertyId`, `destinationAddress`.
- Optional: `maxItems`, `transportationType`, `withTraffic`.

Example input. Replace each value in angle brackets with your own:

```json
{
  "operation": "commuteTime",
  "maxItems": 100,
  "propertyId": "<Property ID>",
  "destinationAddress": "<Destination>"
}
```

Response: the fields the dataset's Commute time to a destination view shows. Each row also holds every other field of the
source item.

| Field | Type |
| --- | --- |
| `duration` | object |

#### Market feed of a city

Request: set `operation` to `marketFeed`.

- Required: none.
- Optional: `maxItems`, `city`, `stateCode`.

Example input:

```json
{
  "operation": "marketFeed",
  "maxItems": 100
}
```

Response: the fields the dataset's Market feed of a city view shows. Each row also holds every other field of the
source item.

| Field | Type |
| --- | --- |
| `market_trends` | object |
| `new_listings` | object |
| `price_reduced` | object |
| `open_houses` | object |
| `neighborhoods` | object |

#### Area outline

Request: set `operation` to `mapBoundary`.

- Required: none.
- Optional: `maxItems`, `postalCode`, `city`, `stateCode`, `county`, `neighborhood`, `location`, `status`.

Example input:

```json
{
  "operation": "mapBoundary",
  "maxItems": 100
}
```

Response: the fields the dataset's Area outline view shows. Each row also holds every other field of the
source item.

| Field | Type |
| --- | --- |
| `boundary` | object |
| `total` | number |

#### Schools in an area

Request: set `operation` to `schoolsSearch`.

- Required: none.
- Optional: `maxItems`, `postalCode`, `city`, `stateCode`, `county`, `neighborhood`, `educationLevel`, `schoolDistrictId`.

Example input:

```json
{
  "operation": "schoolsSearch",
  "maxItems": 100
}
```

Response: the fields the dataset's Schools in an area view shows. Each row also holds every other field of the
source item.

| Field | Type |
| --- | --- |
| `id` | string |
| `title` | string |
| `education_levels` | array |
| `funding_type` | string |
| `grades` | array |
| `rating` | number |
| `parent_rating` | number |
| `student_count` | number |
| `student_teacher_ratio` | number |
| `district` | object |

#### School details

Request: set `operation` to `school`.

- Required: `schoolId`.
- Optional: `maxItems`.

Example input. Replace each value in angle brackets with your own:

```json
{
  "operation": "school",
  "maxItems": 100,
  "schoolId": "<School ID>"
}
```

Response: the fields the dataset's School details view shows. Each row also holds every other field of the
source item.

| Field | Type |
| --- | --- |
| `id` | string |
| `title` | string |
| `education_levels` | array |
| `funding_type` | string |
| `rating` | number |
| `student_count` | number |
| `phone` | string |
| `website` | string |

#### School district details

Request: set `operation` to `schoolDistrict`.

- Required: `schoolDistrictId`.
- Optional: `maxItems`.

Example input. Replace each value in angle brackets with your own:

```json
{
  "operation": "schoolDistrict",
  "maxItems": 100,
  "schoolDistrictId": "<School district ID>"
}
```

Response: the fields the dataset's School district details view shows. Each row also holds every other field of the
source item.

| Field | Type |
| --- | --- |
| `id` | string |
| `title` | string |
| `slug_id` | string |
| `student_count` | number |
| `school_count` | number |
| `grades` | array |
| `phone` | string |
| `website` | string |

### More Realtor.com Actors

- [realtor-com-property-search-scraper](https://apify.com/happyendpoint/realtor-com-property-search-scraper)

### Related Actors

- [houzz-professionals-scraper](https://apify.com/happyendpoint/houzz-professionals-scraper)
- [rent-com-rental-search-scraper](https://apify.com/happyendpoint/rent-com-rental-search-scraper)
- [redfin-property-search-scraper](https://apify.com/happyendpoint/redfin-property-search-scraper)

### Disclaimer

This Actor is an independent tool. It is not affiliated with, endorsed by or sponsored by Realtor.com. All
trademarks belong to their owners.

### Is it legal to use this data?

This Actor collects data that Realtor.com shows publicly.
Some fields hold business contact data: `news_articles`, `phone`, `website`.
Personal data is protected by laws such as the GDPR in the EU. Collect and use it only when you have a lawful
reason, keep only what you need, and do not use it for unsolicited messages. If you are unsure, ask a lawyer.

# Changelog

This Actor's version history is a separate document: https://apify.com/happyendpoint/realtor-com-market-data-scraper/changelog.md

# Actor input Schema

## `operation` (type: `string`):

Which data to fetch. Each option is one kind of request.

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

The most results to return. The run stops once it has this many.

## `postalCode` (type: `string`):

A five-digit ZIP code. It needs no State code. Used by: Market heat of a ZIP code, Market statistics of an area, Area outline, Schools in an area.

## `city` (type: `string`):

The city name. Give its State code with it. Used by: Market statistics of an area, Market feed of a city, Area outline, Schools in an area.

## `stateCode` (type: `string`):

The two-letter state code, such as AZ. It goes with a City, a County or a Neighborhood. Used by: Market statistics of an area, Market feed of a city, Area outline, Schools in an area.

## `neighborhoodSlug` (type: `string`):

The Realtor.com identifier of a neighborhood. Take it from the slug_id of a row of the Location suggestions operation in the Realtor.com Scraper: Homes for Sale, Rent and Sold Actor. Neighborhood guide needs it. Used by: Neighborhood guide.

## `geoType` (type: `string`):

The kind of area that the market statistics describe. It decides which place fields to fill in. City is used when you leave it empty. Used by: Market statistics of an area.

## `propertyId` (type: `string`):

The Realtor.com ID of the home where the trip starts. Commute time only. Used by: Commute time to a destination.

## `destinationAddress` (type: `string`):

Where the trip ends. A place or landmark name works, such as a city, a campus or a station; a full address is not needed. Used by: Commute time to a destination.

## `schoolId` (type: `string`):

The ID of one school, as Schools in an area returns it. School details needs it. Used by: School details.

## `county` (type: `string`):

The county name without a trailing County. Give its State code with it. Used by: Market statistics of an area, Area outline, Schools in an area.

## `neighborhood` (type: `string`):

A neighborhood name. Give its City and State code with it, since names repeat across cities. Used by: Market statistics of an area, Area outline, Schools in an area.

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

The full name of a state, as an alternative to the State code when the area level is state. Used by: Market statistics of an area.

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

A place written as plain text, such as a city with its state code or a ZIP code. Area outline only; it overrides the other place fields. Used by: Area outline.

## `byPropertyType` (type: `string`):

A property type code, such as land, condos or single_family, to report the statistics for that type of home. Leave it empty for one blended set of figures. Used by: Market statistics of an area.

## `status` (type: `string`):

The kinds of listing counted inside the outline, separated by commas: for_sale, for_rent, sold, ready_to_build, off_market or other. Area outline only. Used by: Area outline.

## `transportationType` (type: `string`):

How the trip is made. Driving is used when you leave it empty. Used by: Commute time to a destination.

## `withTraffic` (type: `boolean`):

Add live traffic to a driving estimate. It is on unless you switch it off, and other modes ignore it. Used by: Commute time to a destination.

## `educationLevel` (type: `string`):

Only schools of this level. Used by: Schools in an area.

## `schoolDistrictId` (type: `string`):

The ID of a school district, as the school rows return it in their district block. Schools in an area uses it as a filter, and School district details needs it. Used by: Schools in an area, School district details.

## Actor input object example

```json
{
  "operation": "geoStatistics",
  "maxItems": 1,
  "city": "Phoenix",
  "stateCode": "AZ",
  "geoType": "city"
}
```

# Actor output Schema

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

No description

## `marketHotness` (type: `string`):

No description

## `neighborhoodInfo` (type: `string`):

No description

## `geoStatistics` (type: `string`):

No description

## `commuteTime` (type: `string`):

No description

## `marketFeed` (type: `string`):

No description

## `mapBoundary` (type: `string`):

No description

## `schoolsSearch` (type: `string`):

No description

## `school` (type: `string`):

No description

## `schoolDistrict` (type: `string`):

No description

## `summary` (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 = {
    "operation": "geoStatistics",
    "maxItems": 1,
    "city": "Phoenix",
    "stateCode": "AZ",
    "geoType": "city"
};

// Run the Actor and wait for it to finish
const run = await client.actor("happyendpoint/realtor-com-market-data-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 = {
    "operation": "geoStatistics",
    "maxItems": 1,
    "city": "Phoenix",
    "stateCode": "AZ",
    "geoType": "city",
}

# Run the Actor and wait for it to finish
run = client.actor("happyendpoint/realtor-com-market-data-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 '{
  "operation": "geoStatistics",
  "maxItems": 1,
  "city": "Phoenix",
  "stateCode": "AZ",
  "geoType": "city"
}' |
apify call happyendpoint/realtor-com-market-data-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,happyendpoint/realtor-com-market-data-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/GCdY5rZCoAYgg3xPH/builds/lPadKXfTJiND1TZDW/openapi.json
