Back to Blog
    November 3, 20266 min read

    Free Public JSON APIs for Developers: No API Key Required

    APIs
    JSON
    Tools

    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

    No auth
    CORS ✓

    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/1
    Documentation

    Open-Meteo

    No auth
    CORS ✓

    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&current=temperature_2m
    Documentation

    REST Countries

    No auth
    CORS ✓

    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/germany
    Documentation

    PokeAPI

    No auth
    CORS ✓

    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/pikachu
    Documentation

    Random User Generator

    No auth
    CORS ✓

    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=abc123
    Documentation

    Open Library

    No auth
    CORS ✓

    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=data
    Documentation

    ExchangeRate-API

    No auth
    CORS ✓

    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/USD
    Documentation

    IP-API

    No auth
    CORS ✓

    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.8
    Documentation

    Fetching 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.