DEV Community

loading...

Beginner's First Steps With APIs

tallmanlaw profile image Tisha Tallman ・1 min read

Third party application program interfaces, APIs, are a great tool for building software applications. An easy way to get familiar with the protocols used in making requests and receiving information is by choosing an API of personal interest and playing around with it. A simple search engine query yields a great starting point.

After choosing an API of interest, I set up a personal account and obtained an API key. I built out a simple html for the information to return to me in the browser.

Then, I created a variable for the API key and a variable for the query. The query includes the URL in which I wish to retrieve the information plus the API key. Insert the appropriate API key and URL where the “ “ are indicated.

I, next, coded an ajax ‘get’ method to retrieve the information.

The following is then sent to the browser.

After making this first step, I found it easier to understand APIs and I acquired a basic understanding of the power of utilizing third party APIs.

Discussion (0)

Forem Open with the Forem app