How to Scrape FIFA World Cup Stats

Whether you’re a soccer fan or not, you have probably watched the World Cup; it’s been around since the 1930s! Almost a billion viewers join together every four years to cheer for their favourite FIFA World Cup teams, which is 1/9th of the whole world’s population. This makes the World Cup the most popular sports tournament in the world!

There is a lot of data available to scrape, before, during and after the tournament itself. We will be scraping Qatar 2022 pre-tournament stats, but this guide can be used for any sport, season or tournament.

We will be scraping the stats from FOX Sports, using ParseHub, our free web scraper.

Let’s begin!

Scraping Countries

  1. Begin by opening ParseHub and logging in.
  2. Click the “New Project” button to create a new project.
  3. Enter the sports stat website you wish to scrape from, we will be scraping FIFA stats from FOX Sports using this URL: https://www.foxsports.com/soccer/fifa-world-cup-men/team-stats
  4. Click the first team/country to extract it.
  5. The rest of the teams should now turn yellow, click the next team on the list.
  6. All teams should now be extracted, rename this selection on the left to “team”.

Scraping Statistics

Now that we have extracted all the teams, we can extract additional data for each row, using ParseHub’s Relative Select tool.

  1. Begin by clicking the PLUS(+) button next to your “team” selection and click “Relative Select”.
  2. Click the first country/team, and drag the arrow above the GP (games played) entry.
  3. Press CTR/CMD+2 on your keyboard to zoom in, until you see the text node.
  4. Now click the entry to extract it.
  5. Repeat step 2 to 4 for the second team.
  6. All GP stats should now be extracted, rename this extraction on the left to “GP”
  7. You can redo these steps for other stats such as GF (Goals For), which is the total number of goals a team has. This is a great statistic when finding top-performing teams.

Start Scraping

You should now have extracted every team, including their respective statistics!

To begin scraping, click the green “Get Data” button on the left, or under the settings drop-down.

You can choose to Test, Run or Schedule your scrape. In our case, we chose Run to execute the scrape a single time! Our data results looked like this:

We hope you enjoyed this web scraping guide. We have other blog posts on scraping other sports, such as the NBA. If you run into issues scraping sports data, feel free to contact our live chat support.

Happy Scraping! ⚽