Admin Areas

How to Query STR Market Data by Administrative Area Using bnbapi.com

When analyzing the short-term rental (STR) market, geographic specificity is key. At bnbapi.com, you can explore market data by location using three geographic methods:

  1. Administrative Area – e.g., country, state, province
  2. Geometric Area – using a central point and a radius
  3. Custom Area – by defining a geographic polygon

In this article, we’ll focus on the first option: how to query market data using administrative areas.

Where Can You Use This?

The administrative area filters are available in various endpoints, particularly in the Analytics, Lists, and Availabilities categories. You can check the full list of endpoints here: bnbapi.com/endpoints

The Required Fields

To filter by administrative area, your API request must include specific fields:

  • country
  • admin1
  • admin2
  • admin3
  • admin4
  • place

These fields form a hierarchical structure from the broadest (country) to the most specific (place). Not all countries follow the same administrative structure, so we use a generic hierarchy that can adapt across different countries.

  • country is always required and must be a two-letter ISO country code (e.g., “US” for the United States).
  • admin1 is typically required and usually represents states or regions.
  • admin2, admin3, and so on are optional but allow for more granular targeting if available.

Discovering Valid Values with the Geo Endpoint

To find valid values for these fields, use the Geo API endpoint:
👉 /api/v2/getadmins

Step 1: Start with Country

For example, to explore administrative areas in the United States:

{
"country": "US"
}

The response will list all valid admin1 values (U.S. states such as “Alabama”, “Alaska”, “Arizona”, etc.).

Step 2: Drill Down with admin1

To go further, include the admin1 value in your request:

{
"country": "US",
"admin1": "Arizona"
}

Now you’ll get all admin2 areas under Arizona — such as “Apache County”, “Cochise County”, and so on.

Step 3: Continue to admin3 and Beyond

If deeper administrative levels are available, you can continue:

{
"country": "US",
"admin1": "Arizona",
"admin2": "Cochise County"
}

You can keep going down the hierarchy — but remember: you must always include all higher-level fields (admin1, admin2, etc.) when specifying a lower level like admin3.

Summary

Using administrative areas is a precise and structured way to access STR market data with bnbapi.com. By leveraging the /getadmins endpoint, you can build exact queries that match real-world geographic divisions — whether you’re analyzing trends by state, county, or city.

Ready to explore? Start with a country and drill down to the level of detail you need.