Pre-match News
Our Pre-match news offers Match Previews written by our data scouts. They are available at a minimum of 48 hours before the match. Our professional match previews are written by our scouts that show what people can expect during the match. Our scouts ensure all previews are up to date at all times.
You can choose a variety of endpoints to retrieve the Pre-match News.
An overview of all available options:
GET Pre-Match News: returns all the Pre-Match News articles available within your subscription.
GET Pre-Match News by Season ID: returns the all the Pre-Match news articles from your requested season id.
GET Pre-Match News for Upcoming Fixtures: returns all pre-match news articles for the upcoming fixtures within your subscription.
For all the Pre-Match News endpoints the base URL is the same:
https://api.sportmonks.com/v3/football/news/pre-match
Per endpoint the rest of the URL requires additional information. We will explain this per endpoint.
Requesting Pre-Match News
GET Pre-Match News
The first option is to request all the pre-match articles available in your subscription. The URL to retrieve all these articles is the same as the base URL for pre-match news. All you have to do is authorize the request with your API token. Check our authentication section for more info.
https://api.sportmonks.com/v3/football/news/prematch?api_token=YOUR_TOKEN
In the response, you will see the unique id of the article, the fixture its related to and the league its related to. Furthermore, you will see the title of the specific article and the type of the article, which is either "prematch"
or "postmatch"
.
GET Pre-Match News by Season ID
The GET Pre-Match News by Season ID is the most commonly used endpoint to return all the pre-match articles from the requested season id. So, how do you request all of this data yourself? We’re going to show you how!
This section will show you how to request articles for the Champions League season 2023/2024 (season id: 21638). You will need to add the season_id
parameters to your request.
https://api.sportmonks.com/v3/football/news/pre-match/
seasons/{season_id}
This will result in the following request:
https://api.sportmonks.com/v3/football/news/pre-match/seasons/21638?api_token=YOUR_TOKEN
As you can see, the response is an will retrieve all the articles for that specific Champions League season. But what if you’re interested in articles for all upcoming fixtures?
GET Pre-Match News for Upcoming Fixtures
The GET Pre-Match News for Upcoming Fixtures endpoints is perfect for retrieving all the articles for upcoming matches. It’s great to give a quick overview of all the important matches that are being played and the latest information surrounding these matches. You will need to add the upcoming
parameter to your request.
https://api.sportmonks.com/v3/football/news/pre-match/upcoming
Now the only thing you'd have to do is add your API token to this request.
https://api.sportmonks.com/v3/football/news/pre-match/upcoming?api_token=YOUR_TOKEN
Adding useful information
Now, you might have noticed that the API returns only the necessary information. But you will still need the actual, written article. Or if you’re interested in more details? You can use certain includes for this.
Let’s say you want the Pre-Match articles of the Champions League 2023/2024 season, but this time with the actual written article and fixture information. As you’ve learnt earlier, your request is:
https://api.sportmonks.com/v3/football/news/pre-match/seasons/21638?api_token=YOUR_TOKEN
Now, you can add the lines
and fixture
includes for more info:
https://api.sportmonks.com/v3/football/news/pre-match/seasons/21638?api_token=YOUR_TOKEN&include=lines;fixture
Filtering
Let’s continue with the another example. You've used the GET Pre-Match News for Upcoming Fixtures endpoint. You now have included the lines in the response, but you’re only interested in the upcoming fixtures for the Premier League (ID: 8). You can filter for that league via the filter option:
https://api.sportmonks.com/v3/football/news/pre-match/upcoming?api_token=YOUR_TOKEN&include=lines;league&filters=newsitemLeagues:8
Last updated
Was this helpful?