25+ Free APIs Developers Can Use Today
Development

25+ Free APIs Developers Can Use Today

Looking for zero-cost, production-friendly APIs? Here’s a curated list—organized by use case—with copy-paste examples, caveats, and links to official docs.

12 min read
Share:

Looking for zero-cost, production-friendly APIs? Here’s a curated list—organized by use case—with copy-paste examples, caveats, and links to official docs.

⚠️ Always review each API’s terms, rate limits, and attribution rules before shipping.


What “free” usually means

  • Open & no key: Public endpoints, no signup (e.g., Open-Meteo, PokeAPI, Wikidata).
  • Keyed free tier: Requires a token but offers a free monthly quota (e.g., NASA, Unsplash).
  • Fair use/open data: Public but rate-limited (e.g., OpenStreetMap/Nominatim, Overpass).

Quick picks by category


The list (what you get + why it’s useful)

Weather & Climate

  1. Open-Meteo – Free forecasts & historical weather; no API key. Docs: https://open-meteo.com/en/docs
  2. MET Norway (Locationforecast) – High-quality European forecasts; include attribution & a valid User-Agent. Docs: https://api.met.no/doc/
  3. Open-Meteo Geocoding – Forward/reverse geocoding to pair with weather queries. Docs: https://open-meteo.com/en/docs/geocoding-api

Mapping & Geospatial

  1. OpenStreetMap Nominatim – Geocoding from OSM; follow usage policy. Docs: https://nominatim.org/release-docs/latest/api/Overview/
  2. Overpass API (OSM) – Query OSM features (cafés, EV chargers, paths). Docs: https://overpass-api.de/
  3. Geoapify (free tier) – Geocoding, routing, isochrones. Docs: https://www.geoapify.com/developers

Space & Science

  1. NASA APIs (APOD, NeoWs, EPIC, etc.) – Free key; perfect for content apps. Portal: https://api.nasa.gov/
  2. USGS Earthquake API – Real-time quakes in GeoJSON. Docs: https://earthquake.usgs.gov/fdsnws/event/1/

Knowledge & Open Data

  1. Wikipedia REST – Summaries, page content, and media metadata. Docs: https://www.mediawiki.org/wiki/REST_API
  2. Wikidata – Query structured knowledge via SPARQL. Query Service: https://query.wikidata.org/
  3. Open Library – Books, covers, authors. Docs: https://openlibrary.org/developers/api
  4. OpenAlex – Scholarly works and authors. Docs: https://docs.openalex.org/

Developer & Community

  1. GitHub REST/GraphQL – Repos, issues, actions. Docs: https://docs.github.com/en/rest
  2. Stack Exchange – Q&A data across the network. Docs: https://api.stackexchange.com/

Media & Placeholders

  1. Unsplash API – High-quality images; attribution requirements apply. Docs: https://unsplash.com/developers
  2. Lorem Picsum – Simple placeholder images via URL params. Docs: https://picsum.photos/

Finance & Numbers

  1. Frankfurter – Historical FX (ECB), no key. Docs: https://www.frankfurter.app/
  2. exchangerate.host – Live/historical rates, no key. Docs: https://exchangerate.host/#/

News & Public Sector

  1. GOV.UK APIs – Services & registers (UK). Index: https://www.api.gov.uk/
  2. GNews (free tier) – News search JSON; simple, limits apply. Docs: https://gnews.io/

Fun, Learning & Demos

  1. PokeAPI – Pokémon data; great for teaching pagination. Docs: https://pokeapi.co/
  2. The Cat API – Random images & breeds. Docs: https://thecatapi.com/
  3. The Dog API – Similar to Cat API, for dogs. Docs: https://thedogapi.com/
  4. Deck of Cards API – Card shuffling/drawing. Docs: https://deckofcardsapi.com/
  5. Numbers API – Facts about numbers, dates, math. Docs: http://numbersapi.com/
  6. JSONPlaceholder – Fake REST endpoints for front-end devs. Docs: https://jsonplaceholder.typicode.com/
  7. ReqRes – Mock user endpoints & auth flows. Docs: https://reqres.in/
  8. HTTPBin – Inspect requests, headers, auth, etc. Docs: https://httpbin.org/

Copy-paste starters (curl, JS & Python)

1) Weather (Open-Meteo; no key)

curl "https://api.open-meteo.com/v1/forecast?latitude=21.03&longitude=105.85&hourly=temperature_2m"
// Browser/Node (fetch)
const url = 'https://api.open-meteo.com/v1/forecast?latitude=21.03&longitude=105.85&hourly=temperature_2m';
const data = await fetch(url).then(r => r.json());
console.log(data.hourly.temperature_2m.slice(0, 5));

2) Space image of the day (NASA APOD; free key)

curl "https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY"
const url = 'https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY';
const apod = await fetch(url).then(r => r.json());
document.body.innerHTML = `<h1>${apod.title}</h1><img src="${apod.url}" alt="">`;

3) Geocoding (Nominatim; add a real User-Agent)

curl -H "User-Agent: yourapp/1.0 (contact@example.com)" "https://nominatim.openstreetmap.org/search?q=Hanoi&format=json&limit=3"

4) Wikipedia summary (no key)

curl "https://en.wikipedia.org/api/rest_v1/page/summary/Blockchain"

5) GitHub repository info (token optional but recommended)

curl -H "Authorization: Bearer YOUR_GH_TOKEN" "https://api.github.com/repos/vercel/next.js"

6) Placeholder backend (JSONPlaceholder)

curl "https://jsonplaceholder.typicode.com/posts/1"

Patterns & best practices

1) Cache aggressively — Use ETag, Cache-Control, and client caches to respect free-tier rate limits.

2) Exponential backoff — Handle 429 Too Many Requests gracefully.

3) Identify your app — Fair-use APIs (Nominatim/Overpass) require a helpful User-Agent.

4) Secure your keys — Keep secrets server-side; proxy from your backend or edge functions.

5) Pagination helpers — Abstract page, per_page, next early to keep UIs smooth.

6) Respect licenses — Many open data/media APIs require attribution; add it in your footer.

7) Localize & fail gracefully — Provide empty states and fallback copy.


A minimal proxy (Node/Express) for hiding API keys

import express from "express";
import fetch from "node-fetch";

const app = express();

app.get("/api/apod", async (req, res) => {
  const r = await fetch(`https://api.nasa.gov/planetary/apod?api_key=${process.env.NASA_KEY}`);
  if (!r.ok) return res.status(r.status).json({ error: await r.text() });
  res.json(await r.json());
});

app.listen(3000, () => console.log("Proxy running on :3000"));

Testing checklist before launch

  • Rate-limit & error handling (4xx/5xx, 429 backoff)
  • Caching via ETag / Cache-Control
  • Timeouts & circuit breakers
  • Input validation & geofencing
  • Keys in env vars (no client secrets)
  • Attribution & licenses covered
  • Observability: logs, request IDs, metrics

Where to discover more

  • National/city open-data portals, academic consortia, OSS projects.
  • Search: “{domain} open API documentation rate limits”.
  • GitHub Discussions/Issues often surface real-world gotchas.

Tags

#APIs
#free APIs
#developers
#web development
#programming