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

globeapi

v1.0.2

Published

Official Node.js SDK for GlobeAPI — the unified travel API platform

Readme

GlobeAPI Node.js SDK

Official Node.js SDK for GlobeAPI -- the unified travel API platform.

Zero dependencies. Uses native fetch. Requires Node.js 18+.

Installation

npm install globeapi

Quick Start

const { GlobeAPI } = require("globeapi");

const client = new GlobeAPI("your-api-key");

Search Places

const places = await client.places.search({
  query: "coffee shops",
  lat: 41.3275,
  lng: 19.8187,
  radius: 1000,
  limit: 5,
});
console.log(places.results);

Reverse Geocode

const location = await client.places.geocode({ lat: 48.8566, lng: 2.3522 });
console.log(location.city); // "Paris"

Search Cities

const cities = await client.cities.search({ query: "Tirana", limit: 3 });
console.log(cities.results);

Search Flights

const flights = await client.flights.search({
  origin: "TIA",
  destination: "LHR",
  date: "2026-06-15",
  passengers: 2,
  cabin_class: "economy",
});
console.log(flights.results);

Search Hotels

const hotels = await client.hotels.search({
  city: "Paris",
  check_in: "2026-07-01",
  check_out: "2026-07-05",
  guests: 2,
  rooms: 1,
});
console.log(hotels.results);

AI Chat

const response = await client.ai.chat({
  message: "What are the best beaches in Albania?",
});
console.log(response.reply);

AI Chat (Streaming)

const stream = await client.ai.chat({
  message: "Plan a 3-day trip to Tokyo",
  stream: true,
});

const reader = stream.getReader();
const decoder = new TextDecoder();
while (true) {
  const { done, value } = await reader.read();
  if (done) break;
  process.stdout.write(decoder.decode(value));
}

AI Vision

const fs = require("fs");
const image = fs.readFileSync("photo.jpg").toString("base64");

const result = await client.ai.vision({
  image,
  message: "What landmark is in this photo?",
});
console.log(result.reply);

Voice Transcription

const fs = require("fs");
const audio = fs.readFileSync("recording.wav").toString("base64");

const transcription = await client.voice.transcribe({ audio });
console.log(transcription.text);

Image Moderation

const result = await client.moderation.check({ image: base64Image });
console.log(result.safe); // true or false

Search Photos

const photos = await client.photos.search({
  query: "sunset",
  country: "Greece",
  limit: 10,
});
console.log(photos.results);

Plan a Trip

const trip = await client.trips.plan({
  destination: "Rome",
  days: 3,
  interests: ["history", "food", "art"],
});
for (const day of trip.days) {
  console.log(`Day ${day.day}: ${day.title}`);
  for (const activity of day.activities) {
    console.log(`  ${activity.time} - ${activity.title}`);
  }
}

Custom Base URL

const client = new GlobeAPI("your-api-key", {
  baseUrl: "https://custom-endpoint.example.com",
});

Error Handling

const { GlobeAPI, GlobeAPIError } = require("globeapi");

try {
  const result = await client.flights.search({ origin: "TIA", destination: "JFK", date: "2026-06-15" });
} catch (err) {
  if (err instanceof GlobeAPIError) {
    console.error(`API error ${err.status}: ${err.message}`);
    console.error("Response body:", err.body);
  } else {
    throw err;
  }
}

TypeScript

Full type definitions are included. Import types directly:

import { GlobeAPI, GlobeAPIError } from "globeapi";
import type { Flight, Hotel, Place } from "globeapi";

const client = new GlobeAPI("your-api-key");
const flights = await client.flights.search({
  origin: "TIA",
  destination: "LHR",
  date: "2026-06-15",
});

License

MIT