npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@voyantjs/data-sdk

v0.4.0

Published

Public TypeScript SDK for the Voyant Data APIs.

Readme

@voyantjs/data-sdk

Public TypeScript client for the Voyant Data APIs.

Scope

@voyantjs/data-sdk is the unified client for the eight sub-products that make up the Voyant Data product, all served behind a single hostname:

  • client.air — aviation reference data (airports, airlines, aircraft)
  • client.fx — currency exchange (exchangerate-api.com white-label)
  • client.seo — DataForSEO white-label, namespaced by sub-product (serp, keywordsData, aiOptimization, backlinks, domainAnalytics, contentAnalysis, onPage, businessData, dataforseoLabs)
  • client.reviews — Google Reviews + Trustpilot (async resources)
  • client.hotels — Google Hotels + TripAdvisor (async resources, plus a shared tripadvisor.reference catalog)
  • client.restaurants — TripAdvisor restaurants (async resources + reference)
  • client.experiences — TripAdvisor attractions/experiences (async resources + reference)
  • client.geo — canonical travel geography (gazetteer + resolver): countries, regions, cities, ports, and waterways (rivers/seas/lakes/canals) with multilingual names, coordinates, hierarchy, and flows_through relations, plus resolve (provider label/code → canonical place)

Install

pnpm add @voyantjs/data-sdk

Usage

import { createVoyantDataClient } from "@voyantjs/data-sdk";

const client = createVoyantDataClient({
  apiKey: process.env.VOYANT_API_KEY!,
});

const countries = await client.geo.countries.list();
const lhr = await client.air.airports.get("LHR");
const eurUsd = await client.fx.pair("EUR", "USD", 100);

// geo: typed resources over one polymorphic gazetteer
const danube = await client.geo.rivers.get("river:Q1653");
// danube.relations.flowsThrough === ["DE", "AT", "SK", "HU", ...]
const roRivers = await client.geo.countries.rivers("RO");
const match = await client.geo.resolve("Dunărea"); // → the Danube

// multilingual: set a language once and read `place.name` in it
const ro = createVoyantDataClient({
  apiKey: process.env.VOYANT_API_KEY!,
  lang: "ro",
});
const de = await ro.geo.countries.get("DE");
// de.data.name === "Germania", de.data.nameLang === "ro"
const fr = await ro.geo.countries.get("DE", { lang: "fr" }); // per-call override → "Allemagne"

Shape

Every sub-product is a top-level namespace on the client:

  • aviation: client.air.{airports,airlines,aircraft}
  • currency exchange: client.fx.{latest,pair,enriched,history,codes,quota}
  • SERP, keywords, AI optimization, backlinks, on-page, content analysis, domain analytics, business data, dataforseo-labs: client.seo.{serp,keywordsData,aiOptimization,backlinks,onPage, contentAnalysis,domainAnalytics,businessData,dataforseoLabs}
  • async-resource verticals (Reviews, Hotels, Restaurants, Experiences): client.{reviews,hotels,restaurants,experiences} with create/list/ get/(some) run per resource
  • geography: client.geo.places.{list,search,get,children,ancestors,related, resolve} (the raw routes) plus typed resources client.geo.{countries,regions,subdivisions,cities,ports,rivers}, reference catalogs client.geo.reference.{languages,currencies,timezones}, and a one-shot client.geo.resolve(label). geo.places.get(id) returns the place with its outgoing relations inline (e.g. a river's flows_through countries). Multilingual: set lang on the client (or pass lang per call) and read the server-resolved place.name/place.nameLang; pass names: true to also get the full names map (omitted by default). The placeName(place, lang) helper re-resolves from a names map client-side

The static groups follow a consistent shape: list / search / nearby return a ListResponse<T> envelope ({ data, totalCount, nextCursor? }), and get(id) returns SingleResponse<T> ({ data }). Async-resource verticals follow the same envelopes: create and get return SingleResponse<T>; list returns ListResponse<T>.

Key public types

Useful exported types include:

  • air: Airport, AirportType, Airline, Aircraft, AircraftCategory
  • envelopes: ListResponse<T>, SingleResponse<T>, PaginationParams, CountryFilteredPaginationParams
  • fx: FxLatestResponse, FxPairResponse, FxEnrichedResponse, FxHistoryResponse, FxCodesResponse, FxQuotaResponse
  • seo / serp: Search, GoogleOrganicSearchInput, GoogleAiModeSearchInput, GoogleMapsSearchInput, ScreenshotResult, AiSummaryResult
  • verticals: GoogleReviewsRequest, GoogleQaRequest, TrustpilotSearchRequest, GoogleHotelSearchesRequest, TripadvisorSearchRequest, TripadvisorReviewsRequest, TripadvisorReferenceLocation
  • geo: CanonicalPlace, CanonicalPlaceType, PlaceWithRelations, PlaceRelation, PlaceResolveRequest, PlaceResolveResult, CountryAttributes, CityAttributes, WaterwayAttributes, LanguageEntry, CurrencyEntry, TimezoneEntry (+ placeName helper)
  • options: VoyantDataClientOptions

Notes

  • default base URL is https://api.voyantjs.com
  • request auth defaults to authorization: Bearer <apiKey>
  • API tokens are scoped per sub-product (data:air:read, data:fx:read, data:seo:read, data:reviews:read, data:hotels:read, data:restaurants:read, data:experiences:read, data:geo:read)
  • responses preserve the full { data, totalCount, nextCursor? } envelope so consumers can paginate without losing metadata

For repo-level context, see ../../docs/data.md.