Live now!

Progress of current post

How to use the Sportmonks Football API with Postman

Welcome to our comprehensive how-to guide on how to use the Sportmonks Football API with Postman. Say goodbye to tedious setup and hello to seamless integration with our ready-to-use Postman collection. This collection has our entire library of endpoints, eliminating the need for manual configuration and saving you precious time and resources. The best part? It’s incredibly user-friendly.

Let’s dive in!

Published 9 February 2024
Last updated 16 May 2024
Wesley Van Rooij
How to use the Sportmonks Football API with Postman
Contents

First things first, you will need some tools to get started. 

Your personalised Sportmonks API token
Unlocking the full potential of your football application begins with your personalised API token. After creating your My.Sportmonks account, navigate to the settings page to generate your unique token. For security reasons, the API token will only be shown to you once upon creation. Please make sure to write down your API token somewhere safe.

Football API Postman Collection
Downloading the Sportmonks Football API collection is your next step. Click the link below to access the Football 3.0 API collection on Postman:

Download the Football 3.0 API Collection

This collection empowers you with the tools to integrate football data into your projects seamlessly.

Postman Account
No worries if you still need to get a Postman account. You can effortlessly create one when prompted by following the provided link. Whether you’re a seasoned developer or just starting, setting up your Postman account is a breeze.

Once you’ve gathered all the necessary tools and accounts, you can start with the Postman collection. The first step is to insert your API token. 

Step 1: Insert your API token

Ready to supercharge your API requests? Let’s make your setup process a breeze in Postman. Follow these simple steps:

  1. Click on the ‘Environmental Quick Look’, marked with the eye icon.
  2. Navigate to ‘Globals’ and select ‘Edit’.
  3. In the ‘Globals’ section, name your variable ‘api_token’.
  4. Add your API token as both the initial and current value.
  5. Click ‘Save’, and you’re all set!

Here’s the magic: Your API token will automatically be included in every future request you make. This means seamless authentication for all your requests, smoothing your development process. 

Step 2: Make your first Football API request with Postman

Now that you’ve added your API token let’s ensure it’s working correctly by testing a request in Postman. Follow these simple steps:

  1. Please navigate to our Football API collection within Postman.
  2. Choose an endpoint from the collection. We’ll use the ‘Fixture by ID’ endpoint for this how-to guide.
  3. We’ve provided an example fixture ID for your convenience, ensuring you’re accessing data available in the free plan. (Scottish Premiership or Danish Superliga.)
  4. Optionally, customise your request by adding includes. Click on the ‘include’ query parameter and insert your desired value. You can check all the available includes in the Postman collection or our Football API documentation.
  5. Once ready, hit the blue ‘send’ button to submit your request.

By following these steps, you’ll quickly verify that your API token is successfully integrated, allowing you to effortlessly access the data you need. 

Are you not seeing any data? Please make sure you’ve set up your API token correctly. If you need any assistance, don’t hesitate to contact our support team.

Step 3: Exploring endpoint details and football documentation

As you explore our Football API endpoints, it’s essential to understand the additional information available to you. You’ll find comprehensive details about each endpoint in our API Documentation. Here you will find information, such as:

  • Available includes
  • The maximum number of nested includes allowed
  • Pagination details
  • Available filters

This information empowers you to customise your requests effectively and efficiently, ensuring you extract the data you need precisely.

By utilising our API Documentation, you’ll enhance your understanding of our endpoints and maximise the potential of our Football API.

Our support team is here to assist you if you’re unsure about any aspect or need further clarification. Don’t hesitate to reach out for guidance.

Step 4: Enhancing Requests with Filters: A Practical Example

Let’s delve into a practical example to illustrate the effectiveness of using filters in your requests. Consider the scenario where you’re utilising the ‘Fixture by ID’ endpoint with the ‘events’ include, which retrieves all available events associated with a fixture. However, your focus is specifically on goals.

Here’s how you can refine your query using filters:

  1. Identify the endpoint: Begin with the ‘Fixture by ID’ endpoint, which allows you to retrieve detailed information about a specific fixture.
  2. Include relevant data: By adding the ‘events’ include, you ensure that all events related to the fixture are included in the response.
  3. Apply filters: To narrow the events to only goals, utilise the ‘filters’ parameter. Specifically, use the filter ‘eventTypes:14′, where ’14’ represents the event type id for goals.*
  4. Execute the request: With your filters in place, execute the request.

