99acres api

99acres API

If you are in the real estate business, then you must have heard of the 99acres website. It is a popular Indian real estate website that helps people buy, sell or rent properties. As a real estate agent, I have been using this website for quite some time now. Recently, I came to know about its API and how it can be used to fetch real estate data programmatically.

What is an API?

An API (Application Programming Interface) is a set of protocols, routines, and tools for building software applications. In simple terms, an API allows different software applications to communicate with each other. It provides a way for developers to access the functionality of a particular software application to build their own applications.

How to use 99acres API?

To use 99acres API, you need to first register on the 99acres website as a developer. Once you are registered, you will get an access token that you can use to access the API. The API provides a RESTful interface, which means that you can interact with the API using HTTP requests.

There are different endpoints provided by the 99acres API that you can use to fetch different types of real estate data. For example, you can use the property/search endpoint to search for properties based on different parameters like location, price, type of property, etc.


// Example code to fetch properties using 99acres API

const axios = require('axios');

const accessToken = 'your_access_token';
const searchEndpoint = 'https://api.99acres.com/v1/property/search';

// Search for properties in Bangalore
const searchParams = {
    city: 'Bangalore',
    page: 1,
    rows: 10
};

axios.get(searchEndpoint, {
    headers: {
        'Authorization': `Bearer ${accessToken}`
    },
    params: searchParams
})
.then(response => {
    console.log(response.data);
})
.catch(error => {
    console.error(error);
});

As you can see from the example code above, we are using the Axios library to make an HTTP GET request to the property/search endpoint of the 99acres API. We are also passing the access token in the Authorization header of the request. Finally, we are passing the search parameters as query parameters in the request.

Conclusion

The 99acres API is a powerful tool for real estate agents and developers who want to fetch real estate data programmatically. By using the API, you can easily fetch data about properties listed on the 99acres website and use it to build your own applications. So, if you are in the real estate business and want to take advantage of the latest technology, then you should definitely check out the 99acres API.

Subscribe to The Poor Coder | Algorithm Solutions

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
[email protected]
Subscribe