20 Free APIs Every Web Developer Should Know

APIs power the modern web. Whether you’re building a weather app, a payment system, or a social media dashboard, you’ll need to work with APIs.

I’ve collected 20 free APIs that every web developer should know. No API keys required for most of them. Just start building.

What is an API?

API stands for Application Programming Interface. Think of it as a waiter in a restaurant. You (the client) tell the waiter what you want. The waiter tells the kitchen (the server). The kitchen cooks your food and the waiter brings it back to you.

APIs work the same way. Your app sends a request to an API. The API processes that request and sends back data. No need to understand how the kitchen works.

Api Diagram
How an API works: Request → Processing → Response

1. JSONPlaceholder (Fake API for Testing)

Jsonplaceholder Fake Api For Testing
Perfect for testing and prototyping

URL: jsonplaceholder.typicode.com

JSONPlaceholder provides fake data for testing and prototyping. No registration required.

Example request: https://jsonplaceholder.typicode.com/posts/1

What you get: A fake post object with userId, id, title, and body properties.

Want to test these APIs faster? Install the Thunder Client extension from our 10 Best VS Code Extensions article to test APIs directly inside your editor.

2. OpenWeatherMap

Openweathermap
Get current weather for any city

URL: openweathermap.org/api

Get current weather, forecasts, and historical data for any city worldwide. Free tier: 1,000 calls per day.

Example request: https://api.openweathermap.org/data/2.5/weather?q=London&appid=YOUR_API_KEY

What you get: Temperature, humidity, wind speed, weather conditions, and more.

3. REST Countries

Rest Countries
Get data about any country

URL: restcountries.com

Get population, capital, currency, languages, flag, and borders for any country. No API key needed.

Example request: https://restcountries.com/v3.1/name/pakistan

What you get: Full country data including capital, population, languages, currency, and flag URL.

4. Dog CEO (Random Dog Images)

Dogceodog Api
Get random dog images by breed

URL: dog.ceo/dog-api

Fun API for beginners. Get random dog images, list of all breeds, or images by specific breed. No API key needed.

Example request: https://dog.ceo/api/breeds/image/random

What you get: A random dog image URL as a JSON response with a status message.

5. Cat Facts

Cat Facts
Get random facts about cats

URL: catfact.ninja

Get random cat facts. Great for learning how to make GET requests. No API key required.

Example request: https://catfact.ninja/fact

What you get: A random cat fact string and the length of the fact.

6. PokéAPI (Pokémon Data)

Pokapi Pokmon Data
Complete Pokémon database

URL: pokeapi.co

Everything about Pokémon. Get Pokémon by name, ID, or type. Get moves, abilities, evolutions, and more. No API key needed.

Example request: https://pokeapi.co/api/v2/pokemon/pikachu

What you get: Pokémon data including abilities, base experience, height, weight, stats, and types.

7. Random User Generator

Random User Generator
Generate fake user data for testing

URL: randomuser.me

Generate fake user data including name, email, address, phone number, and profile picture. Perfect for testing user profiles or signup forms.

Example request: https://randomuser.me/api/

What you get: A random user object with name, email, location, phone, and profile picture URL.

8. The Meal DB

The Meal Db
Recipe and ingredient database

URL: themealdb.com

Search for recipes by ingredient, category, or area. Get detailed recipe instructions and ingredient lists. No API key needed.

Example request: https://www.themealdb.com/api/json/v1/1/search.php?s=pizza

What you get: Recipe name, category, area, instructions, ingredients, and measurements.

9. GitHub API

Github Api
Access repository data, user profiles, and more

URL: docs.github.com/en/rest

The GitHub API lets you access public repository data, user profiles, issues, pull requests, and more. No API key required for public data.

Example request: https://api.github.com/repos/facebook/react

What you get: Stars, forks, open issues, contributors, languages used, and repository metadata.

10. Bored API

Bored Api
Get activity suggestions when you’re bored

URL: bored-api.appbrewery.com

Get random activity suggestions when you’re bored. You can filter by type (education, recreational, social, charity, etc.) or number of participants. No API key needed, but requests are limited to 100 per 15 minutes. This is a great teaching tool from the App Brewery.

Example request: https://bored-api.appbrewery.com/random

What you get: A random activity object including name, type, participants, price, accessibility, duration, and an optional link to learn more.

