Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

8.1 - Basics of APIs

what are apis?

  • Stands for "Application Programming Interface".
  • Allows us to communicate with websites & programs we don't control.

tip

There are lots of free APIs out there! Try the following page for some.

https://github.com/public-apis/public-apis

query parameters

Query parameters come in parameter/value pairs -- We pass these to the API in order to control what it will return to us. Parameters are always strings, but values can be anything.

query parameter syntax

When writing a query parameter directly in a URL, we indicate individual parameter/value pairs with "?parameter=value", and put multiple together with "&". Some examples, with a base > URL of https://meowfacts.herokuapp.com/: