HOSTED SEARCHBETA

Indexes and search

Search an index as people type: filters from parse, facets, the map and paging, answered in milliseconds.

Hosted search and WordPress are in private beta. Your account needs the beta enabled to use these APIs.
POST/api/v1/indexes/{index}/search
AuthenticationUse a key with search listings permission: Authorization: Bearer <key>.
Manage API keys
curl -X POST https://nabdaq.dev/api/v1/indexes/main-listings/search \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "filters": [
    {
      "field": "location",
      "operator": "eq",
      "value": "dubai_marina"
    },
    {
      "field": "property_type",
      "operator": "eq",
      "value": "apartment"
    },
    {
      "field": "bedrooms",
      "operator": "eq",
      "value": 2
    },
    {
      "field": "price",
      "operator": "lt",
      "value": 2000000
    }
  ],
  "sort": [
    {
      "field": "price",
      "direction": "asc"
    }
  ],
  "facets": [
    "property_type",
    "bedrooms",
    "price"
  ],
  "map": {
    "mode": "points"
  },
  "page": 0,
  "per_page": 20
}'
BodyMeaning
filtersExactly what parse returns (its extra keys are ignored). A filter the index cannot use comes back in ignored with a reason.
sortAs parse returns it, or your own. Price sorts compare rents per year.
keywordsFree words matched against title, building, project, reference and place; the last word as a prefix.
geobbox [west, south, east, north], polygon (3–500 [lng, lat] points) or around { lat, lng, radius_m }.
facetsCounts per value or range; each field ignores its own filter.
mappoints (up to 5,000, then clusters) or clusters for a zoom.
pageper_page up to 50; the first 1,000 results of a query are reachable.
min_revisionRead your own writes: waits up to 300 ms for that revision.

With no results, relaxations says how many listings each dropped filter would give.

Real time

Writes are committed by the index's writer and answer with a new revision. Searches run in the Cloudflare data center nearest the visitor (Dubai for UAE visitors) from an in-memory copy, and see changes within about a second.

Create an index

In the dashboard under Indexes, once the private beta is enabled for your account.