Skip to content

Free APIs for beginner projects

9 of 9 APIs in this set passed their last check, all without a key. The best first API returns a small JSON object, needs no account and works from a plain HTML file. That rules out most "top 10" lists, which are full of APIs that want a key or block browser calls.
  1. JSONPlaceholder

    Fake posts and todos. The standard playground for GET, POST, PUT and DELETE.

    jsonplaceholder.typicode.com

    Runs in the browserWorking

  2. PokéAPI

    Nested data with images: good practice for following links between resources.

    pokeapi.co

    Runs in the browserWorking

  3. Dog CEO

    One request, one picture. The shortest path to something visible on the page.

    dog.ceo

    Runs in the browserWorking

  4. Rick and Morty API

    Pagination and filters on a dataset that is fun to browse.

    rickandmortyapi.com

    Runs in the browserWorking

  5. Open Trivia Database

    Build a quiz: questions, answers and categories.

    opentdb.com

    Runs in the browserWorking

  6. DummyJSON

    Products and carts for a mock shop, with search and pagination.

    dummyjson.com

    Runs in the browserWorking

  7. Random User Generator

    Fake people for lists, avatars and profile cards.

    randomuser.me

    Runs in the browserWorking

  8. Official Joke API

    Two fields, setup and punchline. Ideal for a button that loads new content.

    official-joke-api.appspot.com

    Runs in the browserWorking

  9. Deck of Cards

    State across requests: shuffle a deck, then draw from it by id.

    deckofcardsapi.com

    Runs in the browserWorking

Build snapshot, not live. One verifier run on , from the machine that built this site. How we check

How the pieces fit

Each API here answered our verifier with a CORS header, so the example on its page runs from any browser tab.

  1. Open the API’s page here and press "Send request" to see the real answer before you write code.
  2. Copy the JavaScript snippet into a script tag or the browser console.
  3. Render one field on the page, then handle the error case by turning your network off.
  4. Only then add loading states, lists and pagination.

Questions

What is the easiest API to start with?

JSONPlaceholder or Dog CEO. Both return a small JSON object from a single GET request, need no key and allow calls from the browser.

Why does my fetch fail with a CORS error?

The API does not send an Access-Control-Allow-Origin header, so the browser refuses to hand the answer to your page. Pick an API marked CORS in this catalog, or call the API from a server.

Do these APIs save what I POST?

Mock APIs such as JSONPlaceholder and DummyJSON answer as if they saved it, but nothing is stored. The next GET returns the original data.

Other collections

Keep exploring