Free Public JSON APIs for Developers: No API Key Required
The quickest way to learn how to work with JSON is to fetch it from a real API. These eight free endpoints require no API key, no account, and no credit card — just a fetch() call and you're returning JSON data immediately.
What makes a good practice API?
A good learning or prototyping API should have three properties: no authentication (so you can call it from a browser or script without setup), CORS headers enabled (so client-side JavaScript can access it directly), and stable data (so your code keeps working a week later). Every API on this list meets all three criteria.
The APIs
JSONPlaceholder
The classic fake REST API for prototyping. Returns realistic data for posts, users, comments, todos, albums, and photos — no setup required.
Example endpoint
https://jsonplaceholder.typicode.com/users/1Open-Meteo
Free weather API with no API key required. Returns hourly/daily forecasts for any latitude/longitude with 16-day range and historical data.
Example endpoint
https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.12¤t=temperature_2mREST Countries
Every country's name, capital, population, currency, flag, and language data in one endpoint. No auth, no rate limits, great for location features.
Example endpoint
https://restcountries.com/v3.1/name/germanyPokeAPI
Complete Pokémon data: stats, moves, sprites, evolution chains, and more. Heavily used in coding tutorials and learning projects.
Example endpoint
https://pokeapi.co/api/v2/pokemon/pikachuRandom User Generator
Generates random person data: name, photo, email, address, and nationality. Supports seeded results for reproducible mock datasets.
Example endpoint
https://randomuser.me/api/?results=5&seed=abc123Open Library
Search 20M+ books by title, author, or ISBN. Returns cover images, publication dates, publishers, and subject classifications.
Example endpoint
https://openlibrary.org/api/books?bibkeys=ISBN:9780140449136&format=json&jscmd=dataExchangeRate-API
Currency exchange rates for 160+ currencies updated hourly. Free tier gives 1,500 requests/month — enough for most side projects.
Example endpoint
https://open.er-api.com/v6/latest/USDIP-API
IP geolocation — returns country, region, city, ISP, timezone, and coordinates for any IP address. Free for non-commercial use.
Example endpoint
http://ip-api.com/json/8.8.8.8Fetching JSON from any of these APIs
The pattern is identical for every endpoint — check response.ok before calling .json(), and wrap the whole thing in a try/catch:
async function fetchJson(url) {
const response = await fetch(url);
if (!response.ok) {
throw new Error(`HTTP ${response.status}`);
}
return response.json();
}
// Example: fetch a random user
const user = await fetchJson('https://randomuser.me/api/');
console.log(user.results[0].name.first);
// Example: get Germany's country data
const [country] = await fetchJson(
'https://restcountries.com/v3.1/name/germany'
);
console.log(country.capital[0]); // "Berlin"Working with the returned JSON
Once you have the JSON string (or the parsed object from response.json()), you can explore it using the formatter below before writing any code. Paste the raw response in to see its structure, validate it, and find the exact key paths you need.
Explore any API response interactively
Paste the JSON from any of these APIs into the JSON Formatter to pretty-print it, or into the JSON Tree Visualizer to browse the structure interactively.
Need more APIs?
The community-maintained public-apis repository lists hundreds of categorised APIs across finance, music, games, science, and more — searchable by auth method and CORS support.
Rate limits and fair use
Even free, no-auth APIs have rate limits. Add appropriate delays in loops, cache responses when possible, and never hammer an API in tight loops — the maintainers pay the bandwidth bill out of pocket.