惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
I
InfoQ
The Register - Security
The Register - Security
L
LangChain Blog
H
Help Net Security
The GitHub Blog
The GitHub Blog
S
Schneier on Security
博客园 - 【当耐特】
W
WeLiveSecurity
Attack and Defense Labs
Attack and Defense Labs
IT之家
IT之家
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Google DeepMind News
Google DeepMind News
The Cloudflare Blog
H
Heimdal Security Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Y
Y Combinator Blog
雷峰网
雷峰网
N
Netflix TechBlog - Medium
Security Archives - TechRepublic
Security Archives - TechRepublic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
L
Lohrmann on Cybersecurity
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
The Exploit Database - CXSecurity.com
P
Privacy & Cybersecurity Law Blog
G
GRAHAM CLULEY
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
V
Visual Studio Blog
博客园 - 聂微东
PCI Perspectives
PCI Perspectives
Last Week in AI
Last Week in AI
A
Arctic Wolf
宝玉的分享
宝玉的分享
T
The Blog of Author Tim Ferriss
S
Secure Thoughts
T
Threat Research - Cisco Blogs
GbyAI
GbyAI
云风的 BLOG
云风的 BLOG
D
Darknet – Hacking Tools, Hacker News & Cyber Security
S
SegmentFault 最新的问题
SecWiki News
SecWiki News
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏
Schneier on Security
Schneier on Security
P
Proofpoint News Feed
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
AI
AI
Engineering at Meta
Engineering at Meta

SerpApi

Decoding Protobuf Messages Without Access to the Schema Introducing SerpTrail: A self-hosted SEO and GEO rank tracker for your business Introducing SerpApi’s Hermes Agent Plugin Loop Engineering Visualized: A World Cup Fan Journey with SerpApi and Codex Google v. SerpApi: The Court Granted Our Motion to Dismiss SerpApi Weekly Changelog: July 13-19, 2026 The State of the SERP in the Age of AI How to find the Google Knowledge Graph ID (kgmid) for anything What is an API? Part 2: Feeding the Machine (JSON) Building an Accessibility Search Experience with Google Flights, Hotels, and Maps APIs SerpApi Weekly Changelog: July 06-12, 2026 How to Scrape Google Flights Deals with a simple API Monitoring FIFA World Cup 2026 scores with a simple API Build Smarter Pydantic AI Agents with Real-Time Search A complete guide to web scraping with Ruby (2026) SerpApi Weekly Changelog: June 29- July 05, 2026 Make no mistakes: agent usability testing Semantic Image Search with Elasticsearch What is an API? Part 1: The Secret Life of a Web Browser MCP Apps with FastMCP: Turning Tool Output Into Interactive UI How to Scrape Naver AI Briefings with SerpApi Connect Sakana AI (Fugu) with Web Search API SerpApi Weekly Changelog: June 22-28, 2026 Trending Travel Destinations using Python & SerpApi How to scrape Bing reverse image search results Measuring Brand Presence Across AI Answer Engines SerpApi Weekly Changelog: June 15-21, 2026 How I Built a Star Wars Grogu Product Research Agent with Codex, Lark, and SerpApi How to scrape Bing web search results Categorizing hotels using Google Hotels images How to scrape Bing Images search results How to scrape Bing Copilot answers Build A No Code AI-Powered Local Lead Outreach System SerpApi Weekly Changelog: June 08-14, 2026 How to Do SEO Research with Claude Desktop and SerpApi MCP Track and Compare Product Prices Across Stores and Locations (SerpApi & Python) How to Extract Full Opinion Text from Google Scholar Case Law with SerpApi How to scrape Bing Maps search results SerpApi Weekly Changelog: June 01-07, 2026 Amazon ASIN Lookup API: Find and Fetch Product Details The State of MCP: Everything That Changed in H1 2026 How to scrape Bing News search results How to Connect Your Local LLM with Web Search Data SerpApi on Postman: One Unified Collection for Faster API Exploration SerpApi Weekly Changelog: May 25-31, 2026 Building an AI Agent in Python How to scrape Google Case Law API for Legal Research, Analytics, AI, and more SerpApi Achieves SOC 2 Type 2 and ISO 27001 Certification How to find your next product idea with Google Trends and SerpApi Scrape Competitors' Google Ads Data (Tutorial 2026) Using SerpApi and DeepSeek to Break Down Dan Koe’s Content Strategy SerpApi Weekly Changelog: May 18-24, 2026 How to scrape Bing Videos search results How to Scrape Instagram Profile Data with SerpApi How to scrape Bing Shopping search results How to Scrape Google Hotels Reviews SerpApi Weekly Changelog: May 11-17, 2026 5 Things You Can Build with Claude Code and Live Search Data Real Estate Data API for PropTech Developers How to Scrape Apple Maps with SerpApi How to scrape Google Trends
How to scrape Google sports results
Corbin Davenport · 2026-07-09 · via SerpApi

