# Realtor Recently Sold Properties (`realtorscraper/realtor-recently-sold-properties`) Actor

Scrape recently sold properties from Realtor.com effortlessly.

- **URL**: https://apify.com/realtorscraper/realtor-recently-sold-properties.md
- **Developed by:** [Realtor Scraper](https://apify.com/realtorscraper) (community)
- **Categories:** Real estate
- **Features:** Limited permissions
- **Stats:** 101 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.12 / 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/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

## Realtor Recently Sold Properties

**Scrape recently sold properties from Realtor.com effortlessly.**

***

### Overview

This actor allows you to fetch recently sold properties from Realtor.com based on specific locations, page number, results limit, year built filters, and the timeframe within which the property was sold.

The output includes comprehensive property details including price, address, coordinates, property type, year built, photos, and agent information.

***

### Input Schema

- **locations**: Array of locations to search. Examples: `['New York, NY', 'Los Angeles, CA', '90210']`
- **page**: Page number to fetch (default: 1)
- **limit**: Number of results per page (default: 42, max: 200)
- **year_built_min**: Filter properties built after this year (optional)
- **year_built_max**: Filter properties built before this year (optional)
- **sold_within**: Filter properties sold within a timeframe. Options: `any`, `1_year`, `2_years`, `3_years`, `5_years`.

**Example Input JSON:**

```json
{
  "limit": 42,
  "locations": ["New York, NY"],
  "page": 1,
  "sold_within": "1_year",
  "year_built_min": 1800,
  "year_built_max": 1800
}
```

***

### Output

The output is a JSON array of property objects containing:

- `property_id` and `listing_id`
- `property_url`
- `address` with line, city, state, postal_code, and coordinates
- `price`, `sold_price`, `sold_date`, `year_built`
- `beds`, `baths`, `sqft`, `lot_sqft`
- `property_type` and `sub_type`
- `agent` details (name, email, phone, office_name)
- `photos` (array of URLs)
- `status` (e.g., `sold`)

**Example Output:**

```json
[
  {
    "property_id": "9031012268",
    "listing_id": "2929571213",
    "property_url": "https://www.realtor.com/realestateandhomes-detail/450-W-23rd-St-Apt-C_New-York_NY_10011_M90310-12268",
    "address": {
      "line": "450 W 23rd St Apt C",
      "city": "New York City",
      "state": "NY",
      "postal_code": "10011",
      "coordinate": {"lat": 40.747075, "lon": -74.003436}
    },
    "price": 2450000,
    "year_built": 1800,
    "beds": 2,
    "property_type": "townhomes",
    "sub_type": "co_op",
    "agent": {"name": null, "email": null, "phone": null, "office_name": null},
    "photos": ["https://ap.rdcpix.com/d2a12a40a3a690bf483d2969dd7c39adl-m3252629299s.jpg"],
    "status": "sold"
  }
]
```

***

### Key Features

- Fetch multiple locations at once.
- Paginated results.
- Filter by year built and sold timeframe.
- Returns detailed property information including agent and photos.
- Clean JSON output ready for integration.

***

### Use Cases

- Real estate analytics
- Market research
- Investment property scouting
- Data aggregation for dashboards

***

# Actor input Schema

## `locations` (type: `array`):

List of locations to search (e.g., \['New York, NY', 'Los Angeles, CA', '90210'])

## `page` (type: `integer`):

Page number to fetch (default: 1)

## `limit` (type: `integer`):

Number of results per page (default: 42)

## `year_built_min` (type: `integer`):

Filter properties built after this year (optional)

## `year_built_max` (type: `integer`):

Filter properties built before this year (optional)

## `sold_within` (type: `string`):

Filter by when property was sold

## Actor input object example

```json
{
  "locations": [
    "New York, NY"
  ],
  "page": 1,
  "limit": 42,
  "sold_within": "any"
}
```

# Actor output Schema

## `overview` (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 = {
    "locations": [
        "New York, NY"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("realtorscraper/realtor-recently-sold-properties").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 = { "locations": ["New York, NY"] }

# Run the Actor and wait for it to finish
run = client.actor("realtorscraper/realtor-recently-sold-properties").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 '{
  "locations": [
    "New York, NY"
  ]
}' |
apify call realtorscraper/realtor-recently-sold-properties --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,realtorscraper/realtor-recently-sold-properties"
        }
    }
}
```

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/CRy8dfk7e0h9A95xl/builds/v8rU4e8v2SIAYMJQR/openapi.json
