Skip to documentation
ScraperData

SERP API

SquareYards

The same /v1/search endpoint with engine=squareyards returns the homes SquareYards lists for an Indian city as JSON: for sale or for rent, prices in INR, 25 a page.

Send the API key in the X-API-Key header, or as the api_key query parameter (Authentication). SquareYards searches can also run as async tasks with pingback_url.

Parameters

FieldTypeDescription
enginestringrequired Set it to squareyards.Values:squareyards
qstringrequired The city: Ahmedabad, Bangalore, Chandigarh, Chennai, Delhi, Gurgaon, Hyderabad, Indore, Jaipur, Kochi, Kolkata, Lucknow, Mumbai, Navi Mumbai, Noida, Pune or Thane (Bengaluru, Gurugram and New Delhi work too). Any other city answers 400 invalid_query. location works too.Example: Mumbai
typestringoptional Homes for sale, or for rent. status works too. Any other value answers 400 invalid_type.Values:for_salefor_rentDefault: for_sale
pageintegeroptional The page of listings, from 1 to 100. Each page has up to 25; search_information.total_pages says how many there are (at most 100).Default: 1
num_pagesintegeroptional How many pages to fetch in this call, from 1 to 5, starting at page. Each page fetched costs one credit; page + num_pages - 1 can be at most 100.Default: 1
response_typestringoptional json: the listings. html: SquareYards' raw page for the fetched pages as text in html, without listings. both: the listings and html.Values:jsonhtmlbothDefault: json
pingback_urlstringoptional Queue the search and get the answer later; see Async tasks.

Prices in rupees

price is in Indian rupees (currency INR): the asking price for homes for sale, the monthly rent for rentals. One call fetches 1 to 5 pages of 25 listings.

What comes back

FieldTypeDescription
search_metadataobjectAbout this request.
idstringA unique id for the search.
statusstringSuccess when SquareYards answered.
created_atstringWhen the search ran, in ISO 8601 (UTC).
pagesintegerPages fetched in this call.
credits_chargedintegerCredits this request cost: one per page fetched.
task_idstringOnly for async tasks: the task the result belongs to.
search_parametersobjectWhat the search used: engine, q, type, page, num_pages (when above 1) and response_type.
search_informationobjectAbout the listings.
total_resultsintegerHow many homes match the city and type.
page, per_page, total_pagesintegerThis page, listings a page (25) and how many pages can be fetched (at most 100).
pages_fetchedintegerPages this call fetched.
results_on_pageintegerHow many listings this answer has (all fetched pages).
listingsarrayThe homes, each with position (1, 2, 3... counted across pages, so page 2 starts at 26) and the fields below.
property_id, url, titlestringThe listing's id, its page on squareyards.com and its title.
city, locality, countrystringThe city, the locality (like Powai or Wakad) and IN.
latitude, longitudenumber / nullThe home on the map; often empty on SquareYards.
price, currency, price_per_sqftnumber / stringThe price in Indian rupees (the monthly rent for rentals), INR, and the price per sqft.
bedrooms, bathroomsintegerBHK (bedrooms) and bathrooms.
living_area, living_area_unitnumber / stringThe home's size and its unit (sqft).
property_type, listing_statusstringThe kind of home (Apartment, Villa...) and its status (Ready To Move, Under Construction...).
floor, total_floors, facing, parkinginteger / stringThe floor, the floors in the building, the facing and the parking.
image_url, photo_countstring / integerThe main photo and how many photos there are.
project_namestringThe project or society the home is in.
seller_type, seller_namestringWho lists it (owner, agent or builder) and the name shown on the listing.
descriptionstringThe listing's text, up to 500 characters, when there is one.
sourcestringAlways squareyards.
htmlstringresponse_type html or both: SquareYards' raw page for the fetched pages, as text.

Flats for rent in Pune, second page

Request
curl -G "https://api.scraperdata.com/v1/search" \
  -H "X-API-Key: YOUR_API_KEY" \
  --data-urlencode "engine=squareyards" \
  --data-urlencode "q=Pune" \
  --data-urlencode "type=for_rent" \
  --data-urlencode "page=2"

Errors

Errors never cost credits. Every error code is on the Errors page; these are the SquareYards ones:

FieldTypeDescription
missing_query, invalid_query400No q, one longer than 120 characters, or a city SquareYards does not cover.
invalid_type400type (or status) is not for_sale or for_rent.
invalid_page400page is not a whole number from 1 to 100.
invalid_num_pages400num_pages is not 1 to 5, or page + num_pages - 1 goes past page 100.
invalid_filter400bedrooms, min_price or max_price was sent: SquareYards searches do not take them.
invalid_response_type400response_type is not json, html or both.
no_results404No homes for this city and type, or the page is past the last one (the site would send its last page again, so it is refused for free).
upstream_error, upstream_unavailable, upstream_timeout502 / 503 / 504SquareYards could not be reached in time. Retry in a few seconds.
400 Bad Request
{
  "error": {
    "code": "invalid_query",
    "message": "SquareYards covers these cities: Ahmedabad, Bangalore, Chandigarh, Chennai, Delhi, Gurgaon, Hyderabad, Indore, Jaipur, Kochi, Kolkata, Lucknow, Mumbai, Navi Mumbai, Noida, Pune, Thane."
  },
  "charged": false
}

Credits

Each page fetched costs one credit (25 listings a page, up to 5 pages a call). Failed searches, cities off the list and pages past the last one are free.