Call Recommend a Base Price with the property's coordinates, bedrooms, bathrooms, and guest capacity. Inspect the balanced recommendation and alternatives. If you already have a base price, skip this request.
Send the base price and its returned currency to Recommend Calendar Prices. Include your settings on every call. Add current availability evidence when using gap-day, adjacent-day, or occupancy-pacing rules.
Check warnings and daily explanations, then recheck availability. Publish approved rates through your own integration. The API does not save settings or publish rates; your booking integration must enforce supported stay restrictions.
Set AIRROI_API_KEY in your server-side environment. Python uses the standard library; JavaScript runs in Node.js with built-in fetch. These are billable requests. The example prints three nights from the full response and makes no publishing calls or automatic retries.
Python
import json
import os
from urllib.request import Request, urlopen
API_KEY = os.environ["AIRROI_API_KEY"]
API_URL = "https://api.airroi.com"
def post(path, payload):
request = Request(
API_URL + path,
data=json.dumps(payload).encode("utf-8"),
headers={"X-API-KEY": API_KEY, "Content-Type": "application/json"},
method="POST",
)
# HTTP errors raise an exception; this example does not retry or publish.
with urlopen(request, timeout=35) as response:
return json.load(response)
location = {"latitude": 25.7907, "longitude": -80.13}
base = post("/price-recommendation/base-price", {
"location": location,
"property": {"bedrooms": 3, "baths": 2.5, "guests": 6},
"currency": "USD",
})
calendar = post("/price-recommendation/calendar-prices", {
"location": location,
"base_price": base["recommended_base_price"],
"currency": base["currency"],
"pricing_rules": {"last_minute": {"mode": "balanced"}},
})
print("Currency:", calendar["currency"])
for warning in calendar["warnings"]:
print("Warning:", warning["code"], warning["message"])
for day in calendar["recommendations"][:3]:
print(day["date"], day["price"], day["explanation"])
This example enables only the balanced last-minute rule. Start with one rule, inspect its explanation, and add other settings as needed. Availability is booking evidence, not a date filter. Missing dates are unknown, not available. Leave enough surrounding calendar context for reservation-dependent rules.
Explore pricing rulesListing future rates show observed asking prices; market pacing describes forward demand. They are useful comparison data, not the output of the recommendation model. Do not layer a second hand-built demand multiplier over a recommended price without evaluating the risk of counting the same effect twice. Recommendations are not revenue guarantees.
No. Base Price helps establish a year-round starting price. If you already have one, send it directly to Calendar Prices in the requested currency.
Omit start_date and end_date or send null for one to two years of consecutive dates starting today in the property's timezone. Set inclusive boundaries to return a window, down to one row. Lead-time rules still count from today. Check coverage and warnings, and recheck availability before publishing; reserved and blocked dates are included.
Rules are off until enabled; this example adds a balanced last-minute preset. Without explicit limits, the minimum is 70% of base price and the maximum is 10 times base price. Fixed-price overrides bypass these limits. See the API reference for exact settings and the pricing rules guides for worked examples.
No. It returns recommendations only. Store your settings, review warnings, and publish through your own integration. Stay restrictions must be supported and enforced by that integration; length-of-stay discounts are not applied by this API.
No. Recommend a Base Price: $0.10 Standard / $0.05 Preferred Partner per successful request. Recommend Calendar Prices: $0.10 Standard / $0.05 Preferred Partner per successful request. The full calendar is one request; using both endpoints makes two separately billed requests.
Keep API keys private, retain request IDs, handle HTTP failures, and check warnings even on successful responses. Save the settings you send and use decimal-safe money handling. Start with a reviewed preview before connecting any rate-publishing workflow.
Automation checklistStay ahead of the curve
Join our newsletter for exclusive insights and updates. No spam ever.