Google Search can provide detailed information about past sports matches, ongoing games, teams, players, scheduled events, leagues, and tournaments. For individual games, that information can include the score, team rosters, statistics like passes and possession, location, and other facts. Google also provides the same data through its Gemini chatbot and Google Assistant.

The Google Sports Results API from SerpApi provides all that data in simple JSON format, ready for any programming language or automation. SerpApi handles the web scraping, HTML parsing, proxy network, captcha puzzles, and other challenges for you.

What can you scrape from Google sports results?

Here's some of the data you can extract for individual sports matches on Google, using SerpApi:

  • Title: The game's main title, like "Super Bowl LX" or "Mexico vs England."
  • League: The league or tournament for the game, such as "NFL" or "FIFA World Cup 2026."
  • Stage: The stage of the game's tournament, like "Round of 16" or "Super Bowl."
  • Score: The game's score, if it has started.
  • Timeline: A feed of commentary and other events from the game, with timestamps.
  • Date: The time and date of the game.
  • Status: The current status of the game, like "Live" for an ongoing event, or "Final" or "Full-time" for a completed match.
  • Teams: Information about the teams, which can include their team names, goals, penalties, and lists of players.
  • Location: The physical location of the game, such as "Mexico City Stadium."
  • Highlights: Videos from the game, with each result containing a title, video URL, thumbnail image URL, and time duration.
A screenshot of a New Zealand vs. Belgium football match in Google, next to the JSON version.
SerpApi fetches and parses sports match results as structured JSON.

You can also pull information for sports tournaments or leagues using SerpApi, which can include this data:

  • Title: The title of the tournament or league, such as "FIFA World Cup 2026."
  • Games: A list of games in the tournament or league, with each game containing the teams, score, start and end time, stadium, highlights, and other information.
  • Highlighted game: The current recommended game from Google, like an ongoing match or the next game, with information about the teams and location.
  • Groups: The groups or rounds of the tournament, like "Quarter-finals" or "Round of 16."
  • Standings: The team's standings in any available leagues or tournaments.
  • Players: A list of players in the team, with full names, positions/roles, a link to their page on Google, and thumbnail images. The kgmid knowledge graph ID is also available for each player, to fetch additional information about them.
Screenshot of group stages in the World Cup, next to the JSON data.
The structured JSON for a sports tournament.

Google can provide results for a sports team, which SerpApi also extracts:

  • Title: The name of the team, like "Canada men's national soccer team."
  • Thumbnail: The thumbnail image for the team, such as the nation's flag.
  • Games: A list of the team's recent games, with each one including a score, teams, tournament, and other information.
  • Standings: The team's current standings in an ongoing or recent tournament.
Google search results for the Canada men's national soccer team, next to the JSON results.
The structured JSON for a sports team.

The documentation for the Google Sports Results API contains more examples of search results with their structured JSON.

Getting started with SerpApi

Before getting started with the Google Sports Results API, you need a free SerpApi account. That also includes access to other engines, like the Google Search API, DuckDuckGo Search API, and Yahoo Search API. You can upgrade to a paid account later if you need more search capacity, faster speeds, or other features.

First, you need to create an account and verify your email and other details. After that, get the API key from your account dashboard.

Make sure to store your API key in a safe location if you are sharing or publishing your code. If the key is leaked or stolen, you can make a new one from the SerpApi account dashboard.

Install the SerpApi library (optional)

You can use SerpApi's official libraries for Python, JavaScript, Ruby, Java, and other languages. They provide a simple wrapper around the API requests.

However, the libraries are not required. You can still make API calls with cURL, fetch() in Node.js, or anything else that can send GET requests and process a JSON response.

Review the Google Sports Results API documentation

All the APIs at SerpApi have extensive documentation that covers all the supported parameters and filters, code examples for popular languages, and example JSON responses. This post covers some of the basic usage for parsing Google sports results, and you can find everything else at the documentation page.

Google Sports Results API - SerpApi

Scrape real time sports game results with SerpApi’s Google Sports Results API. Team names, scores, tournaments, dates and more in real time.

SerpApiSerpApi

Some sports data can be accessed through requests to the Google Search API, using the q parameter for your query (like "super bowl lx" or "mexico football team"). Some details, like the tournament or stadium, will include an additional ID that you can search with the Google Sports API for additional information.

How to scrape Google sports results

If you have your API key, you're ready to start pulling data from Google sports results. The results will be identical across all libraries and GET requests, so use whichever method you want.

GET request

This performs a Google search for "Canada men's football team" from the US with a simple GET request, which includes a sports_results object in the JSON response:

https://serpapi.com/search.json?engine=google&q=canada+men%27s+football+team&gl=us&hl=en&api_key=YOUR_KEY_GOES_HERE

That sports_results object contains a kgmid key for one of the games, with a value of /g/11yfm8t8yy. You can use search that with the Google Sports API to get full details for the game:

https://serpapi.com/search.json?engine=google_sports&gl=us&hl=en&kgmid=%2Fg%2F11yfm8t8yy&sp=ft&type=game&api_key=YOUR_KEY_GOES_HERE

