API-Football

From HaFrWiki
Jump to: navigation, search

Introduction

Football is loved by many people so there are many apps and tools. The Api-Football [1] is no exception.

Web-API?

What's an Web-API?
API stands for Application Programming Interface. A Web API is an application programming interface for the Web [2]. A Browser API can extend the functionality of a web browser. A Server API can extend the functionality of a web server.
A server-side web API consists of one or more publicly exposed endpoints to a defined request–response message system, typically expressed in JSON or XML by means of an HTTP-based web server.
A server API (SAPI) is not considered a server-side web API, unless it is publicly accessible by a remote web application.

REST

Web 2.0 Web APIs often use machine-based interactions such as REST and SOAP. RESTful web APIs use HTTP methods to access resources via URL-encoded parameters, and use JSON or XML to transmit data.
By contrast, SOAP protocols are standardized by the W3C and mandate the use of XML as the payload format, typically over HTTP.
Furthermore, SOAP-based Web APIs use XML validation to ensure structural message integrity, by leveraging the XML schemas provisioned with WSDL documents.
A WSDL document accurately defines the XML messages and transport bindings of a Web service.
The API-Football is a REST Api.

Postman

Access to the API can be written in many languages (See the docu of API-Football).
One of the easiest ways to test the REST WebApi is Postman [3].

Access to the API

To access an API you need an accesstoken or accesskey. Most API providers have there own registration or make usage of API-Key providers. Api-Football is again no exception.

  • Football own registration-plan, see Api-Football Pricing.
    • Free $0/month for 100 requests/day
    • Pro $19/month for 7,500 request/day
    • Ultra $75/month for 75,000 request/day
    • Mega $39/month for 150,000 request/day
  • Rapidapi, see for more Rapidapi.com.

Access Keys

Access-keys are mostly passed as header variables, so you need to place them in the Header variables.

  • Api-Football
    • x-apisports-key : The key of the api (i.e. 1f1d5b4...ff)
  • Rapidapi
    • x-rapidapi-key : The key of the api (i.e. 1f1d5b4...ff)
    • x-rapidapi-host : The host of the api ( i.e. api-football-v1.p.rapidapi.com)

Access needs also an https-url.

Widgets

The widgets are free to use, but every request counts for your chosen usage plan.
An example blog How to custom api football explains how to do so.



See also

top

Reference

top

  1. Api-Football Homepage of the app.
  2. Wikipedia Web API, Wikipedia WEB-API.
  3. Postman.com, Homepage Postman.