Simple Football Highlights API integration to your application
Presenting football highlights API aggregator that covers over +950 leagues including Premier League, Serie A, La Liga, Ligue 1 and Bundesliga.

Nowadays, there are many API providers that offer a wide variety of sports data. Unfortunately, there are still two common issues that such applications face:
- lack of betting information,
- lack of real time highlights coverage.
On the market, there already are different Sport Betting APIs that tackle the previously mentioned problem, whilst highlights coverage is still a somewhat lacking topic. As a developer myself I was always looking for ways on how to integrate highlights with an already existing Football API. At the time of writing this article I found Football Highlights API by Highlightly to be one of the best options. Not only do they offer game recaps and post match interviews but also events like missed penalties, yellow/red cards, goal scoring plays & much more. I should also mention that highlights aggregation happens in real time, which is just awesome.
Prerequisites for API integration
Getting access to the above mentioned API is quite simple. As a developer you only need a Rapid API account to start.
Once you are successfully logged in, you can opt for the BASIC tier of the API which is free. I myself find the PRO tier the best, since it is quite cheap and allows you to query all data freely.
Note: The API TOKEN you receive from Rapid API should be securely stored on your server. Make sure not to expose it to your clients.
Fetching Football highlights data
There are a lot of cool programming languages out there. Since for me Javascript is the best I will show you a couple of ways on how you can fetch Football Highlights API data (docs can be found here).
There are a couple of routes which we can use for data fetching:
- /countries and /countries/{countryCode}: These routes deliver country-related data, essential for contextualizing football highlights.
- /teams and /teams/{team_id}: Team-specific information is accessible through these routes, enabling you to delve into the performance of specific teams.
- /leagues and /leagues/{league_id}: League routes grant you access to valuable league-related data, crucial for narrowing down your search for highlights.
- /matches and /matches/{match_id}: Match-specific information can be retrieved through these routes, allowing you to pinpoint the highlights of a particular game.
- /highlights and /highlights/{highlight_id}: The heart of the API lies in these routes. Here, you can access the actual highlights that will make your application shine.
Country, team and league routes more or less serve a utility purpose. Since the whole point of this API is a seamless integration with other Football APIs one should be able to make simple and intuitive queries for highlights without the need of any ids, right?
Lets create a simple function that will trigger a HTTP request to fetch highlights data:

Make sure to add your own “X-RapidAPI-Key” which is received by subscribing to any tier of the API. With this, we can fetch data however we want. E.g.:

The above function call would result in the following data:

The API supports a whole variety of query parameters not just the league name as presented in the above example (you can use query fields like date, season, countryCode, countryName, etc.).
Since it would take a long time to go through all examples, I simply suggest that you visit the Rapid API endpoint testing page and play with the API a bit.
Conclusion
Real time highlights coverage is a major pain point of the current industry. We have presented a simple yet powerfull API aggregator for Football Highlights, which collects highlight clips, game recaps, interviews, yellow/red cards, goal scoring moments in real time. The API itself does not only support major leagues but other lesser known ones as well. I suggest checking the BASIC plan which is free, to get a feel on how the API works before upgrading to the PRO plan or higher to get unlimited highlights across all leagues.
Note: The BASIC plan offers support for only a subset of leagues (around 20 leagues at the time of writing this).
About the Creator
Highlightly
Passionate sports enthusiast. Spending spare time watching games, reading about sports and athletes, tracking scores, etc.




Comments
There are no comments for this story
Be the first to respond and start the conversation.