10 Popular API Examples: A Full List

api examples
Key takeaways
The 30-second version of this article
An API is a messenger that lets two applications exchange requests and data, usually over HTTP with JSON responses.
Common API types include open, internal, and partner APIs, built on protocols such as REST, SOAP, GraphQL, and webhooks.
Popular examples include the X, ChatGPT, Google Maps, Discord, GitHub, PayPal, Shopify, YouTube, Instagram, and Slack APIs.
APIs can break or return wrong data, so teams test endpoints, methods, parameters, and edge cases before release.
Katalon lets teams build, manage, and run API tests in low-code or scripting mode and plug them into CI/CD.

Every time you use an app such as Facebook or Instagram, check the weather or send an instant message, you’re using an API.

API examples are everywhere, in the applications you use on a daily basis. APIs are basically the middlemen of apps and web services, allowing different applications to communicate with each other, directly or through API integration tools. They are a key aspect of our digital world and in software development.

With APIs, we are able to engage in digital experiences on our phones and computers every day. So what are APIs and some API examples? Here we will explain the concept of API in the most understandable way and provide you with 10 most popular examples of API.

In this article, you will get to learn about:

  1. X (Twitter) API
  2. ChatGPT API
  3. Google Maps API
  4. Discord API
  5. Github API
  6. Paypal API
  7. eCommerce API
  8. YouTube API
  9. Instagram API
  10. Slack API

What is an API?

Imagine the weather app is like a restaurant kitchen, and the messaging app is like a waiter.

The kitchen (weather app) makes the food (weather updates), but it doesn’t talk directly to customers.

Instead, it uses the waiter (API).

The API is the waiter. The messaging app (customer) tells the API (waiter), “I’d like the weather forecast, please.” The API takes that request to the weather app’s server (kitchen), gets the info (the food), and brings it back.

So basically: An API is a messenger that lets two apps talk to each other. One app sends a request through the API, and the other app responds with the right data.

📚 Read More: What is API Testing? A Complete Guide

How to use an API?

  • Find the API you want to use (e.g. weather, news, maps).
  • Read the API documentation to see how it works: what you can ask for and how to ask.
  • Get an API key (like a password) if it’s required for access.
  • Send a request to the API using a tool or code (like typing a special URL).
  • Receive the response the API sends back the data, usually in JSON format.
  • Use the data in your app or website to show info or take action.

Actual example of how API is used

Let's say we want to get the current weather in London using a free weather API called Open-Meteo.

  • Open-Meteo is free for non-commercial use and doesn't need an API key, which makes it a good first API to try. Many other APIs require a key passed in a header or query parameter.
  • We pass London's latitude and longitude as query parameters, plus current=temperature_2m to ask for the current temperature.
  • We send a fetch() request to the API.
  • The server responds with a JSON object containing the weather data.
  • We check the HTTP status, extract the temperature, and print it with console.log().
  • If something goes wrong (a network error or a bad request), we handle it in .catch().

Here's the script for the API:

// Example: Get the current temperature in London from the Open-Meteo API
const city = 'London';
const url = 'https://api.open-meteo.com/v1/forecast?latitude=51.51&longitude=-0.13&current=temperature_2m';

fetch(url)
  .then(response => {
    if (!response.ok) throw new Error(`HTTP ${response.status}`);
    return response.json();
  })
  .then(data => {
    const temperature = data.current.temperature_2m;
    console.log(`The current temperature in ${city} is ${temperature}°C`);
  })
  .catch(error => {
    console.error('Error fetching data:', error);
  });

To make sure an API works properly, QA teams have to test them by running those APIs through a wide variety of real-life use cases.

Types of API

There are so many types of APIs. Below are several of them:
 

By use case:

  • Open APIs: publicly available APIs that anyone can use to access a company’s data
  • Internal APIs: APIs used within a company/organization to communicate information between internal apps
  • Partner APIs: APIs designed specifically for third-party developers/partners, and are more limited in access

By protocols:

  • REST API: a widely used architecture for building web services using HTTP methods like GET, POST, PUT, and DELETE format to interact with data resources. REST APIs typically return data in JSON or XML format
  • SOAP API: a messaging protocol used to exchange structured data between web services. SOAP APIs use the XML format for data exchange, and they typically require more bandwidth and processing power than REST APIs. SOAP APIs support more advanced features like transaction, security, and reliability
  • GraphQL API: a query language for APIs that was developed by Facebook. GraphQL APIs allow developers to retrieve only the data they need, using a single query. This can result in more efficient data retrieval and reduced network traffic. Learn more about GraphQL testing.
  • Webhook API: a way to send real-time data from one application to another. Webhook APIs use a simple HTTP POST request to send data to a URL specified by the recipient application. The recipient application can then take action on the data in real-time. Webhook APIs are often used for event-driven applications, such as chatbots or notification systems.

What is API Testing?

APIs help apps talk to each other, but sometimes they break or return the wrong data. This can cause serious problems, like missing or corrupted information. That’s why developers need to test APIs to make sure they work correctly.

If you're preparing for a software job interview, knowing how to test APIs is important. Here's a simple guide to API testing:

  • Find the API endpoints: These are the URLs your app uses to talk to the API.
  • Know the API methods and parameters: Methods include GET (read), POST (create), PUT (update), and DELETE. You also need to know what inputs the API expects, such as query parameters, headers, or body data.
  • Write test cases: Cover valid input, invalid input, and edge cases. You can write them in code-based frameworks like REST Assured (Java) or use a low-code tool like Katalon.
  • Set up your test environment: Make sure the API and your test tools are ready to run.
  • Run the tests and check results: Review status codes, response bodies, and response times to confirm the API works as expected.

How to use Katalon for API testing?

Katalon logo

Katalon is an API automation testing tool that also supports web UI automation testing and mobile testing. Here's how Katalon helps:

  • API test creation: Send any type of API request and configure headers, query parameters, request bodies, and authentication tokens without coding them by hand. If you want full control, switch to scripting mode and write tests in Java or Groovy. Data-driven testing and BDD testing are also supported.
  • API test management: Save collections of API requests as test suites or test suite collections. You can run these on a schedule or trigger them from your CI/CD pipeline.
  • API test execution: In Katalon TestOps, you can manage test cases, schedule test runs, and view dashboards of test results. You can also run tests from the command line.
  • Collaboration: Integrate with Slack, Microsoft Teams, Jira, and other collaboration tools for better visibility across teams.
Katalon Studio API testing as a Postman alternative

For example, after creating a test project in Katalon Studio, you can click Add Web Service Keyword to generate test steps such as "Send Request" and "Verify Element Property Value", then drag and drop objects from the Object Repository in the left sidebar to define what those steps include. You can build a full API test without writing code.

Frequently asked questions

Henrik (Minh Huy) Dao

Minh Huy Dao (Henrik) is a Senior Quality Engineer at Katalon, where he has worked since 2023. He has nearly 10 years of experience in QA and test automation, including roles at TMA Solutions, Axon Active and Doctor Anywhere. His work spans automation with Java, JavaScript and WebdriverIO, as well as CI/CD with Jenkins and leading Scrum teams.

Connect on LinkedIn →
Get started

Test everything. Ship with confidence.

From generating test cases to spotting failures, Katalon's AI works across your entire pipeline, automatically.

Live webinar

The Next Evolution of Manual Testing: Introducing Katalon AI Test Runner

Learn how to grow your QA team's capacity in the age of AI, then watch Katalon AI Test Runner turn manual test cases into automated runs, live.

2:00 to 3:00 PM IST
Almas AhmedSenior Account Manager
Sumit WankhedeSolutions Engineer Manager
Register now