11. Agify.io

Agifyio
Predict age from first name

URL: agify.io

Enter a first name and get the predicted age based on US social security data. Free tier: 1,000 calls per day. No API key needed.

Example request: https://api.agify.io?name=arsalan

What you get: Name, predicted age, and count of records used for prediction.

12. Genderize.io

Genderizeio
Predict gender from first name

URL: genderize.io

Enter a first name and get the predicted gender based on international data. Free tier: 1,000 calls per day.

Example request: https://api.genderize.io?name=arsalan

What you get: Name, predicted gender, probability, and count of records used.

13. Nationalize.io

Nationalizeio
Predict nationality from first name

URL: nationalize.io

Enter a first name and get the predicted nationality. Free tier: 1,000 calls per day.

Example request: https://api.nationalize.io?name=arsalan

What you get: Name and a list of country codes with probability percentages.

14. JokeAPI

Jokeapi
Get programming jokes or dad jokes

URL: v2.jokeapi.dev

Get jokes in multiple categories: Programming, Misc, Dark, Pun, Spooky, Christmas. Filter by type (single or two-part). No API key needed.

Example request: https://v2.jokeapi.dev/joke/Programming

What you get: A joke (single or two-part with setup and delivery) and category information.

15. Dictionary API

Dictionary Api
Get word definitions and pronunciations

URL: dictionaryapi.dev

Enter any English word and get its definition, pronunciation, and example sentences. No API key needed.

Example request: https://api.dictionaryapi.dev/api/v2/entries/en/developer

What you get: Word meanings, phonetic pronunciation, part of speech, definition, and example sentence.

16. Open Library API (Search for Books)

Open Library Api Search For Books
Search a catalog of millions of books

URL: openlibrary.org/developers/api

The Open Library API lets you search for books, get author information, and access cover images. No API key is required, making it perfect for learning how to work with JSON data.

Example request: https://openlibrary.org/search.json?q=javascript

What you get: A list of books with titles, authors, first publish year, and cover IDs.

17. IPify (Get Your Public IP)

Ipify
Get your public IP address

URL: ipify.org

Get your public IP address in plain text or JSON format. No API key needed. Simple and reliable.

Example request: https://api.ipify.org?format=json

What you get: Your public IP address as a JSON object.

18. Disease.sh (COVID-19 & Infectious Disease Data)

Diseasesh Covid 19 Infectious Disease Data
Real-time global disease statistics

URL: disease.sh

The Disease.sh API provides real-time statistics for COVID-19 and other infectious diseases. Used by researchers and developers worldwide. No API key required for basic endpoints.

Example request: https://disease.sh/v3/covid-19/all

What you get: Global cases, deaths, recovered, active cases, and today’s statistics in JSON format.

19. NASA API

Nasa Api
Get space data, astronomy pictures, and Mars rover photos

URL: api.nasa.gov

Get Astronomy Picture of the Day (APOD), Mars rover photos, near-earth object data, and more. Free API key required but easy to get.

Example request: https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY

What you get: Astronomy picture title, explanation, image URL, and date.

20. Deck of Cards API

Deck Of Cards Api
Create card decks, shuffle, draw, and reshuffle

URL: deckofcardsapi.com

Create a new deck of cards. Shuffle. Draw cards. Reshuffle. Perfect for building card games. No API key needed.

Example request: https://deckofcardsapi.com/api/deck/new/draw/?count=1

What you get: A shuffled deck ID, remaining card count, and the card object with value, suit, and image URL.

How to Start Using These APIs

Here’s a simple JavaScript example to call any REST API:

// Fetch data from an API
fetch('https://jsonplaceholder.typicode.com/posts/1')
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

That’s it. Replace the URL with any API from this list and start building.

Final Thoughts

These 20 free APIs are perfect for learning, prototyping, and building real projects. Start with JSONPlaceholder to understand how APIs work. Then move to the fun ones like Dog CEO or PokéAPI.

What API are you building with? Let me know in the comments below.

✍️ Want to Contribute?

WebDevToolkit accepts high-quality guest posts from web developers, SEO professionals, and digital marketers.

✅ Do-follow backlink included
✅ Published within 5 days
✅ Shared with 1,000+ monthly readers

View Guest Post Guidelines →

Leave a Comment