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

@openvancamp/sdk

v1.0.2

Published

Official JavaScript/TypeScript SDK for OpenVan.camp — free vanlife/RV travel data: fuel prices, weather scores, food cost index, currency, events, news

Readme

@openvancamp/sdk

Official JavaScript/TypeScript SDK for OpenVan.camp — free vanlife/RV travel data API.

  • Fuel prices — real-time retail prices for 121 countries (gasoline, diesel, LPG, E85) from 200+ government sources
  • Weather scores — vanlife-specific suitability (0–100): van comfort, sleep conditions, solar yield, driving safety
  • Food cost index — cost-of-living comparison across 92 countries vs. a world baseline
  • Currency rates — 150+ currencies, EUR-based, updated daily
  • Events — 695+ vanlife/RV events with geo-coordinates
  • News stories — 8,200+ aggregated stories in 7 languages

No API key. No registration. CC BY 4.0.

Install

npm install @openvancamp/sdk
# or
pnpm add @openvancamp/sdk
# or
yarn add @openvancamp/sdk

Quick start

import { OpenVan } from "@openvancamp/sdk";

const ov = new OpenVan();

// Fuel prices for Germany
const de = await ov.fuel.country("DE");
console.log(de.prices.diesel); // e.g. 1.729 (EUR/liter)

// Cheapest diesel in Europe (top 5)
const cheap = await ov.fuel.cheapest("diesel", 5);
cheap.forEach(c => console.log(c.country_name, c.prices.diesel, c.currency));

// Vanlife weather scores — top 10 countries right now
const top = await ov.weather.top({ limit: 10 });
top.forEach(c => console.log(c.country_name, c.score));

// Is Portugal cheaper than Germany for van living?
const comp = await ov.basket.compare("DE", "PT");
console.log(`Portugal is ${Math.abs(comp.diff_percent)}% cheaper (€100 in DE ≈ €${comp.budget_100} in PT)`);

// Currency conversion
const usd = await ov.currency.convert(100, "EUR", "USD");

// Upcoming vanlife events
const { events } = await ov.events.list({ status: "upcoming", limit: 10 });

// Latest vanlife news in Spanish
const { stories } = await ov.stories.list({ locale: "es", limit: 20 });

API reference

new OpenVan(options?)

const ov = new OpenVan({
  baseUrl: "https://openvan.camp", // default
  source: "my-app",                // attribution tag (optional)
  fetch: customFetch,              // custom fetch implementation (optional)
});

ov.fuel

| Method | Returns | |---|---| | .prices() | Record<string, FuelCountry> — all 121 countries | | .country(code) | FuelCountry — single country by ISO code | | .cheapest(fuelType?, limit?) | FuelCountry[] — sorted cheapest-first |

// All countries
const all = await ov.fuel.prices();

// Single country
const tr = await ov.fuel.country("TR");
console.log(tr.prices); // { gasoline: 41.5, diesel: 39.2, lpg: 16.8 }

// Top 5 cheapest diesel globally
const top5 = await ov.fuel.cheapest("diesel", 5);

ov.currency

| Method | Returns | |---|---| | .rates() | Record<string, number> — units per EUR | | .convert(amount, from, to) | number |

const rates = await ov.currency.rates();
const usd = await ov.currency.convert(50, "EUR", "USD");

ov.basket

| Method | Returns | |---|---| | .list() | VanBasketCountry[] — all 92 countries | | .country(code) | VanBasketCountry with historical snapshots | | .compare(from, to) | VanBasketCompareData — ratio + both countries |

// Compare Spain vs Mexico
const comp = await ov.basket.compare("ES", "MX");
// comp.diff_percent = how much cheaper/expensive MX is vs ES
// comp.budget_100  = equivalent of €100 in ES when spending in MX
console.log(`diff: ${comp.diff_percent}%, €100 in Spain ≈ €${comp.budget_100} in Mexico`);

ov.weather

| Method | Returns | |---|---| | .score(countryCode, locale?) | VanSkyCountry — 7-day forecast with scores | | .top(options?) | VanSkyTopEntry[] — top N countries |

const fr = await ov.weather.score("FR");
console.log(fr.score);          // overall 7-day score 0-100
console.log(fr.forecast[0]);    // today's detailed scores

ov.events

| Method | Returns | |---|---| | .list(options?) | EventsListData — paginated events | | .get(slug) | VanEvent — single event |

const { events } = await ov.events.list({
  status: "upcoming",
  type: "expo",
  country: "DE",
  locale: "en",
});

ov.stories

| Method | Returns | |---|---| | .list(options?) | StoriesListData — paginated stories | | .get(slug) | VanStory with source articles |

const { stories } = await ov.stories.list({
  locale: "de",
  category: "gear",
  limit: 20,
});

Error handling

import { OpenVan, OpenVanError } from "@openvancamp/sdk";

try {
  const data = await ov.fuel.country("XX");
} catch (err) {
  if (err instanceof OpenVanError) {
    console.log(err.status); // HTTP status code
    console.log(err.url);    // full request URL
  }
}

Browser / Edge

The SDK is ESM-native and works in any environment with fetch (browser, Node.js ≥ 18, Deno, Cloudflare Workers, Bun).

<script type="module">
  import { OpenVan } from "https://esm.sh/@openvancamp/sdk";
  const ov = new OpenVan();
  const de = await ov.fuel.country("DE");
  console.log(de.prices);
</script>

MCP Server (for AI assistants)

Use the data directly in Claude, Cursor, Windsurf, or any MCP-compatible AI:

npx -y @openvancamp/mcp-server

Or add to your Claude Desktop config:

{
  "mcpServers": {
    "openvan": {
      "command": "npx",
      "args": ["-y", "@openvancamp/mcp-server"]
    }
  }
}

Attribution

Data is licensed under CC BY 4.0 — please attribute OpenVan.camp when using publicly.
SDK code is MIT.

API Docs · GitHub · [email protected]