June 22, 2021

8 Free to Use GraphQL APIs for Your Projects and Demos

Kurt Kemple

Kurt Kemple

Whether you’re trying to build a demo, create a workshop, or learn how GraphQL works, it’s nice to have some examples to reference instead of having to build your own. While Apollo Server makes building your own API a delight, sometimes you don’t want to get your hands dirty if you don’t have to. As luck would have it, some really awesome GraphQL APIs are available that you can use for free!

Here’s 8 of them you can use today along with an example query for each one to get you started:

Space X API

Get all sorts of information about previous Space X launches, like information about the rocket, astronauts, and more! Try it out here!

{
  launchesPast(limit: 10) {
    mission_name
    launch_date_local
    launch_site {
      site_name_long
    }
    links {
      article_link
      video_link
    }
    rocket {
      rocket_name
    }
  }
}

SWAPI (Star Wars API)

Are you a fan of Star Wars? The SWAPI API provides a wealth of information about some of the older Star Wars movies. It’s a great API for showing how relationships work in GraphQL. Try it out here!

{
  allFilms {
    films {
      title
    }
  }
}

Rick and Morty API

Get information about episodes, characters, and even their last known location! Try it out here!

{
  characters(page: 2, filter: { name: "rick" }) {
    info {
      count
    }
    results {
      name
    }
  }
}

Countries API

Get country codes, emoji, and more for every country. Try it out here!

{
  countries {
    code
    name
    emoji
  }
}

PokeAPI

Get all the information you need to build a Pokedex! The Pokemon API is free for non-commercial use and rate-limited. Try it out here!

{
  gen1_species: pokemon_v2_pokemonspecies(
    where: { pokemon_v2_generation: { name: { _eq: "generation-i" } } }
    order_by: { id: asc }
  ) {
    name
    id
  }
}

DexAPI

Another Pokemon API with all the info you need to build a Pokedex! This API is in early development but has a great API for quick Pokemon queries! Try it out here!

{
  allPokemon {
    name
  }
}

Anilist API

Anilist is an anime API with information about 1000s of animes. The API is free for non-commercial use and allows 90 requests per minute. Try it out here!

{
  Page {
    media {
      siteUrl
      title {
        english
        native
      }
      description
    }
  }
}

GitHub API

The GitHub API is one of my favorite APIs for creating examples. It supports both queries and mutations (you can create repositories, add comments to PRs, and more) and has a vast amount of data making it possible to build really in-depth examples and demos or see what GraphQL looks like at scale. Try it out here!

While the API is free to use, you will still need to add an Authorization header in Apollo Explorer using a personal access token. Check out the GitHub API docs for more information.

{
  viewer {
    login
    repositories(last: 10) {
      nodes {
        name
      }
    }
  }
}

Happy Querying!

Written by

Kurt Kemple

Kurt Kemple

Read more by Kurt Kemple