Skip to main content

Search Criteria API

This is a JSON-based endpoint for retrieving configured real estate search criteria. It is intended for use by developers and web applications that need to dynamically load search parameters.


Endpoint Details

  • URL: https://[your-site-name].peakidxsites.com/search-criteria/?apikey=[your-api-key]
  • Method: GET
  • Response Format: application/json

Request Parameters

This API can be used client-side (in-browser) or server-side.

Client-side Usage

When using the API client-side, the request must not contains the API Key. Instead, the request must include the Origin header to validate the request's source.:

  • Origin: The domain of the website making the request. This must match the domain configured in the PeakIDX site's Site Settings.

Server-side Usage

  • apikey: The API requires a valid API key for authentication. You can obtain an API key for your site by going to the Sites Page and clicking the Admin dropdown menu (represented by a gear icon) for your site, then selecting API Key.

Response Structure

The API returns a JSON object containing the current search criteria.

Success Response

A successful response returns a JSON object containing the searchCriteria data.

Example:

{
"property_types": [
"Single Family",
"Condo",
"Townhouse"
],
"listing_status": [
"Active",
"Pending",
"Sold"
],
"features": {
"min_beds": 0,
"max_beds": 10,
"min_baths": 0,
"max_baths": 10
}
}

Error Response

An error response will contain an errorMessage field explaining the issue. This is typically due to an invalid API key.

Example:

{
"success": "false",
"errorMessage": "Invalid api key"
}