Back to API-Sports in Google Sheets
SheetXAI logo
API-Sports logo
API-Sports · Google Sheets Guide

Build a Top Scorers and Assists Table From API-Sports in Google Sheets

2026-05-13
4 min read
See the Excel version →

The Scenario

You are a football data journalist. Your season-review piece on La Liga 2023/24 is due in four days. You need the top 20 scorers and the top 20 assist-makers from that season merged into one comparison table — player name, team, goals, and assists for both lists — so you can write about players who dominated on both metrics.

The bad version:

  • You go to API-Sports, find the top scorers endpoint, call it with league ID 140 and season 2023
  • The response comes back with 20 player objects, each with nested statistics arrays
  • You copy the fields you need into a scratch sheet
  • You repeat the process for the assist endpoint, different response structure, different nesting
  • You build a VLOOKUP to find players in both lists
  • You discover three player names are formatted differently across the two endpoints ("Lewandowski, R." vs "Robert Lewandowski") and your VLOOKUP misses them
  • You spend two hours on data wrangling before you have written a word.

The clean version is one prompt.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent inside your spreadsheet that calls API-Sports, merges the responses, and handles the name-normalisation so you do not have to.

Open the SheetXAI sidebar and type:

Get the top 20 scorers for La Liga season 2023 — player name, team, goals, assists — and put them in Sheet1 starting at A1. Then fetch the top 20 assist-makers for La Liga season 2023 and add them alongside in columns E through H. Highlight any player who appears in both lists.

SheetXAI fetches both endpoints, normalises player names across the two responses, writes the lists side by side, and applies conditional formatting to the players who appear in both. The merged table is ready to write from.

What You Get

A single structured sheet:

  • Columns A–D — top 20 scorers: player name, team, goals, assists
  • Columns E–H — top 20 assist-makers: player name, team, assists, goals
  • Highlighted rows — any player appearing in both lists

The name normalisation happens automatically, so "R. Lewandowski" and "Robert Lewandowski" resolve to the same player before the highlight logic runs. You do not have to build fuzzy-match formulas.

What If the Data Is Not Quite Ready

Most season-review tables need more than two lists side by side. SheetXAI can do the enrichment inline.

When you want a combined ranking column

Both lists are in the sheet but your editor wants a combined contribution score — goals plus assists — to rank all players who appear in either list.

For each player in this sheet, calculate a combined G+A score using the goals column (column C) and assists column (column D for scorers, column G for assist-makers). Deduplicate players who appear in both lists by taking the higher value for each metric. Write the combined G+A score into column I and sort descending.

When the team names use abbreviations

API-Sports sometimes returns abbreviated club names. Your piece uses full names and your editor will notice the inconsistency.

Expand any abbreviated team names in columns B and F to full La Liga club names. For example, 'Barça' should become 'FC Barcelona', 'Atleti' should become 'Atlético de Madrid'. Write the corrected names in place.

When you only want players who scored and assisted in double digits

You want a filtered view for a callout box: players with 10 or more goals and 10 or more assists in the same season.

Filter the player table to show only players with 10 or more goals and 10 or more assists. Write those players into a new tab called 'Elite Contributors' with their full stats.

When you need this for three leagues, not one

Your piece covers La Liga, Serie A, and Ligue 1. You want the same merged scorers-and-assists table for all three, each on its own tab.

Pull the top 20 scorers and top 20 assist-makers for La Liga season 2023 (league ID 140), Serie A season 2023 (league ID 135), and Ligue 1 season 2023 (league ID 61). Write each league's merged table to its own tab named after the league. Highlight cross-list players in each tab.

The pattern: instead of pulling three league data sets separately and building three VLOOKUP tables, you describe the full output and SheetXAI runs the three API calls and the merge logic in one go.

Try It

Get the 7-day free trial of SheetXAI and ask it to pull top scorers and assist-makers from any league season into your sheet. The API-Sports integration is included in every SheetXAI plan. For related workflows, see how to build a team season stats comparison table or the API-Sports in Google Sheets overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more