Searching, Filtering, and Pagination Guide

Our real estate APIs provide powerful and flexible search capabilities, allowing you to find the perfect listings using a variety of query string parameters. In this article, we'll guide you through the process of searching, filtering, and paginating listings using our API.

Getting Started



To search for real estate listings, you will make a GET request to our listings endpoint. By appending query string parameters to the URL, you can filter the listings to match your specific criteria.

Example Search Request



Let's say you want to find homes in New York that have three bedrooms and are priced under one million dollars. You would make a request like this:

GET https://api.repliers.io/listings?maxPrice=1000000&city=New York&minBedrooms=3

This request will return an array of listings that match the search criteria you specified.

Supported Filters


Our API supports a wide range of filters to help you narrow down your search. Here are some of the most commonly used filters:

maxPrice: The maximum price of the listings.
minPrice: The minimum price of the listings.
city: The city where the listings are located.
minBedrooms: The minimum number of bedrooms.
maxBedrooms: The maximum number of bedrooms.
minBaths: The minimum number of bathrooms.
maxBaths: The maximum number of bathrooms.
propertyType: The type of property (e.g., house, condo, townhouse).
status: The status of the listing (e.g., active, pending, sold).
minSqft: The minimum square footage of the property.
maxSqft: The maximum square footage of the property.

For a complete list of supported filters, please refer to our API reference.

Pagination



When dealing with large datasets, it's essential to use pagination to manage and navigate through the data efficiently. Our API provides pagination details in the response to help you handle this effectively.

Example Response with Pagination Details


Here’s an example of a response that includes pagination information:

{
    "page": 1,
    "numPages": 802,
    "pageSize": 100,
    "count": 80198,
    "listings": [
        {
            "mlsNumber": "W9012677",
            "resource": "Property:2381",
            "status": "A",
            "class": "CommercialProperty",
            "type": "Lease",
            "listPrice": "1.00",
            ...
        },
        ...
    ]
}


Pagination Parameters


Our API supports several pagination parameters to control the data returned in each request:

page: The current page of results you are viewing.
resultsPerPage: The number of listings returned per page.
numPages: The total number of pages available.
count: The total number of listings available that match the search criteria.

Using Pagination Parameters



When constructing your search query, you can include pagination parameters to specify which page of results you want to view and how many results per page you want to retrieve.

Example 1: Viewing the Second Page of Results


To view the second page of results with a page size of 50 listings per page, you would use the following request:

GET https://api.repliers.io/listings?maxPrice=1000000&city=New York&minBedrooms=3&pageNum=2&resultsPerPage=50

This request will return the second page of listings, with each page containing up to 50 listings.

Handling the Response


The response from the API will be a JSON object containing an array of listings that match your search criteria, along with pagination details. Each listing will include detailed information such as the address, price, number of bedrooms and bathrooms, property type, and more.

Example Response


{
    "page": 2,
    "numPages": 1603,
    "pageSize": 50,
    "count": 80198,
    "listings": [
        {
            "mlsNumber": "W9012677",
            "resource": "Property:2381",
            "status": "A",
            "class": "CommercialProperty",
            "type": "Lease",
            "listPrice": "1.00",
            "address": "123 Main St, New York, NY",
            "price": 950000,
            "beds": 3,
            "baths": 2,
            "propertyType": "house",
            "status": "active",
            "sqFt": 2000,
            "listingDate": "2023-06-15"
        },
        {
            "mlsNumber": "W9012678",
            "resource": "Property:2382",
            "status": "A",
            "class": "Residential",
            "type": "Sale",
            "listPrice": "980000.00",
            "address": "456 Elm St, New York, NY",
            "price": 980000,
            "beds": 3,
            "baths": 3,
            "propertyType": "house",
            "status": "active",
            "sqFt": 2100,
            "listingDate": "2023-06-18"
        }...
    ]
}


Searching, filtering, and paginating listings with Repliers' real estate APIs is straightforward and flexible, allowing you to tailor your queries to meet your specific needs. For more detailed information on all the available filters and pagination parameters, please visit our API reference.

If you have any questions or need further assistance, feel free to reach out to our support team. Happy searching!

Updated on: 15/10/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!