Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 2.05 KB

File metadata and controls

37 lines (26 loc) · 2.05 KB

API-Football Setup Guide

To fetch live match data, lineups, and fixtures for the Football Market Intelligence engine, you must configure a key for API-Football. Follow these step-by-step instructions to obtain your API key and configure it in your local environment.

Warning

By default (on the free tier), you can only fetch match data from the exact day the API call is made. To access historical match data or fetch games from previous days, you will need to opt into a premium plan.

Step 1: Navigate to the Website

Go to the official API-Football website: https://www.api-football.com/

Step 2: Sign In

Click the Sign In button, which is usually located in the top right corner of the homepage. This will redirect you to the login dashboard: https://dashboard.api-football.com/login/

Step 3: Access Your Dashboard

Once you have successfully signed in, you will be on your main dashboard page. Look at the sidebar on the left side of your screen.

Step 4: Go to My Access

  1. In the sidebar, locate and click on the Accounts icon (this is usually the 4th icon from the top).
  2. The sidebar will expand to reveal more options.
  3. Click on My Access.

Step 5: Copy Your API Key

On the "My Access" page, look towards the top right corner. You will see your unique API Key displayed there. Copy this key to your clipboard.

Step 6: Configure Your Environment Variable

Now that you have your API key, you need to add it to your backend configuration.

  1. Navigate to the backend directory of this project.
  2. If you haven't already, create a file named .env by copying the .env.example file.
  3. Open the backend/.env file in your editor.
  4. Paste your copied key into the API_FOOTBALL_KEY variable so it looks like this:
API_FOOTBALL_KEY="<paste_your_copied_api_key_here>"

Once this is saved, your live data ingestion scripts (like poll_api_football.py and fetch_wc_data.py) will automatically authenticate and begin polling World Cup data.