@voyant-travel/data-sdk.
The Data product is 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.
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:
See Authentication for how tokens and scopes work across the SDKs.
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.