Skip to main content

Overview

The Listings API returns published property listings (for sale or rent) from the AnyHouse platform. Which listings you get depends on your API key:
  • AnyHouse API key — Returns all published listings (full catalog). Used by the AnyHouse app and main website.
  • Platform API key — Returns only listings from agencies connected to your platform. Used by partners (e.g. whitelabel sites, portals) that show a subset of inventory.
Authentication is required via Bearer token or X-Api-Key header. Without a valid key, the request returns 401 Unauthorized.

Endpoint

GET
/api/listings
Example request:
GET https://anyhouse.app/api/listings

Authentication

You must send an API key with every request. You can use either of the following methods.

Bearer Token

Use the standard Authorization header.

X-Api-Key

Use your partner API key.

Option 1 — Bearer Token

Authorization: Bearer YOUR_API_KEY

Option 2 — X-Api-Key Header

X-Api-Key: YOUR_API_KEY

How the API key affects results

API key typeScopeListings returned
AnyHouse keyAllEvery published listing on the platform
Platform keyPlatformOnly listings from agencies linked to your platform
Contact AnyHouse to obtain an AnyHouse API key or to register your platform and receive a platform-specific key.

Query Parameters

All parameters are optional. Use them to filter and paginate results.
ParameterTypeDescription
typestringbuy or rent. Filters by listing type.
min_pricenumberMinimum price (in the currency used with rate).
max_pricenumberMaximum price (in the currency used with rate).
min_bedroomsnumberMinimum number of bedrooms.
min_bathroomsnumberMinimum number of bathrooms.
min_sizenumberMinimum size in m².
listing_typenumberProperty category ID (e.g. 1 = Apartment, 2 = Villa). See Listing Types for all IDs.
new_buildstringFilter by new build.
specificationsstringComma-separated amenity/feature IDs (e.g. 4,6,13 for Pool, Beachfront, Sea view). See Specifications for all IDs.
searchstringFree-text search.
north_weststringNorth-west corner of map bounds (e.g. lat,lng).
south_eaststringSouth-east corner of map bounds (required if north_west is set).
move_in_datestringMove-in date (ISO date).
currencystringCurrency code for display.
ratenumberExchange rate (e.g. to convert prices). Default 1.
limitnumberNumber of results per page (default 100, max 100).
cursorstringPagination cursor from the previous response.
order_bystringnewest (default) or popular.
agencystringWhen true, disables “show all promoted” behavior.

Example Request

curl -X GET "https://anyhouse.app/api/listings?type=buy&min_bedrooms=2&limit=20" \
  -H "X-Api-Key: YOUR_API_KEY"

Success Response

The response is a JSON object with a data array of listing objects and pagination cursors.
{
  "data": [
    {
      "id": "abc-123",
      "title": "Ocean View 2BR in Punta Cana",
      "title_en": "Ocean View 2BR in Punta Cana",
      "description": "Spacious 2 bedroom with terrace and sea view.",
      "location": "Punta Cana",
      "city": "Punta Cana",
      "country": "Dominican Republic",
      "buy_price_dollars": 185000,
      "rent_price_dollars": null,
      "bedrooms": 2,
      "bathrooms": 2,
      "size_m2": 95,
      "listing_type_id": 1,
      "status": "available",
      "uri": "ocean-view-2br-punta-cana",
      "images": [...],
      "agency": {
        "id": "agency-uuid",
        "company_name": "Example Realty",
        "logo": "https://..."
      },
      "published": true,
      "created_at": "2026-01-15T10:00:00Z",
      "updated_at": "2026-02-20T14:30:00Z"
    }
  ],
  "cursor": "eyJ...",
  "next_cursor": "eyJ..."
}

Pagination

  • Use the cursor or next_cursor value from the response as the cursor query parameter in the next request to get the following page.
  • When there are no more results, cursor and next_cursor may be null or omitted.

Error Responses

401 — Unauthorized

Missing or invalid API key.
{
  "message": "Unauthorized. Listings API requires an API key (Bearer token or X-Api-Key header)."
}
Or, when a key is sent but not valid:
{
  "message": "Unauthorized."
}

422 — Validation Error

Invalid query parameters (e.g. invalid listing_type, invalid geo format).
{
  "message": "The given data was invalid.",
  "errors": {
    "listing_type": ["The selected listing type is invalid."],
    "south_east": ["The south east field is required when north west is present."]
  }
}

  • Listing Types — IDs and labels for the listing_type parameter (Apartment, Villa, Land, etc.).
  • Specifications — IDs and labels for the specifications parameter (Pool, Beachfront, Gym, etc.).

When to Use This Endpoint

Use GET /api/listings when:
  • You are building an app or website that displays AnyHouse property inventory.
  • You have an AnyHouse API key and want the full catalog, or a platform API key and want only your platform’s listings.
  • You need to filter by type (buy/rent), price, bedrooms, location, or search, and paginate with cursors.