# Redfin 'For Rent' Listings API

The `Redfin 'For Rent' Listings API` endpoint will retrieve listing information from a single 'For Rent' property listing page and transform it into usable JSON.

{% tabs %}
{% tab title="cURL" %}

```bash
curl --request GET \
--url "https://api.scraperapi.com/structured/redfin/forrent?api_key=API_KEY&\
url=URL&country_code=COUNTRY_CODE&tld=TLD&raw=RAW"
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

payload = {
    'api_key': 'API_KEY',
    'url': 'URL',
    'country_code': 'COUNTRY_CODE',
    'tld': 'TLD',
    'raw': 'RAW'
}

r = requests.get('https://api.scraperapi.com/structured/redfin/forrent',params=payload)

print(r.text)
```

{% endtab %}

{% tab title="NodeJS" %}

```javascript
import fetch from 'node-fetch';

fetch(
  'https://api.scraperapi.com/structured/redfin/forrent?api_key=API_KEY&url=URL&country_code=COUNTRY_CODE&tld=TLD&raw=RAW'
)
  .then(response => response.json()) 
  .then(data => {
    console.log(data);
  })
  .catch(error => {
    console.error(error);
  });
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
$url = "https://api.scraperapi.com/structured/redfin/forrent?api_key=API_KEY&url=URL&country_code=COUNTRY_CODE&tld=TLD";

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);

$response = curl_exec($ch);
curl_close($ch);

print_r($response);
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
require 'json'

params = {
  :api_key => "API_KEY",
  :url => "URL",
  :country_code => "COUNTRY_CODE",
  :tld => "TLD",
  :raw => "RAW"
}

uri = URI('https://api.scraperapi.com/structured/redfin/forrent')
uri.query = URI.encode_www_form(params)

website_content = Net::HTTP.get(uri)
print(website_content)
```

{% endtab %}

{% tab title="Java" %}

```java
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class Main {
    public static void main(String[] args) {
        try {
            String apiKey = "API_KEY";
            String url = "URL";
            String country_code = "COUNTRY_CODE";
            String tld = "TLD";
            String raw = "RAW";

            String urlStr = "https://api.scraperapi.com/structured/redfin/forrent?api_key=" 
                            + apiKey + "&url=" + url + "&country_code=" + country_code + "&tld=" + tld + "&raw=" + raw;

            URL url = new URL(urlStr);
            HttpURLConnection conn = (HttpURLConnection) url.openConnection();
            conn.setRequestMethod("GET");

            int responseCode = conn.getResponseCode();
            if (responseCode == HttpURLConnection.HTTP_OK) {
                BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
                StringBuilder response = new StringBuilder();
                String line;
                while ((line = in.readLine()) != null) {
                    response.append(line);
                }
                in.close();
                System.out.println(response.toString());
            } else {
                System.out.println("Error in API Call. Response code: " + responseCode);
            }

        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
}
```

{% endtab %}
{% endtabs %}

**Supported Parameters**

<table><thead><tr><th width="326">Parameters</th><th>Details</th></tr></thead><tbody><tr><td><code>API_KEY</code> (required)</td><td>Your API Key.</td></tr><tr><td><code>URL</code> (required)</td><td>The URL of the Redfin page. The URL has to be the URL of a property for rent.</td></tr><tr><td><code>country_code</code></td><td>Allows you to geotarget the request. Use this parameter if you want Redfin to be scraped from a specific <a href="/pages/yl9YiS5XvNTKFwqK9ep5">country</a>.</td></tr><tr><td><code>TLD</code></td><td><p>The top level domain to scrape. </p><p></p><p>Valid options: </p><p>‘<code>com</code>’ (for <a href="http://redfin.com/">redfin.com</a>)</p><p>‘<code>ca</code>’ (for <a href="https://www.redfin.ca/">redfin.ca</a>)</p></td></tr><tr><td><code>raw</code></td><td><p>This is a boolean param - <code>true</code> or <code>false</code></p><p></p><p>If the <code>raw</code> parameter is set to <code>true</code>, the raw data will be extracted from the page without further parsing. </p><p></p><p><strong><code>Important:</code></strong> The structure of the data in raw mode cannot be guaranteed, it’s a tradeoff: You get a lot more information back, but the structure of the response may change if <strong><code>Redfin</code></strong> modifies their page layout.</p></td></tr></tbody></table>

## Sample Response

<details>

<summary>Response.json</summary>