Following these steps and adding the ‘&filters=eventTypes:14′ parameter to your request, you instruct the Football API to only return events of type’ goals’. This focused approach lets you retrieve the specific data you’re interested in, optimise your workflow, and enhance your overall experience with our API.

*You can find all the events with their unique id on our documentation page

Step 5: Explore example responses

By default, our Postman Collection also provides some convenient example responses. This lets you see our API’s structure immediately and accelerate your development process. Click on the examples tab located under the endpoint details.

Step 6: Streamlining your workflow: save frequently used requests

It can be handy to save the request or response instead of continuously re-opening Postman and making new requests. That’s why you can save your request and download your response! Click on the save button in the top right corner or download the response via the download button. 

  • Identify important requests: Once you’ve made a request you anticipate using frequently, saving it for future use is time. You can do that by clicking the ‘save’ button.
  • Download the response: To avoid the hassle of continuously re-opening Postman and making new requests, save the response. You can do this by clicking on the ‘download’ button in the interface’s top-right corner.

This simple yet effective approach enhances your productivity and simplifies your development process.

Compliant with all code libraries: Generate code output effortlessly

Using a different code language? Great news for developers! You can seamlessly translate your API requests into various coding languages. Click the ‘code’ button in the top-right corner below the ‘save’ option. Explore the array of coding possibilities at your fingertips. 

Enjoy using our Football API with Postman

Congratulations on completing your journey through our comprehensive guide on using the Sportmonks Football API with Postman! We hope this step-by-step walkthrough has equipped you with the knowledge and tools to integrate football data into your projects seamlessly. 

Whether you’re a seasoned developer or just starting, our user-friendly interface and extensive documentation are here to support you every step of the way.

Thank you for choosing Sportmonks for your football data needs. We’re excited to see the fantastic projects you’ll create with our API. Happy coding!

 

FAQ

What is Postman, and how can I use it with Sportmonks Football API?
Postman is a popular API development environment that allows you to test, document, and interact with APIs more efficiently. You can use Postman to send HTTP requests to SportMonks Football API endpoints, view responses, and streamline API testing and development processes. This "How to use Sportmonks' Football API" provides a step-by-step guide on how to set up Postman and make requests to the Football API.
Do I need to sign up for an account to use Sportmonks Football API with Postman?
While signing up for an account on the MySportmonks platform is required to obtain API keys for accessing certain endpoints and features, you can still use Postman to test and interact with the API without signing up. However, you'll need to sign up for an account and obtain API keys to access restricted endpoints or features.
Where can I find all the available endpoints?
You can find all our endpoints with explanations on our well-described documentation pages. Please note that we also have a helpful Postman collection.
Can I save and share API requests in Postman for future use?
Yes, you can save API requests in Postman collections for future use and easily share them with team members or collaborators. Postman allows you to organize your requests into collections, add descriptions and documentation, and export collections as JSON files for sharing or version control purposes.
Can I access all Sportmonks Football API endpoints using Postman?
Yes, you can access all Football API endpoints using Postman. The API provides a wide range of endpoints for accessing football-related data, including match fixtures, live scores, player statistics, team information, and more. You can use Postman to explore and interact with these endpoints to retrieve the data you need for your applications or projects. Visit our Postman Collection.
Are there any limitations or restrictions when using Sportmonks Football API with Postman?
Sportmonks Football API does not impose any specific limitations or restrictions on using Postman with the API. However, you should be mindful of your API usage limits based on your subscription plan. Additionally, ensure that you handle sensitive information such as API keys securely within Postman to prevent unauthorized access or misuse.

Written by Wesley Van Rooij

Wesley van Rooij is a marketing and football expert with over 5 years of industry experience. His comprehensive knowledge of the Sportmonks Football API and a focused approach to APIs in the Sports Data industry allow him to offer insights and support to enthusiasts and businesses. His outstanding marketing and communication skills and technical writing expertise enable him to empathise with developers. He understands their needs and challenges to facilitate the development of cutting-edge football applications that stand out in the market.

Interested in more how-to guides? Explore all of our how-to guides and build your dream application.

How-to guides