SERP API
CommonFloor
The same /v1/search endpoint with engine=commonfloor returns the homes CommonFloor lists for an Indian city as JSON: for sale or for rent, prices in INR, 30 a page.
Send the API key in the X-API-Key header, or as the api_key query parameter (Authentication). CommonFloor searches can also run as async tasks with pingback_url.
Parameters
| Field | Type | Description |
|---|---|---|
engine | string | required Set it to commonfloor.Values:commonfloor |
q | string | required An Indian city CommonFloor lists, like Bangalore, Mumbai, Delhi, Pune, Chennai, Hyderabad, Kolkata, Gurgaon or Noida (Bengaluru, New Delhi and Gurugram work too). A city with no homes answers 404 no_results, free. location works too.Example: Bangalore |
type | string | optional Homes for sale, or for rent. status works too. Any other value answers 400 invalid_type.Values:for_salefor_rentDefault: for_sale |
page | integer | optional The page of listings, from 1 to 50 (CommonFloor gives no more). Each page has up to 30; search_information.total_pages says how many there are.Default: 1 |
num_pages | integer | optional How many pages to fetch in this call, from 1 to 10, starting at page. Each page fetched costs one credit; page + num_pages - 1 can be at most 50.Default: 1 |
response_type | string | optional json: the listings. html: CommonFloor's raw answer for the fetched pages as text in html, without listings. both: the listings and html.Values:jsonhtmlbothDefault: json |
pingback_url | string | optional Queue the search and get the answer later; see Async tasks. |
Prices in rupees
price is a number in Indian rupees (currency INR): the asking price, or the monthly rent for rentals. price_display keeps the site's own text, like 2.80 Cr or 93 L. One call fetches 1 to 10 pages of 30 listings.What comes back
| Field | Type | Description |
|---|---|---|
search_metadata | object | About this request. |
id | string | A unique id for the search. |
status | string | Success when CommonFloor answered. |
created_at | string | When the search ran, in ISO 8601 (UTC). |
pages | integer | Pages fetched in this call. |
credits_charged | integer | Credits this request cost: one per page fetched. |
task_id | string | Only for async tasks: the task the result belongs to. |
search_parameters | object | What the search used: engine, q (as CommonFloor takes it: capitalised, and Bengaluru, New Delhi and Gurugram as Bangalore, Delhi and Gurgaon), type, page, num_pages (when above 1) and response_type. |
search_information | object | About the listings. |
total_results | integer | How many homes match the city and type. |
page, per_page, total_pages | integer | This page, listings a page (30) and how many pages there are (at most 50). |
pages_fetched | integer | Pages this call fetched. |
results_on_page | integer | How many listings this answer has (all fetched pages). |
listings | array | The homes, each with position (1, 2, 3... counted across pages, so page 2 starts at 31) and the fields below. |
property_id, url, title | string | The listing's id, its page on commonfloor.com and its title. |
city, locality, country | string | The city, the locality (like Whitefield or Hosa Road) and IN. |
latitude, longitude | number / null | The home on the map. |
price, price_display, currency | integer / string | The price in Indian rupees (the monthly rent for rentals), the site's own text for it (like 2.80 Cr or 93 L), and INR. |
bedrooms, bedrooms_display | integer / string | BHK as a number and as the site writes it (2.5 BHK is 2 and "2.5 BHK"); empty for plots. |
living_area, living_area_unit | number / string | The home's size and its unit (sqft). |
property_type, listing_status | string | The kind of home (Apartment, Villa, Plot...) and Sale or Rent. |
project_name | string | The project or society the home is in, when the listing names one. |
image_url | string | The main photo, when there is one. |
source | string | Always commonfloor. |
html | string | response_type html or both: CommonFloor's raw answer for the fetched pages, as text. |
Homes for rent in Hyderabad, two pages
Request
curl -G "https://api.scraperdata.com/v1/search" \
-H "X-API-Key: YOUR_API_KEY" \
--data-urlencode "engine=commonfloor" \
--data-urlencode "q=Hyderabad" \
--data-urlencode "type=for_rent" \
--data-urlencode "num_pages=2"Errors
Errors never cost credits. Every error code is on the Errors page; these are the CommonFloor ones:
| Field | Type | Description |
|---|---|---|
missing_query, invalid_query | 400 | No q, or one longer than 120 characters. |
invalid_type | 400 | type (or status) is not for_sale or for_rent. |
invalid_page | 400 | page is not a whole number from 1 to 50. |
invalid_num_pages | 400 | num_pages is not 1 to 10, or page + num_pages - 1 goes past page 50. |
invalid_filter | 400 | bedrooms, min_price or max_price was sent: CommonFloor searches do not take them. |
invalid_response_type | 400 | response_type is not json, html or both. |
no_results | 404 | No homes for this city and type (or a city CommonFloor does not know), or the page is past the last one. |
upstream_error, upstream_unavailable, upstream_timeout | 502 / 503 / 504 | CommonFloor could not be reached in time. Retry in a few seconds. |
404 Not Found
{
"error": {
"code": "no_results",
"message": "CommonFloor has no listings for this place. Check the spelling of the place (like Bangalore). You were not charged."
},
"charged": false
}Credits
Each page fetched costs one credit (30 listings a page, up to 10 pages a call). Failed searches, cities with no homes and pages past the last one are free.