```json
{
  "url": "https://www.redfin.com/MD/Baltimore/Domain-Brewers-Hill/apartment/45425151",
  "type": "for_rent",
  "name": "Domain Brewers Hill",
  "map_url": "https://maps.google.com/maps/api/staticmap?sensor=false&style=feature%3Aadministrative.land_parcel%7Cvisibility%3Aoff&style=feature%3Alandscape.man_made%7Cvisibility%3Aoff&style=feature%3Atransit.station%7Chue%3A0xffa200&center=39.2789921%2C-76.566816&channel=seekers-search_map&size=574x430&format=jpg&scale=2&zoom=11&client=gme-redfin&signature=OLlnwknVzX_j_5CTXqaRKUQ-3kY=",
  "bed_min": 1,
  "bed_max": 2,
  "bath_min": 1,
  "bath_max": 2,
  "price_min": 1894,
  "price_max": 3003,
  "sqft_min": 723,
  "sqft_max": 1417,
  "description": "Domain Brewers Hill offers apartments in Baltimore with stunning views, modern finishes, and great amenities. Choose from furnished or unfurnished apartments featuring wood plank flooring, in-home was",
  "available_units": 10,
  "address": {
    "street_line": "1200 S Conkling St",
    "city": "Baltimore",
    "state": "MD",
    "zip": "21224"
  },
  "last_updated": "2025-03-04T12:45:30.733106Z",
  "image_urls": [
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/0_7.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/1_6.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/2_6.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/3_5.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/4_5.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/5_4.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/6_4.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/7_4.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/8_4.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/9_4.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/10_4.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/11_4.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/12_4.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/13_4.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/14_4.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/15_4.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/16_4.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/17_4.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/18_5.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/19_8.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/20_6.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/21_6.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/22_6.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/23_7.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/24_7.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/25_7.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/26_7.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/27_7.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/28_4.jpg",
    "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/29_4.jpg"
  ],
  "floor_plans": [
    {
      "name": "522",
      "unit_type": {
        "unit_type_id": "a45be046-1b13-4152-8784-e2f7d896dbc2",
        "units": [
          {
            "unit_id": "addb1b30-cc12-46e9-b294-64de7b987a66",
            "bedrooms": 1,
            "date_available": "2025-05-25T00:00:00Z",
            "deposit": 500,
            "deposit_currency": "USD",
            "floor": 5,
            "full_baths": 1,
            "half_baths": 0,
            "name": "522",
            "rent_currency": "USD",
            "rent_price": 2558,
            "sqft": 1246,
            "status": "upcoming"
          }
        ],
        "available_lease_terms": [
          "3-Month",
          "6-Month",
          "7-Month",
          "9-Month",
          "12-Month",
          "13-Month"
        ],
        "available_photos": [
          {
            "start_pos": 0,
            "end_pos": 0,
            "version": "2"
          }
        ],
        "available_units": 1,
        "bedrooms": 1,
        "date_available": "2025-05-25T00:00:00Z",
        "full_baths": 1,
        "half_baths": 0,
        "name": "Plan E (A1E)",
        "rent_price_max": 2558,
        "rent_price_min": 2558,
        "sqft_max": 1246,
        "sqft_min": 1246,
        "status": "upcoming",
        "style": "Plan E (A1E)",
        "total_units": 1
      },
      "bedroom_title": "1 Bed",
      "available": true,
      "unit_id": "addb1b30-cc12-46e9-b294-64de7b987a66",
      "bedrooms": 1,
      "date_available": "2025-05-25T00:00:00Z",
      "deposit": 500,
      "deposit_currency": "USD",
      "floor": 5,
      "full_baths": 1,
      "half_baths": 0,
      "rent_currency": "USD",
      "rent_price": 2558,
      "sqft": 1246,
      "status": "upcoming",
      "available_lease_terms": [
        "3-Month",
        "6-Month",
        "7-Month",
        "9-Month",
        "12-Month",
        "13-Month"
      ],
      "available_units": 1,
      "rent_price_max": 2558,
      "rent_price_min": 2558,
      "style": "Plan E (A1E)",
      "total_units": 1,
      "image_urls": [
        "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/ut/a45be046-1b13-4152-8784-e2f7d896dbc2/0_2.jpg"
      ]
    },
    {
      "name": "509",
      "unit_type": {
        "unit_type_id": "eb1ca7bc-6b96-4865-8b1d-4221f3ad7251",
        "units": [
          {
            "unit_id": "1d3947ef-eb84-4c93-bad5-53ab83f69bb6",
            "bedrooms": 1,
            "date_available": "2025-04-25T00:00:00Z",
            "deposit": 500,
            "deposit_currency": "USD",
            "floor": 5,
            "full_baths": 1,
            "half_baths": 0,
            "name": "509",
            "rent_currency": "USD",
            "rent_price": 2368,
            "sqft": 981,
            "status": "upcoming"
          },
          {
            "unit_id": "4cb8e192-d999-4d69-9c07-2513b6f8f80c",
            "bedrooms": 1,
            "date_available": "2025-05-07T00:00:00Z",
            "deposit": 500,
            "deposit_currency": "USD",
            "floor": 2,
            "full_baths": 1,
            "half_baths": 0,
            "name": "207",
            "rent_currency": "USD",
            "rent_price": 2206,
            "sqft": 981,
            "status": "upcoming"
          }
        ],
        "available_lease_terms": [
          "3-Month",
          "6-Month",
          "7-Month",
          "9-Month",
          "12-Month",
          "13-Month"
        ],
        "available_photos": [
          {
            "start_pos": 0,
            "end_pos": 0,
            "version": "2"
          }
        ],
        "available_units": 2,
        "bedrooms": 1,
        "date_available": "2025-04-25T00:00:00Z",
        "full_baths": 1,
        "half_baths": 0,
        "name": "Plan B (A1B)",
        "rent_price_max": 2368,
        "rent_price_min": 2206,
        "sqft_max": 981,
        "sqft_min": 981,
        "status": "upcoming",
        "style": "Plan B (A1B)",
        "total_units": 2
      },
      "bedroom_title": "1 Bed",
      "available": true,
      "unit_id": "1d3947ef-eb84-4c93-bad5-53ab83f69bb6",
      "bedrooms": 1,
      "date_available": "2025-04-25T00:00:00Z",
      "deposit": 500,
      "deposit_currency": "USD",
      "floor": 5,
      "full_baths": 1,
      "half_baths": 0,
      "rent_currency": "USD",
      "rent_price": 2368,
      "sqft": 981,
      "status": "upcoming",
      "available_lease_terms": [
        "3-Month",
        "6-Month",
        "7-Month",
        "9-Month",
        "12-Month",
        "13-Month"
      ],
      "available_units": 2,
      "rent_price_max": 2368,
      "rent_price_min": 2206,
      "style": "Plan B (A1B)",
      "total_units": 2,
      "image_urls": [
        "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/ut/eb1ca7bc-6b96-4865-8b1d-4221f3ad7251/0_2.jpg"
      ]
    },
    {
      "name": "207",
      "unit_type": {
        "unit_type_id": "eb1ca7bc-6b96-4865-8b1d-4221f3ad7251",
        "units": [
          {
            "unit_id": "1d3947ef-eb84-4c93-bad5-53ab83f69bb6",
            "bedrooms": 1,
            "date_available": "2025-04-25T00:00:00Z",
            "deposit": 500,
            "deposit_currency": "USD",
            "floor": 5,
            "full_baths": 1,
            "half_baths": 0,
            "name": "509",
            "rent_currency": "USD",
            "rent_price": 2368,
            "sqft": 981,
            "status": "upcoming"
          },
          {
            "unit_id": "4cb8e192-d999-4d69-9c07-2513b6f8f80c",
            "bedrooms": 1,
            "date_available": "2025-05-07T00:00:00Z",
            "deposit": 500,
            "deposit_currency": "USD",
            "floor": 2,
            "full_baths": 1,
            "half_baths": 0,
            "name": "207",
            "rent_currency": "USD",
            "rent_price": 2206,
            "sqft": 981,
            "status": "upcoming"
          }
        ],
        "available_lease_terms": [
          "3-Month",
          "6-Month",
          "7-Month",
          "9-Month",
          "12-Month",
          "13-Month"
        ],
        "available_photos": [
          {
            "start_pos": 0,
            "end_pos": 0,
            "version": "2"
          }
        ],
        "available_units": 2,
        "bedrooms": 1,
        "date_available": "2025-04-25T00:00:00Z",
        "full_baths": 1,
        "half_baths": 0,
        "name": "Plan B (A1B)",
        "rent_price_max": 2368,
        "rent_price_min": 2206,
        "sqft_max": 981,
        "sqft_min": 981,
        "status": "upcoming",
        "style": "Plan B (A1B)",
        "total_units": 2
      },
      "bedroom_title": "1 Bed",
      "available": true,
      "unit_id": "4cb8e192-d999-4d69-9c07-2513b6f8f80c",
      "bedrooms": 1,
      "date_available": "2025-05-07T00:00:00Z",
      "deposit": 500,
      "deposit_currency": "USD",
      "floor": 2,
      "full_baths": 1,
      "half_baths": 0,
      "rent_currency": "USD",
      "rent_price": 2206,
      "sqft": 981,
      "status": "upcoming",
      "available_lease_terms": [
        "3-Month",
        "6-Month",
        "7-Month",
        "9-Month",
        "12-Month",
        "13-Month"
      ],
      "available_units": 2,
      "rent_price_max": 2368,
      "rent_price_min": 2206,
      "style": "Plan B (A1B)",
      "total_units": 2,
      "image_urls": [
        "https://ssl.cdn-redfin.com/photo/rent/1bfa1fde-0036-468e-99d5-cee19e9bfc0d/bigphoto/ut/eb1ca7bc-6b96-4865-8b1d-4221f3ad7251/0_2.jpg"
      ]
    },
     ...
    {
      "name": "Digital Harbor High School",
      "address": "1100 Covington St, Baltimore, MD 21230",
      "url": "https://www.redfin.com/school/88481/MD/Baltimore/Digital-Harbor-High-School",
      "review_count": 10,
      "great_schools_rating": 1,
      "great_school_url": "https://www.greatschools.org/maryland/baltimore/2049-Digital-Harbor-High-School/",
      "parent_rating": 2,
      "distance_in_miles": "2.2",
      "grade_ranges": "9-12",
      "institution_type": "Public",
      "number_of_students": 1315,
      "student_to_teacher_ratio": 17
    }
  ]
}
```

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.scraperapi.com/structured-data-endpoints/real-estate/redfin/redfin-for-rent-listings-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
