Compare Global News Results Across Countries with Python
Ever wonder how the same headline reads in United States versus Brazil or India or any other countries or locations? Comparing how the same story is covered across different regions can uncover powerful insights, biases, framing differences, or localized priorities. Understanding how narratives shift across locales is key for media analysis and research.
Do you find yourself collecting and comparing news results across sources or tracking how different outlets cover the same story? With SerpApi, you can automate news data retrieval and pair it with analytical tools, or even use Ahrefs to identify trending keywords worth tracking.
At SerpApi you can query any of our APIs specifying any parameters you need. We scrape results from many search engines and provide you with clean, structured, readable JSON results. If you're not familiar with JSON it is data structured in key value pairs where you can easily reference a field (key) and it will give you the data in the value.
As you can imagine, having this information readily available can cut down your data collection time significantly. You can filter the results for specific websites you want to reference, access all of the links at a glance, navigate through all of the titles at a glance, and much more.
Use Case
When you want to understand how the same event is being reported around the world, the biggest challenge isn’t finding coverage, it’s collecting data efficiently. Manually compiling different news sites country by country takes hours and often misses related articles. With SerpApi’s Google News API, you can instantly pull articles on the same topic from multiple countries and languages, then analyze how coverage differs. In this post, we’ll explore how to compare global news narratives using SerpApi, and what those differences reveal about media, culture, and perspective.
Here's a side by side of a search for "pizza". You can see the results you would see in the browser on the left hand side, as well as the results in our JSON format on the right hand side:
Looking at these results you have all of the information you need all in one place, with data ready for any project you may have.
How to use SerpApi's Google News API
At SerpApi we offer libraries in many different languages, you can use a GET, or use one of our no code options (Sheets, Make, N8N...). In this example we will be using SerpApi's Python library to complete our request.
from serpapi import GoogleSearch
params = {
"api_key": "YOUR_SECRET_API_KEY",
"engine": "google_news",
"q": "climate change"
}
results = GoogleSearch(params).get_dict()
Let's break down the parameters:
api_key
: your secret API key, you can find it here: https://serpapi.com/manage-api-key.engine
: Which engine you'll use for the API, in this case the engine is google_newsq
: your query
These are the parameters we are going to use across every search with the same exact values.
Do you prefer a No Code option? Review our Bubble.io blog post:
We also offer parameters such as the topic_token
, publication_token
, and section_token
to use instead of the q
parameter, as well as many others. Review the full documentation here: https://serpapi.com/google-news-api. Now in this scenario however we are using the q
parameter.
Want to learn about other filters SerpApi offers for the Google News API? Review this blog post:
Now we should have the skills we need compare our news results. Let's take a look at using what we've learned along with looking in different countries.
Use the Google News API for Different Countries
Now let's take a look at how we will compare the results from different countries. We are going to need to set the gl
parameter to the country code to where you would like to search.
Refer to the list of country codes for Google here: https://serpapi.com/google-countries. We will swap out the gl
parameter for the next 3 searches for the specific countries and their applicable country codes.
You can see the country code for each example in parenthesis () next to the country name. In this first example we will look at the United States, you can see the country code is "us".
United States (us)
from serpapi import GoogleSearch
params = {
"api_key": "YOUR_SECRET_API_KEY",
"engine": "google_news",
"q": "climate change",
"gl": "us"
}
results = GoogleSearch(params).get_dict()
India (in)
from serpapi import GoogleSearch
params = {
"api_key": "YOUR_SECRET_API_KEY",
"engine": "google_news",
"q": "climate change",
"gl": "in"
}
results = GoogleSearch(params).get_dict()
Brazil (br)
from serpapi import GoogleSearch
params = {
"api_key": "YOUR_SECRET_API_KEY",
"engine": "google_news",
"q": "climate change",
"gl": "br"
}
results = GoogleSearch(params).get_dict()
You'll notice in all 3 examples, the parameters all stay the same except the gl
parameter. The gl
parameter in each was set to the appropriate country code to receive location specific results.
You can also iterate through a list of locations instead of calling each individually:
from serpapi import GoogleSearch
countries = ["us", "in", "br"]
for i in range(len(countries)):
params = {
"api_key": "YOUR_SECRET_API_KEY",
"engine": "google_news",
"q": "climate change",
"gl": countries[i]
}
results = GoogleSearch(params).get_dict()
There are many ways to utilize our APIs with different parameters, the key piece in this instance is to update the gl
parameter. Now let's look at our results.
How Results Differ
Now let's review how these results differed. We'll first start with the HTML view where you can see side by side what these results look like. You can see the articles posted vary greatly between countries. Changes between news results is constant and vast. You can see the level of variance for 1 search let alone compiling masses of data.
While you can easily see the difference, the challenge comes in collecting, structuring, and comparing data across regions and time. SerpApi enables you to systematically gather results from multiple locales in a consistent, machine-readable format, so you can feed that data into analytical tools, identify trends, measure sentiment, or track topic frequency over time. Instead of visually browsing, you can quantify and visualize differences, transforming what would be a manual comparison into a repeatable, data-driven process.
There are many results included in each search, now let's compare the first one from each country to see how the data is collected and structured.
United States
"position": 1,
"title": "Pope Leo hits out at critics of global warming",
"source": {
"name": "BBC",
"icon": "https://encrypted-tbn2.gstatic.com/faviconV2?url=https://www.bbc.com&client=NEWS_360&size=96&type=FAVICON&fallback_opts=TYPE,SIZE,URL",
"authors": [
"Matt McGrath"
]
},
"link": "https://www.bbc.com/news/articles/cgl1pgr2zn8o",
"thumbnail": "https://ichef.bbci.co.uk/news/1024/branded_news/db01/live/edb94e60-9ee1-11f0-98b1-59d49dad95e6.jpg",
"thumbnail_small": "https://news.google.com/api/attachments/CC8iK0NnNUlVMVF4Y1VRMllVTkpkbVp1VFJDZkF4ampCU2dLTWdheFZKU1BxUWM",
"date": "10/01/2025, 04:58 PM, +0000 UTC"
India
"position": 1,
"title": "Care about climate change? The evidence shows these are the most impactful actions you can take",
"source": {
"name": "BBC",
"icon": "https://encrypted-tbn2.gstatic.com/faviconV2?url=https://www.bbc.com&client=NEWS_360&size=96&type=FAVICON&fallback_opts=TYPE,SIZE,URL",
"authors": [
"Jocelyn Timperley"
]
},
"link": "https://www.bbc.com/future/article/20250930-beyond-carbon-footprints-the-science-of-the-most-impactful-climate-actions",
"thumbnail": "https://ichef.bbci.co.uk/images/ic/480xn/p0m5vxvg.jpg.webp",
"thumbnail_small": "https://news.google.com/api/attachments/CC8iK0NnNTJRVFl4TnpnNGFYZzFPRUZZVFJDT0FoamdBeWdLTWdhcE1wQ1BuUWc",
"date": "10/01/2025, 10:00 AM, +0000 UTC"
},
Brazil
"position": 1,
"title": "S\u00e3o Paulo Climate and Environment Secretaries Say They Still Don't Have Lodging for COP30",
"source": {
"name": "Folha de S.Paulo",
"icon": "https://encrypted-tbn2.gstatic.com/faviconV2?url=https://www1.folha.uol.com.br&client=NEWS_360&size=96&type=FAVICON&fallback_opts=TYPE,SIZE,URL"
},
"link": "https://www1.folha.uol.com.br/internacional/en/scienceandhealth/2025/09/sao-paulo-climate-and-environment-secretaries-say-they-still-dont-have-lodging-for-cop30.shtml",
"thumbnail": "https://f.i.uol.com.br/fotografia/2025/08/26/175624954868ae3dcc80140_1756249548_3x2_md.jpg",
"thumbnail_small": "https://news.google.com/api/attachments/CC8iK0NnNUVaR0YxU1dsbVJrcENRMmhKVFJERUF4aW1CU2dLTWdZQmNJYU13UVE",
"date": "09/30/2025, 09:25 PM, +0000 UTC"
Each result has a completely different article with different sources. The topic, language, and all other parameters stayed the exact same other than the gl
parameter. In order to track these major differences, changes, and updates and collect all the data consistently and efficiently, you will need an automation tool. This example shows how quickly and easily we can collect accurate data from Google News.
Compare and Use these Results
Once you retrieve news results from SerpApi, you can use a range of analytical tools to uncover deeper insights. For data exploration and visualization, libraries like Pandas, NumPy, and Plotly help structure, analyze, and display patterns across sources or regions.
To understand tone and framing, NLP tools such as spaCy, TextBlob, or Hugging Face Transformers can analyze sentiment, topics, or named entities within headlines and summaries.
For keyword and SEO-focused insights, platforms like Ahrefs, SEMrush, and Google Trends allow you to identify trending terms and see how media coverage aligns with search behavior.
Finally, for comparing content across outlets or locales, analytical methods like TF-IDF, cosine similarity, or topic modeling (LDA, BERTopic) can quantify how coverage differs by region or publication.
Together, these tools transform SerpApi’s structured search data into actionable, comparative insights.
Collect and Compare Word Usage in Python
In this scenario let's imagine we need to monitor how different countries report on a specific event, in this case climate change. We want to compare the different words used in different headlines across different countries and how often they occur. We can identify:
- Which aspects / keywords of the event are universally covered.
- Recognize how different regions emphasize or omit certain details.
- Evaluate whether certain countries present a particular narrative or perspective.
To find the keyword count you don't require any additional libraries other than SerpApi's we discussed above.
In this example, to export the results into a grid whether printed, to excel, a CSV (what we are doing below), you will need to install pandas.
pandas Installation:
pip install pandas
Now let's take a look at a Python script that compiles results for given countries and the words used in each title. The only difference in parameters in this example is the gl
parameter to set the language to English for word comparison.
The program then compiles the unique words and how often throughout each region. In this example the script is based off of the first 5 results for each country, however you can expand to all of the results for your searching.
from serpapi import GoogleSearch
import re
import pandas as pd
# Assign list of countries and topic
countries = ["us", "in", "br"]
TOPIC = "climate change"
# Dictionary to store full news results
news_data = {}
# Dictionary to store term frequency
frequency = {}
# Unique set, only used for the table
all_words = set()
# Iterate through the countries to collect results for each and
# structure them in a word array.
for country in countries:
params = {
"api_key": "YOUR_SECRET_API_KEY",
"engine": "google_news",
"q": TOPIC,
"gl": country,
"hl": "en"
}
articles = GoogleSearch(params).get_dict()["news_results"]
# Store top 5 article titles per country
news_data[country] = []
for a in articles[:5]:
# Get the title and split it into an array of words
# Lowercase for consistent comparison
words = re.sub(r'[^a-zA-Z0-9 ]', '', a["title"]).lower().split()
# Iterate through the array for this title to add all the words
# to the country array as well as the set
for word in words:
news_data[country].append(word)
all_words.add(word)
word_count = {}
# Iterate through each word to count the total
for word in news_data[country]:
if word not in word_count:
word_count[word] = 1
else:
cur_value = word_count[word]
word_count[word] = cur_value + 1
frequency[country] = word_count
# Build a dictionary for the DataFrame
table_data = {'word': sorted(all_words)} # first column is the words
# Add counts for each country
for country in countries:
table_data[country] = []
for word in table_data['word']:
# Get the count of the word in this country, default to 0
count = frequency[country].get(word, 0)
# Append the count to the list
table_data[country].append(count)
# Create DataFrame
df = pd.DataFrame(table_data)
# Sort by total occurrences across all countries
df['total'] = df[countries].sum(axis=1)
df = df.sort_values(by='total', ascending=False).drop(columns='total')
# Print the comparison table
print(df)
# Export the comparison table
df.to_csv("news_comparison.csv", index=False)
Using this program you can easily pull full results for each country then track how much each region uses each keyword.
Here are the CSV results opened in Google Sheets for readability:
You may begin to see certain trends regarding word usage across different areas, how different regions are narrating different events.
This is just 1 example of to use this information, however there are countless ways to utilize the full Google News Data.
Conclusion
Collecting news results in a usable data format including links, titles, source information, thumbnail, and much more has never been easier than when using SerpApi. You can easily compare results across countries, different topics, locations, etc.
Whether you're analyzing current events, building media research tools, or developing data driven applications, our API streamlines and automates the news data collection process.
You can review the full documentation and available parameters here: https://serpapi.com/google-news-api.
We also offer a Google News Light API for faster speeds while maintaining collection of critical data. Otherwise if you prefer news results within our Google Search API, look at our Google News Result API or our Google Local News API.
To compare results across different countries, in this scenario we utilized the gl
parameter which allows you to set the country code for your search. We received majorly different results from each country using the same parameters otherwise. Moving forward you can use many other filters such as hl
for language and our different filter options. Hope you enjoy using the Google News API, happy searching!