1
Send a GET request with the property location (latitude/longitude or address) and specs (bedrooms, bathrooms, guest count). The API returns annual revenue projections, nightly rate, occupancy, and up to 25 comparable listings.
Python
import requests
API_KEY = "your_api_key_here"
BASE_URL = "https://api.airroi.com"
# Option 1: Use latitude/longitude + property specs
response = requests.get(
f"{BASE_URL}/calculator/estimate",
headers={"X-API-KEY": API_KEY},
params={
"lat": 25.7617,
"lng": -80.1918,
"bedrooms": 2,
"baths": 1,
"guests": 4,
"currency": "usd"
}
)
estimate = response.json()
print(f"Annual Revenue: ${estimate['revenue']:,.0f}")
print(f"ADR: ${estimate['adr']:,.0f}")
print(f"Occupancy: {estimate['occupancy']:.0%}")2
The response contains the headline estimates plus detailed breakdowns. Here is what each field means:
json
{
"revenue": 48250,
"adr": 185,
"occupancy": 0.71,
"percentiles": {
"revenue": { "p25": 36200, "p50": 48250, "p75": 62400, "p90": 78500 },
"adr": { "p25": 145, "p50": 185, "p75": 225, "p90": 275 },
"occupancy": { "p25": 0.58, "p50": 0.71, "p75": 0.82, "p90": 0.91 }
},
"monthly_revenue_distributions": [
3200, 3450, 4800, 4600, 4200, 3800,
3500, 3400, 3100, 3600, 4850, 5750
],
"comparable_listings": [
{
"listing_id": "892341567",
"name": "Sunny Brickell Studio with Bay Views",
"ttm_revenue": 52400,
"ttm_avg_rate": 195,
"ttm_occupancy": 0.74,
"bedrooms": 2,
"baths": 1,
"guests": 4
}
// ... up to 25 comparable listings
]
}revenue — Estimated annual revenue (trailing twelve months average across comparable listings).
adr — Average daily rate (nightly price when booked).
occupancy — Occupancy rate on a 0-1 scale (0.71 = 71% of nights booked).
percentiles — Distribution breakdowns at p25, p50, p75, and p90 for revenue, ADR, and occupancy.
monthly_revenue_distributions — Array of 12 monthly revenue values (January through December).
comparable_listings — Up to 25 similar listings with full performance details.
3
The 12 monthly values reveal seasonal patterns. Identify which months are peak earners and which are slow, so you can plan pricing, maintenance, and personal use around the revenue cycle.
Python
months = [
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
]
monthly = estimate["monthly_revenue_distributions"]
# Display monthly revenue breakdown
print("\nMonthly Revenue Distribution:")
print("-" * 35)
for month, rev in zip(months, monthly):
bar = "#" * int(rev / 200)
print(f" {month}: ${rev:>6,} {bar}")
# Identify peak and low months
peak_month = months[monthly.index(max(monthly))]
low_month = months[monthly.index(min(monthly))]
print(f"\nPeak month: {peak_month} (${max(monthly):,})")
print(f"Low month: {low_month} (${min(monthly):,})")
print(f"Seasonal spread: {max(monthly) / min(monthly):.1f}x")4
The response includes up to 25 comparable listings with full performance data. Sort and analyze them to understand the competitive landscape and validate the revenue estimate.
Python
comps = estimate["comparable_listings"]
# Sort comps by TTM revenue (highest first)
comps_sorted = sorted(comps, key=lambda c: c["ttm_revenue"], reverse=True)
print(f"\n{'Listing':<35} {'Revenue':>10} {'ADR':>8} {'Occ':>6}")
print("-" * 65)
for comp in comps_sorted[:10]:
name = comp["name"][:32] + "..." if len(comp["name"]) > 32 else comp["name"]
print(
f" {name:<35} "
f"${comp['ttm_revenue']:>8,} "
f"${comp['ttm_avg_rate']:>6} "
f" {comp['ttm_occupancy']:.0%}"
)
# Summary statistics
revenues = [c["ttm_revenue"] for c in comps]
print(f"\nComp count: {len(comps)}")
print(f"Revenue range: ${min(revenues):,} - ${max(revenues):,}")
print(f"Avg revenue: ${sum(revenues) / len(revenues):,.0f}")5
Change the property specs to see how revenue shifts. Try upgrading from 2 to 3 bedrooms, adding a bathroom, or increasing guest capacity. This shows the API's sensitivity to property characteristics and helps you evaluate renovation ROI.
Python
# Scenario analysis: how do specs affect revenue?
scenarios = [
{"bedrooms": 2, "baths": 1, "guests": 4, "label": "Base (2BR/1BA)"},
{"bedrooms": 3, "baths": 2, "guests": 6, "label": "Upgraded (3BR/2BA)"},
{"bedrooms": 3, "baths": 2, "guests": 8, "label": "Max guests (3BR/2BA/8g)"},
]
print(f"\n{'Scenario':<28} {'Revenue':>10} {'ADR':>8} {'Occ':>6}")
print("-" * 58)
for scenario in scenarios:
resp = requests.get(
f"{BASE_URL}/calculator/estimate",
headers={"X-API-KEY": API_KEY},
params={
"lat": 25.7617,
"lng": -80.1918,
"bedrooms": scenario["bedrooms"],
"baths": scenario["baths"],
"guests": scenario["guests"],
"currency": "usd"
}
)
data = resp.json()
print(
f" {scenario['label']:<28} "
f"${data['revenue']:>8,} "
f"${data['adr']:>6} "
f" {data['occupancy']:.0%}"
)6
Combine the revenue estimate with your investment assumptions to calculate cash-on-cash return. Use the percentile data for conservative (p25) and median (p50) scenarios. Operating expenses for short-term rentals typically run 30-40% of gross revenue, covering cleaning, supplies, utilities, insurance, and management.
Python
# Calculate ROI using the revenue estimate
revenue_p50 = estimate["percentiles"]["revenue"]["p50"] # $48,250
revenue_p25 = estimate["percentiles"]["revenue"]["p25"] # $36,200
# Investment assumptions
purchase_price = 350000
down_payment = 70000 # 20% down
mortgage_annual = 19200 # ~$1,600/month (30yr @ 7%)
operating_expense_rate = 0.35 # 35% of revenue
# Conservative scenario (p25)
expenses_p25 = revenue_p25 * operating_expense_rate
net_income_p25 = revenue_p25 - expenses_p25 - mortgage_annual
coc_return_p25 = net_income_p25 / down_payment
# Median scenario (p50)
expenses_p50 = revenue_p50 * operating_expense_rate
net_income_p50 = revenue_p50 - expenses_p50 - mortgage_annual
coc_return_p50 = net_income_p50 / down_payment
print("ROI Analysis")
print("=" * 50)
print(f"Purchase Price: ${purchase_price:>10,}")
print(f"Down Payment (20%): ${down_payment:>10,}")
print(f"Annual Mortgage: ${mortgage_annual:>10,}")
print(f"Operating Expenses: {operating_expense_rate:.0%} of revenue")
print()
print(f"{'Metric':<25} {'Conservative':>14} {'Median':>14}")
print("-" * 55)
print(f" Gross Revenue ${revenue_p25:>13,} ${revenue_p50:>13,}")
print(f" Operating Expenses ${expenses_p25:>13,.0f} ${expenses_p50:>13,.0f}")
print(f" Mortgage ${mortgage_annual:>13,} ${mortgage_annual:>13,}")
print(f" Net Cash Flow ${net_income_p25:>13,.0f} ${net_income_p50:>13,.0f}")
print(f" Cash-on-Cash Return {coc_return_p25:>13.1%} {coc_return_p50:>13.1%}")Keep exploring the AirROI API with these related tutorials.
Revenue estimates are based on actual performance data from comparable Airbnb listings in the area. The API analyzes up to 25 comparable properties and provides percentile breakdowns (p25, p50, p75, p90) so you can see conservative, median, and optimistic projections. Accuracy depends on the number and similarity of comparable listings available in the area.
The API identifies comparable listings based on geographic proximity, property size (bedrooms, bathrooms), guest capacity, and property type. It returns up to 25 of the most similar active listings, ranked by relevance. You can review every comparable used in the estimate via the comparable_listings array in the response.
The 'revenue' field in the response is the estimated annual revenue (trailing twelve months average). The 'monthly_revenue_distributions' array contains 12 values representing estimated revenue for each calendar month (January through December), which accounts for seasonal variation. The sum of monthly values equals the annual estimate.
The API supports USD, EUR, GBP, CAD, AUD, and 20+ additional currencies. Pass the 'currency' parameter (e.g., currency=eur) to receive all monetary values in your preferred currency. The default currency is USD.
Both work. Using latitude/longitude coordinates (lat, lng parameters) is more precise and avoids geocoding ambiguity. Using the address parameter is more convenient but relies on geocoding. For programmatic use with known property locations, coordinates are recommended.
Revenue estimates are computed in real time based on the latest available performance data from comparable listings. The underlying listing data is refreshed continuously, so estimates reflect current market conditions rather than stale snapshots.
Percentiles indicate where a value falls in the distribution of comparable listings. P25 means 25% of comps earn less than this amount (conservative estimate). P50 is the median. P75 means only 25% of comps earn more (above-average performance). P90 represents top-performer levels that only 10% of comps achieve.
At minimum, you need a location (either lat/lng coordinates or an address) and the number of bedrooms. Bathrooms and guest capacity are optional but improve accuracy. The API requires at least 3 comparable listings in the area to generate an estimate; if fewer are available, the response will indicate insufficient data.
Stay ahead of the curve
Join our newsletter for exclusive insights and updates. No spam ever.