7 Free Public APIs for Developers
& Free Public APIs for Developers

7 Free Public APIs for Developers

Dead Simple Chat Team

In this article we are going to look at some free public APIs that you can use in your project

All the APIs mentioned are unique in their purpose and scope, so there is a wide variety of free data at your disposal for building any kind of application you want. Here is the list of APIs we are going to look at

If you are looking for a JavaScript Chat SDK and API, you can consider DeadSimpleChat SDK

You can click on the link to go directly to the API that you like and find out how you can use the API along with code examples

  • Jsonplaceholder API
  • OpenWeatherMap
  • News API
  • Countries API
  • Space X API
  • The Movie database API
  • Github REST API
  • CoinGecko API
  • IBM Watson
  • Conclusion
JSON Placeholder

API 1: Jsonplaceholder API

Jsonplaceholder as the name suggests is a fake data website that provides placeholder data in JSON format ideal for any kind of web development project

It provides a range of different data types that can be used in your project including

/posts 100 posts
/comments 500 comments
/albums 100 albums
/photos 5000 photos
/todos 200 todos
/users 10 users

There is support for all the HTTP methods, like for example

GET /posts
GET /posts/1
GET /posts/1/comments
GET /comments?postId=1
POST /posts
PUT /posts/1
PATCH /posts/1
DELETE /posts/1

Here are some of the features of JSON placeholder API

  • Simple and easy to use
  • Supports All HTTP methods
  • Realistic Data Structures
  • Typical response behaviour
  • CORS enabled by default
  • Community and Reliability

Practical example using PostMan

In this section we will call the Jsonplaceholder website using POSTman and see what is the result that we get

JSON Placeholder data

So we made a GET request on the /posts endpoint and we got the 100 posts as a result.

[
  {
    "userId": 1,
    "id": 1,
    "title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
    "body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
  },
    {
    "userId": 1,
    "id": 2,
    "title": "qui est esse",
    "body": "est rerum tempore vitae\nsequi sint nihil reprehenderit dolor beatae ea dolores neque\nfugiat blanditiis voluptate porro vel nihil molestiae ut reiciendis\nqui aperiam non debitis possimus qui neque nisi nulla"
  },
  ]
Sample JSON data recieved
Open Weather Map API

API 2: OpenWeatherMap API

the OpenWeatherMap API provides free weather data through API

  • Current Weather Data with real time updates
  • Weather Forecasts
  • Historical Weather data
  • Global coverage
  • Various Data Formats
  • Ease of use

the OpenWeatherMap API requirs an account for you to call the api. So you need an API key, create a free account to call the api

https://api.openweathermap.org/data/3.0/onecall?lat=33.44&lon=-94.04&appid={API key}

and you can get the sample API data like this

