@voyant-travel/data-sdk.
The Data product is a set of Cloudflare Workers served behind the public gateway at https://api.voyant.travel/data/{product}/v1/*. Each one is a top-level namespace on the client.
The data products
Geo
Canonical travel geography: countries, regions, cities, ports, and waterways, plus language and timezone lookups.
Air
Aviation reference data: airports, airlines, and aircraft.
FX
Currency exchange rates and the ISO 4217 currency catalog.
SEO
Search, keyword, backlink, and on-page data, organized by sub-product.
Business data
Reviews, hotels, restaurants, and experiences from Google and TripAdvisor.
Install and call
Response envelopes
The Data SDK preserves the API envelopes so you never lose pagination metadata:- List and search methods return
ListResponse<T>, shaped{ data, totalCount, nextCursor? }. - Single-item methods return
SingleResponse<T>, shaped{ data }.
nextCursor back on the next call.
Authentication and scopes
Authentication is a Voyant API token as a bearer token againsthttps://api.voyant.travel. Tokens are scoped per sub-product:
| Namespace | Scope |
|---|---|
client.geo.* | data:geo:read |
client.air.* | data:air:read |
client.fx.* | data:fx:read |
client.seo.* | data:seo:read |
client.reviews.* | data:reviews:read |
client.hotels.* | data:hotels:read |
client.restaurants.* | data:restaurants:read |
client.experiences.* | data:experiences:read |
Errors
Non-2xx responses throwVoyantApiError with status, requestId, and body. The Data API also returns a stable code on its error bodies, typed as DataErrorCode: NOT_FOUND, INVALID_REQUEST, INVALID_CURSOR, UPSTREAM_FAILED, INTERNAL_AUTH_REQUIRED, and RATE_LIMITED. See Errors and transport.