Skip to content

Quick start ​

You need an API key from a data connection that includes Bookings.

1. Look at the manifest ​

The base URL, with no credential, returns a JSON description of every dataset, column and limit. It's a good way to check you can reach the API.

sh
curl https://ntnzabbhtivotmfhwdnm.supabase.co/functions/v1/data-api/v1

2. Fetch your bookings ​

sh
curl -H "Authorization: Bearer hpk_your_key_here" \
  "https://ntnzabbhtivotmfhwdnm.supabase.co/functions/v1/data-api/v1/bookings?from=2026-01-01&to=2026-12-31"
js
const BASE = 'https://ntnzabbhtivotmfhwdnm.supabase.co/functions/v1/data-api/v1'

const res = await fetch(`${BASE}/bookings?from=2026-01-01&to=2026-12-31`, {
  headers: { Authorization: `Bearer ${process.env.HOSTPORT_API_KEY}` },
})
if (!res.ok) throw new Error(`Host Port answered ${res.status}: ${await res.text()}`)

const { rows } = await res.json()
console.log(`${rows.length} bookings`)
py
import os, requests

BASE = "https://ntnzabbhtivotmfhwdnm.supabase.co/functions/v1/data-api/v1"

res = requests.get(
    f"{BASE}/bookings",
    params={"from": "2026-01-01", "to": "2026-12-31"},
    headers={"Authorization": f"Bearer {os.environ['HOSTPORT_API_KEY']}"},
    timeout=30,
)
res.raise_for_status()
rows = res.json()["rows"]
print(len(rows), "bookings")

3. Read the answer ​

json
{
  "dataset": "bookings",
  "from": "2026-01-01",
  "to": "2026-12-31",
  "updated_since": null,
  "page": null,
  "page_size": null,
  "has_more": false,
  "generated_at": "2026-09-17T05:27:14.008Z",
  "rows": [
    {
      "booking_id": "6f1c…",
      "property_name": "Beachside Cottage",
      "status": "confirmed",
      "channel": "airbnb",
      "check_in": "2026-10-03",
      "check_out": "2026-10-06",
      "nights": 3,
      "currency": "AUD",
      "total_amount": 840.00
    }
  ]
}

Each row has more columns than shown here. See Bookings for all of them.

Next ​

  • Keep a copy in step without downloading everything again: Pull only what changed.
  • Hear about new bookings without polling: Webhooks.
  • Stay inside the limits: 60 calls a minute and 500 a day per connection.