Skip to content

Data API overview ​

The data API is a small, read-only HTTPS API. Four datasets, one shape, GET only.

Base URL ​

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

The first /v1 belongs to the hosting gateway. The second /v1 is the version of this API. A future /v2 can change shape without breaking anything built on /v1.

Older addresses

Connections created before the address gained the second /v1 were given …/functions/v1/data-api/bookings. Those addresses keep working and always will. New code should use the /v1 address.

Datasets ​

PathOne row perDates coverDefault range
/bookingsbookingstays that overlap from to tolast 12 months to 6 months ahead
/calendarlisting per nightevery night from from to tolast 12 months to 6 months ahead
/reviewsreviewreviews received from from to tolast 12 months to today
/earningslisting, channel, month, currency, past or upcomingcheck-ins from from to tolast 12 months to today

A connection only serves the datasets ticked when it was created. Asking for another is a 403 that lists what it does allow.

Query parameters ​

ParameterWorks onMeaning
fromallFirst date, YYYY-MM-DD. Default: 12 months ago
toallThe day after the last date you want, YYYY-MM-DD. At most 24 months after from
formatalljson (default for the API key) or csv. A data link always serves CSV
updated_sincebookings, reviewsOnly rows changed at or after this moment. See Pull only what changed
pageallPage number from 1. See Paging
page_sizeallRows per page, 1 to 1,000. Default 1,000
tokenallThe data link token. Never the API key

Response ​

Every dataset answers in the same shape. In JSON:

json
{
  "dataset": "calendar",
  "from": "2026-11-01",
  "to": "2026-12-01",
  "updated_since": null,
  "page": null,
  "page_size": null,
  "has_more": false,
  "generated_at": "2026-11-23T01:12:09.418Z",
  "rows": [ … ]
}
FieldMeaning
datasetThe dataset you asked for
from, toThe date window actually used, after defaults
updated_sinceThe moment you sent, as an ISO 8601 instant, or null
page, page_sizeThe page you asked for, or null when not paging
has_moretrue when there is another page after this one
generated_atWhen this answer was made. Use it as your next updated_since
rowsThe data. Each dataset's page lists its columns

In CSV, you get a header row and one line per row, with no wrapper. When paging, the X-Has-More header says whether there is another page. See Dates, money and CSV.

The manifest ​

A GET on the base URL, with no credential, returns a machine-readable manifest: every dataset, column, value, limit and error code. It always matches what the API does today, so it's a good thing to read from a script.

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

Caching ​

Data responses carry Cache-Control: private, max-age=300. Calling more often than every five minutes returns the same data and still counts against your limits.

CORS ​

The API answers browser requests from any origin. But an API key in browser code can be read by anyone who opens the page, so call the API from a server, not from a public web page.