To use an API, you'll want to check out the API’s documentation for access requirements. For instance, HubSpot's Contacts API requires authentication:
Once you have access requirements, you can use a tool like Postman or Runscope to manually interact with an API. These third-party tools, or "REST clients," allow you to make one-off requests to API endpoints without coding. They're great for getting a feel for what your backend systems may do automatically. Check out this resource on how to make your very first API request with Postman.
If you're not quite ready to jump in on the deep end with a REST client, try punching the following into your browser:
This is a public API endpoint from the free REST Countries service. Specifically, we're using the "Name" endpoint, which accepts country names as search queries. A successful search will return potential country matches, along with key information about each nation. In this case, we're searching for countries with names that contain the word “united.”
You should see following block of JSON data returned:
Congratulations! You just made an API request from your browser!
The endpoint returned raw data (formatted in JSON) on countries with "united" in the name.
It may not look pretty, but remember that APIs are designed for applications, which don't require the styling humans expect on an HTML web page. While you can easily Google "countries that begin with 'united'," applications cannot. They might have to rely on services like REST Countries to look up that information.
If you're unsure whether you should use your in-house developers to create APIs or look externally, check out First vs. Third-Party APIs: What You Need to Know.
Originally published May 17, 2019 7:00:00 AM, updated July 12 2019