> For the complete documentation index, see [llms.txt](https://docs.scraperapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scraperapi.com/structured-data-endpoints/real-estate/redfin/redfin-for-sale-listings-api.md).

# Redfin 'For Sale' Listings API

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

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

```bash
curl --request GET \
--url "https://api.scraperapi.com/structured/redfin/forsale?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/forsale',params=payload)

print(r.text)
```

{% endtab %}

{% tab title="NodeJS" %}

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

fetch(
  'https://api.scraperapi.com/structured/redfin/forsale?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/forsale?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/forsale')
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/forsale?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 sale.</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 country.</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/TX/Galveston/3512-Muscatee-Cir-77554/home/110612183",
  "type": "for_sale",
  "image_urls": [
    "https://ssl.cdn-redfin.com/photo/104/bigphoto/247/42117247_3.jpg",
    "https://ssl.cdn-redfin.com/photo/104/bigphoto/247/42117247_1_2.jpg",
    "... (44 more items)"
  ],
  "price": 809000,
  "currency": "$",
  "sq_ft": 2169,
  "price_per_sq_ft": 373,
  "latitude": 29.2163087,
  "longitude": -94.9460971,
  "beds": 3,
  "baths": 4,
  "url_map": "https://maps.google.com/maps/api/staticmap?sensor=false&style=feature%3Aadminist...",
  "description": "Canal-front home in the highly sought-after Pirates Cove community, designed for...",
  "address": "3512 Muscatee Cir, Galveston, TX 77554",
  "active": true,
  "agents": [
    {
      "name": "Marylouise Caravella",
      "broker_name": "Caravella Coastal a division of The Real Estate Brokerage Co. LLC",
      "agent_phone_number": "713-598-6719"
    }
  ],
  "amenities": {
    "hoa_dues": "$42/mo",
    "stories": "1, One",
    "style": "Traditional",
    "view": "Canal, Water",
    "community": "Pirates Cove 3",
    "county": "Galveston",
    "mls": "42117247",
    "built": "1977",
    "lot_size": "6,442 sq ft",
    "property_type": "Single-family",
    "heating_cooling": "Has A/C",
    "laundry": "Washer and dryer hookups",
    "parking": "2 car garage"
  },
  "notice_content": [
    "This home is popular"
  ],
  "year_built": 1977,
  "property_type": "Single Family Residential",
  "sale_events": [
    {
      "description": "Listing Removed",
      "date": "2026-06-02T07:00:00.000Z",
      "source": "HARMLS",
      "souce_id": "70324631"
    },
    {
      "price": 809000,
      "description": "Listed",
      "description_from_listing_service": "Active",
      "date": "2026-06-02T07:00:00.000Z",
      "source": "HARMLS",
      "souce_id": "42117247"
    },
    "... (2 more items)"
  ],
  "tax_events": [
    {
      "year": 2025,
      "property_tax": 16302.34,
      "land": 270610,
      "additions": 691040,
      "assessed_value": 961650
    },
    {
      "year": 2024,
      "property_tax": 15132.86
    },
    "... (10 more items)"
  ],
  "schools": [
    {
      "name": "Oppe Elementary School",
      "address": "2915 81st St, Galveston, TX 77554",
      "url": "https://www.redfin.com/school/135514/TX/Galveston/Oppe-Elementary-School",
      "review_count": 8,
      "great_schools_rating": 8,
      "great_school_url": "https://www.greatschools.org/texas/galveston/2829-Oppe-Elementary-School/",
      "parent_rating": 5,
      "distance_in_miles": "6.6",
      "grade_ranges": "PreK-4",
      "institution_type": "Public",
      "number_of_students": 669,
      "student_to_teacher_ratio": 14
    },
    {
      "name": "Parker Elementary School",
      "address": "6802 Jones Dr, Galveston, TX 77551",
      "url": "https://www.redfin.com/school/112575/TX/Galveston/Parker-Elementary-School",
      "review_count": 4,
      "great_schools_rating": 8,
      "great_school_url": "https://www.greatschools.org/texas/galveston/2825-Parker-El/",
      "parent_rating": 3,
      "distance_in_miles": "7.6",
      "grade_ranges": "PreK-4",
      "institution_type": "Public",
      "number_of_students": 435,
      "student_to_teacher_ratio": 13
    },
    "... (3 more items)"
  ],
  "tags": [
    "PIRATES COVE COMMUNITY",
    "PRIMARY SUITES",
    "... (4 more items)"
  ],
  "similar_homes": [
    {
      "remarks": "Laffite&rsquo;s Cove beauty includes a 2,770-SF, 4-bedroom, 3.5-bath waterfront ...",
      "url": "https://www.redfin.com/TX/Galveston/3635-Cove-Ln-77554/home/110718301",
      "price": 1398000,
      "sq_ft": 2770,
      "beds": 4,
      "baths": 3.5,
      "stories": 1.5
    },
    {
      "remarks": "Stunning coastal retreat located between the beach and the bay with amazing suns...",
      "url": "https://www.redfin.com/TX/Galveston/2503-103rd-St-77554/home/176288945",
      "price": 635000,
      "sq_ft": 2000,
      "beds": 4,
      "baths": 3.5,
      "stories": 2
    },
    "... (16 more items)"
  ],
  "walk_score": 5,
  "bike_score": 29,
  "nearby_places": [
    {
      "name": "Bar None at Diamond Beach, Galveston Island",
      "address": "10327 Termini San Luis Pass Rd, Galveston, TX, 77554, us",
      "latitude": 29.2431640625,
      "longitude": -94.86797332763672,
      "popularity": 0.9599999785423279,
      "phone_number": "(409) 539-5125",
      "website": "http://www.galvestonbarnone.com",
      "categories": [
        "Arts and Entertainment",
        "Lounge"
      ],
      "distance": 5.0684725155309485
    },
    {
      "name": "Dizzy Dorado",
      "address": "3802 Cove View Blvd, Galveston, TX, 77554, us",
      "latitude": 29.244600296020508,
      "longitude": -94.86785125732422,
      "popularity": 0.8199999928474426,
      "phone_number": "(409) 220-3220",
      "categories": [
        "Bar",
        "Restaurant"
      ],
      "distance": 5.1124954847690205
    },
    "... (62 more items)"
  ],
  "transit": [
    {
      "stop_name": "Main St. & 5th Ave.",
      "latitude": 29.3582467,
      "longitude": -94.9530373,
      "routes": [
        {
          "short_name": "108",
          "long_name": "La Marque Saturday"
        }
      ]
    },
    {
      "stop_name": "Main St. & 5th Ave.",
      "latitude": 29.3583521371324,
      "longitude": -94.9530000095986,
      "routes": [
        {
          "short_name": "102",
          "long_name": "La Marque South"
        }
      ]
    },
    "... (8 more items)"
  ],
  "redfin_agent": "Alejandro Sanchez",
  "redfin_agent_average_rating": 9.52,
  "redfin_agent_url": "https://www.redfin.com/real-estate-agents/alejandro-sanchez",
  "redfin_agent_phone_number": "832-220-8879",
  "redfin_agent_deal_count": 66,
  "redfin_agent_volume": 20971755,
  "redfin_agent_highest_deal": 815000,
  "url_map_2_x": "https://maps.google.com/maps/api/staticmap?sensor=false&style=feature%3Aadminist..."
}

```

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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