That API request can be created manually, with the kgmid parameter set to the provided value, type set to game, and sp set to ft for football. You can also use the pre-made request provided in the google_sports_serpapi_link key.

You can also use SerpApi's JSON Restrictor feature to trim the API response to specific values. This is the same search, but only returning sports data, excluding the organic search results and other information from Google:

https://serpapi.com/search.json?engine=google&q=canada+men%27s+football+team&gl=us&json_restrictor=sports_results&api_key=YOUR_KEY_GOES_HERE

This can be useful if you need more efficient parsing, like when using an LLM with a limited context window.

Python

This uses the official SerpApi Python library to search for the Mexican men's football team, and if a recent game is listed, the full lineup is displayed for both teams in the game:

import serpapi
client = serpapi.Client(api_key=YOUR_KEY_GOES_HERE)

# Start initial search

firstResponse = client.search({
  "engine": "google",
  "q": "mexico men's football team",
  "gl": "us",
  "hl": "en"
})
firstGame = firstResponse.get("sports_results", {}).get("games", [None])[0]
if firstGame:
  print(f"Found game at {firstGame['venue']} on {firstGame['date']}")

# Get more details if an ID is present

if "kgmid" in firstGame:
  secondResponse = client.search({
    "engine": "google_sports",
    "kgmid": firstGame["kgmid"],
    "gl": "us",
    "hl": "en",
    "type": "game",
    "sp": "ft" # ft for Football
  })
  if secondResponse.get("game_results", {}).get("lineups", [None]):
    for team in secondResponse["game_results"]["lineups"]["teams"]:
      print(f"\nTeam #{team["team_index"] + 1}:")
      for player in team["starters"]:
        print(f"{player["name"]} ({player["jersey_number"]})")

Ruby

This searches for a baseball game on Google and retrieves the game's ID, then performs another search with that ID, using the SerpApi Ruby gem. Finally, the data for all innings from the second search is displayed:

require "serpapi"

# Start initial search
first_req = SerpApi::Client.new(
  engine: "google",
  q: "blue jays mariners game",
  gl: "us",
  hl: "en",
  api_key: YOUR_KEY_GOES_HERE
)

# Find the game ID and search it for more information
game_id = first_req.search.dig(:sports_results, :game_spotlight, :kgmid)
if game_id
  second_req = SerpApi::Client.new(
    engine: "google_sports",
    hl: "en",
    kgmid: game_id,
    sp: "bb",
    type: "game",
    api_key: YOUR_KEY_GOES_HERE
  )
  # Get the list of teams
  game_teams = second_req.search.dig(:game_results, :info, :teams)
  # Display the innings for each team
  for team in game_teams do
    puts "\n#{team[:name]} - Total score: #{team[:score]}\n====="
    for inning in team.dig(:linescore) do
      puts "#{inning[:title]}: #{inning[:score]}"
    end
  end
end

JavaScript and Node.js

Here's how you can use the SerpApi JavaScript library to search for a football team, and if there is a recent (or ongoing) game, use that game's ID to show all statistics:

import { getJson } from 'serpapi';

// Start initial search and get game ID
const firstSearch = await getJson({
  engine: "google",
  q: "US women's football team",
  gl: "us",
  hl: "en",
  api_key: YOUR_KEY_GOES_HERE
});
const gameID = firstSearch?.sports_results?.games?.[0]?.kgmid;

// Start second search to get more details
if (gameID) {
  const secondSearch = await getJson({
    engine: "google_sports",
    kgmid: gameID,
    gl: "us",
    hl: "en",
    sp: "ft", // Football
    type: "game",
    api_key: YOUR_KEY_GOES_HERE
  });
  const teams = secondSearch?.game_results?.info?.teams;
  for (const i in teams) {
    console.log(`\n${teams[i].name} - Score ${teams[i].score}\n=====`);
    // Print all available stats for each team
    const stats = secondSearch?.game_results?.team_stats?.teams?.[i]?.stats;
    for (const a in stats) {
      console.log(`${stats[a].title} - ${stats[a].value}`);
    }
  }
}

cURL

Here's how you can retrieve details about a football game, like per-team statistics and highlights, using a cURL request:

curl --get https://serpapi.com/search \
 -d api_key="YOUR_KEY_GOES_HERE" \
 -d engine="google_sports" \
 -d hl="en" \
 -d kgmid="/g/11n3xxgprk" \
 -d sp="ft" \
 -d type="game"

Other languages and no-code solutions

You can still use the API directly with GET requests, even if there isn't an official SerpApi integration for your preferred environment or language. SerpApi also works with Make.com, N8N, and other tools.

Conclusion

Google Search has access to a wide range of past and live sports data, across football, cricket, ice hockey, American football, and other sports. With the Google Search API and Google Sports Results API from SerpApi, you can pull all those results into any automation or programming language.

If you need help using SerpApi, please contact us.