# Rent Scraper (`getdataforme/rent-scraper`) Actor

The Rent Scraper is a web crawler that extracts rental listings from Rent.com. It collects key details such as rent price, location, size, number of bedrooms, bathrooms, and listing status. The scraper efficiently handles  dynamic content, providing accurate, up-to-date rental insights.

- **URL**: https://apify.com/getdataforme/rent-scraper.md
- **Developed by:** [GetDataForMe](https://apify.com/getdataforme) (community)
- **Categories:** Real estate
- **Stats:** 21 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$35.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

## Rent Scraper: Extract Property Listings from Rent.com

Easily scrape detailed apartment listings from Rent.com with our **Rent Scraper** Actor. Whether you're searching for a single property or scraping multiple listings, this actor allows you to get property data without any restrictions.

**Note:** Activate the Proxy to prevent blocking while scraping. Running without the Proxy may lead to restrictions on data extraction.

### How the Rent Scraper Works

- **Input the URL**: Simply rent the Rent Scraper and input the URL of the property listing that you want to scrape.
- **Run the Actor**: Use the actor to scrape data from the provided Rent.com URL. 
- **Proxy Configuration**: Use **Apify Proxy** for seamless and uninterrupted scraping.

#### Input Structure

```json
{
    "proxyConfiguration": {
        "useApifyProxy": true
    },
    "urls": [
        "https://www.rent.com/texas/houston-apartments/charleston-at-fannin-station-4-100113230"
    ]
}
````

#### Expected Output

The scraped data for each property will contain a wide range of information like the property's title, pricing, amenities, location details, images, and more.

Sample Output Result:

```json
[
    {
        "title": "Charleston at Fannin Station",
        "property_type": "APARTMENTS",
        "price": "$1,335 - $1,400/mo",
        "bedrooms": 1,
        "bathrooms": 1,
        "square_footage": "555 - 555",
        "street_address": "9779 Fannin Railway",
        "city": "Houston",
        "state": "Texas",
        "zip_code": "77045",
        "neighborhood": "Pet Park",
        "parking_spaces": null,
        "image_urls": [
            "https://rentpath-res.cloudinary.com/$img_current/t_3x2_fixed_webp_xl/8e4192d3d2ae92892ef9dd28f5830474",
            "https://rentpath-res.cloudinary.com/$img_current/t_3x2_fixed_webp_xl/4f916df59372ca0d7e5ec9464ea3a43d",
            "https://rentpath-res.cloudinary.com/$img_current/t_3x2_fixed_webp_xl/9a40d0c6b0d4db48d7fc5c468dbacf1f"
        ],
        "virtual_tour_links": [],
        "listing_agent_name": null,
        "listing_agency_name": null,
        "MLS_number": null,
        "description": "Located just off the new Fannin Railway, Charleston At Fannin Station features breathtaking 1- & 2-bedroom luxury apartment homes. The luxe & sophisticated vibe of this gorgeous community is quickly making Charleston At Fannin Station one of the most sought-after places to live in Houston...",
        "property_status": null,
        "walkscore": 22,
        "nearby_schools": [
            {
                "districtName": "Houston Independent School District",
                "grade": "PK, K-5",
                "milesToGeoCode": "2.8",
                "name": "Hobby Elementary School",
                "type": "public",
                "overallRating": "1"
            },
            {
                "districtName": "Houston Independent School District",
                "grade": "9-12",
                "milesToGeoCode": "3",
                "name": "Madison High School",
                "type": "public",
                "overallRating": "1"
            }
        ],
        "amenities": [
            "Washer & Dryer In Unit",
            "Air Conditioning",
            "Dishwasher",
            "Swimming Pool",
            "Cable Ready",
            "Laundry Facility",
            "Fitness Center",
            "Extra Storage",
            "Elevator",
            "Balcony, Patio, Deck"
        ]
    }
]
```

#### Key Details Extracted:

- **Property Title**: The name of the apartment or property.
- **Price Range**: Price per month (e.g., "$1,335 - $1,400/mo").
- **Bedrooms**: Number of bedrooms.
- **Bathrooms**: Number of bathrooms.
- **Square Footage**: Area of the apartment in square feet.
- **Location**: Full address, city, state, and zip code.
- **Images**: Links to property images.
- **Virtual Tours**: Links to virtual tours if available.
- **Nearby Schools**: List of schools in the vicinity with ratings.
- **Amenities**: Features of the apartment, such as air conditioning, swimming pool, fitness center, etc.

#### Important Notes

- Make sure to use **Apify Proxy** for uninterrupted scraping.
- You may scrape unlimited listings, but excessive requests without the proxy may lead to temporary blocking by the site.

#### Support

For any questions, custom output requests, or bug reports, feel free to contact us at support@getdataforme.com or report an issue.

You can easily reach out to us here: [Contact Us](https://getdataforme.com/contact/).

Please include a subject line like **"Custom Support"** for faster assistance.

Thank you for using Rent Scraper!

# Actor input Schema

## `urls` (type: `array`):

A list of URLs of the web pages you want to scrape data from.

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

Specifies proxy servers that will be used by the scraper in order to hide its origin.

## Actor input object example

```json
{
  "urls": [
    "https://www.rent.com/texas/houston-apartments/charleston-at-fannin-station-4-100113230"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "urls": [
        "https://www.rent.com/texas/houston-apartments/charleston-at-fannin-station-4-100113230"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("getdataforme/rent-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 = {
    "urls": ["https://www.rent.com/texas/houston-apartments/charleston-at-fannin-station-4-100113230"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("getdataforme/rent-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 '{
  "urls": [
    "https://www.rent.com/texas/houston-apartments/charleston-at-fannin-station-4-100113230"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call getdataforme/rent-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Rent Scraper",
        "description": "The Rent Scraper is a web crawler that extracts rental listings from Rent.com. It collects key details such as rent price, location, size, number of bedrooms, bathrooms, and listing status. The scraper efficiently handles  dynamic content, providing accurate, up-to-date rental insights.",
        "version": "0.0",
        "x-build-id": "QvjX464Gqie65U11A"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/getdataforme~rent-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-getdataforme-rent-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/getdataforme~rent-scraper/runs": {
            "post": {
                "operationId": "runs-sync-getdataforme-rent-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/getdataforme~rent-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-getdataforme-rent-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": [
                    "urls"
                ],
                "properties": {
                    "urls": {
                        "title": "List of URLs of the Rent.com pages",
                        "type": "array",
                        "description": "A list of URLs of the web pages you want to scrape data from.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Specifies proxy servers that will be used by the scraper in order to hide its origin.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
