Front-end friendly APIs

Why does it matter if an API is considered “front-end friendly”?

  • Some APIs are built in such a way that calls to the API can only be made via the backend server. This is due to a security feature that is built into browsers which restrict JavaScript-initiated “cross-origin” HTTP requests between two different domains (e.g. from javascript.com to programming.com).

  • However, making cross-origin request is a common tasks when attempting to share data between two servers (on different domains). As a result, a workaround was created called CORS (Cross Origin Resource Sharing).

  • In order for CORS to work, applications will need to send an additional request called a pre-flight request to the server they are looking to make a request to.

  • In most cases, these pre-flight requests can only be made from a backend server.

  • Since your projects will be front-end only applications, you should confine your search for APIs (assuming you want to use an API) to APIs that don’t require “pre-flight” requests


APIs that are front-end friendly

NOTE: Please refrain from using any APIs found on RapidAPI - their business model is to try to trick you into paying for APIs that are normally free