{
   "lat":33.44,
   "lon":-94.04,
   "timezone":"America/Chicago",
   "timezone_offset":-18000,
   "current":{
      "dt":1684929490,
      "sunrise":1684926645,
      "sunset":1684977332,
      "temp":292.55,
      "feels_like":292.87,
      "pressure":1014,
      "humidity":89,
      "dew_point":290.69,
      "uvi":0.16,
      "clouds":53,
      "visibility":10000,
      "wind_speed":3.13,
      "wind_deg":93,
      "wind_gust":6.71,
      "weather":[
         {
            "id":803,
            "main":"Clouds",
            "description":"broken clouds",
            "icon":"04d"
         }
      ]
   },

The OpenWeatherMap API has paid plans as well but the free plan is good enough for testing purposes.

News API

News API

News API provides JSON data news format from various outlets. You have to create an account to access the news data, there is a free plan that you can use

here are some of the salient features of News API

  1. News from wide range of sources
  2. Real time news
  3. Historical data available
  4. Simple Integration
  5. JSON format

Free plan is available and you need to sign up for it, but news api is good for prototyping and developing you app

News APi

I have signed up for the free plan of News API and tried making an API call to get the latest headlines.

Here is a sample JSON data returned by the API

{
    "status": "ok",
    "totalResults": 36,
    "articles": [
        {
            "source": {
                "id": null,
                "name": "Yahoo Entertainment"
            },
            "author": null,
            "title": "Yankees' Gerrit Cole unanimously wins AL Cy Young Award; Blake Snell of Padres wins NL award - Yahoo Sports",
            "description": null,
            "url": "https://sports.yahoo.com/yankees-gerrit-cole-unanimously-wins-al-cy-young-award-blake-snell-of-padres-wins-nl-award-232358896.html",
            "urlToImage": null,
            "publishedAt": "2023-11-15T23:53:07Z",
            "content": null
        },
        {
            "source": {
                "id": "abc-news",
                "name": "ABC News"
            },
            "author": "Beatrice Peterson, Meredith Deliso",
            "title": "Mom of Virginia 6-year-old who shot teacher sentenced to 21 months in federal case - ABC News",
            "description": "Deja Taylor had pleaded guilty to federal charges.",
            "url": "https://abcnews.go.com/US/mom-newport-news-teacher-shooting-sentenced/story?id=104925730",
            "urlToImage": "https://i.abcnewsfe.com/a/949742ed-4a69-46f2-a3b5-34eb0af044db/deja-taylor-gty-jt-231115_1700084866994_hpMain_16x9.jpg?w=992",
            "publishedAt": "2023-11-15T23:26:15Z",
            "content": "The mother of the 6-year-old boy accused of shooting his first grade teacher during class in Newport News, Virginia, in January was sentenced on Wednesday to 21 months in prison on federal charges.\r\n… [+3345 chars]"
        },
        ]

The NEWS API is a useful for developers for the following practical purposes

  1. Content aggregation for News websites and apps
  2. Current Events feature in applications
  3. educational and research tools
  4. Personalized news feed
  5. Social media integration
  6. Business intelligence and market intellegence tools
REST Countries

REST Countries API

In this section we will learn about the free api tool that provides comprehensive data about countries. This data includes information like the flag, population areas and more such curious info

The information is provided through REST API in JSON format or XML format. Whichever you find easy to use

Unique features of Countries API

  • Country data
  • Geographical Information
  • Economic and demographic data
  • Political information
  • Flag

you can easily use countries api without any api key. Let us call the GET api to get information about all the countries

Here is a part of the response that we get from the Countries API

[{
        "flags": {
            "png": "https://flagcdn.com/w320/bb.png",
            "svg": "https://flagcdn.com/bb.svg",
            "alt": "The flag of Barbados is composed of three equal vertical bands of ultramarine, gold and ultramarine. The head of a black trident is centered in the gold band."
        },
        "name": {
            "common": "Barbados",
            "official": "Barbados",
            "nativeName": {
                "eng": {
                    "official": "Barbados",
                    "common": "Barbados"
                }
            }
        }
    },
    {
        "flags": {
            "png": "https://flagcdn.com/w320/im.png",
            "svg": "https://flagcdn.com/im.svg",
            "alt": ""
        },
        "name": {
            "common": "Isle of Man",
            "official": "Isle of Man",
            "nativeName": {
                "eng": {
                    "official": "Isle of Man",
                    "common": "Isle of Man"
                },
                "glv": {
                    "official": "Ellan Vannin or Mannin",
                    "common": "Mannin"
                }
            }
        }
    }
    ]

let us move to next API

Space X API

Space X API

In this section we are going to learn about the space X API. It is an open source api that provides details about the Space X launches, vehicles and more interesting facts

One of the best features of Space X API is that it does not require an API key call most of the GET endpoints

Let us look at and example of calling the Space X API through Postman

Unique features of Space X

  1. data on Space X
  2. Real time updates
  3. historical data
  4. detailed rocket and capsule information
  5. API key is not required
  6. High Quality media resources
Space X rockets

Let us see some of the sample respose that we recieve when we call a GET API

[
    {
        "height": {
            "meters": 22.25,
            "feet": 73
        },
        "diameter": {
            "meters": 1.68,
            "feet": 5.5
        },
        "mass": {
            "kg": 30146,
            "lb": 66460
        },
        "first_stage": {
            "thrust_sea_level": {
                "kN": 420,
                "lbf": 94000
            },
            "thrust_vacuum": {
                "kN": 480,
                "lbf": 110000
            },
            "reusable": false,
            "engines": 1,
            "fuel_amount_tons": 44.3,
            "burn_time_sec": 169
        },
        "second_stage": {
            "thrust": {
                "kN": 31,
                "lbf": 7000
            },
            "payloads": {
                "composite_fairing": {
                    "height": {
                        "meters": 3.5,
                        "feet": 11.5
                    },
                    "diameter": {
                        "meters": 1.5,
                        "feet": 4.9
                    }
                },
                "option_1": "composite fairing"
            },
            "reusable": false,
            "engines": 1,
            "fuel_amount_tons": 3.38,
            "burn_time_sec": 378
        },
        "engines": {
            "isp": {
                "sea_level": 267,
                "vacuum": 304
            },
            "thrust_sea_level": {
                "kN": 420,
                "lbf": 94000
            },
            "thrust_vacuum": {
                "kN": 480,
                "lbf": 110000
            },
            "number": 1,
            "type": "merlin",
            "version": "1C",
            "layout": "single",
            "engine_loss_max": 0,
            "propellant_1": "liquid oxygen",
            "propellant_2": "RP-1 kerosene",
            "thrust_to_weight": 96
        },
        "landing_legs": {
            "number": 0,
            "material": null
        },
        "payload_weights": [
            {
                "id": "leo",
                "name": "Low Earth Orbit",
                "kg": 450,
                "lb": 992
            }
        ]

The Movie Database

The Movie database (TMDB) for developers

TMDB provides a vast collection of movies, TV shows, documentary and much more for developers. The database contains detailed content information like movie rating, plot details, actors information etc

To use the TMDB database you need to create an account on the website and get an API key

Another point to note is that the TMDB database does support CORS and hence it is accessible from the client side applications

You also need auth to access the api and hence access the api requires quite a bit of knowledge and hence it is not easily accessible. But here is the sample request and response

here is the JSON response

{
    "results": [
        {
            "id": 401110,
            "adult": false
        },
        {
            "id": 11344,
            "adult": false
        },
        {
            "id": 288550,
            "adult": false
        },
}

Some of the Unique features of the movie database is

  1. extensive database
  2. high quality content
  3. internationalization
  4. search functionality
  5. regularly updated
  6. Detailed information about the movie or content
DeadSimpleChat

Need Chat API for your website or app

DeadSimpleChat is an Chat API provider

  • Add Scalable Chat to your app in minutes
  • 10 Million Online Concurrent users
  • 99.999% Uptime
  • Moderation features
  • 1-1 Chat
  • Group Chat
  • Fully Customizable
  • Chat API and SDK
  • Pre-Built Chat

Need TURN server, we recommend going with Metered TURN servers starting at 0.04 USD / GB

If you need a free version of the turn server we also have the OpenRelayProject.org a free TURN server.

Conclusion

In this article we learned about the free APIs that are available to developers and how easy it is to sign up for these API and get the data to develop any kind of application without worrying about building the backend first

It is also helpful to prototype front-end applications and get all the data tht is required