In today’s fast-paced market, spotting the next big product before it goes viral can be the difference between leading the trend or chasing it. With the explosion of e-commerce and online search activity, every new product leaves a digital footprint, from Google Shopping listings and reviews to news mentions. By leveraging tools like SerpApi, businesses and analysts can monitor these signals in real time, uncovering emerging products, detecting early spikes in interest, and predicting trends before they hit the mainstream. This proactive approach transforms raw search data into actionable insights, giving companies a competitive edge in product discovery and market strategy.
In this example we will be using the Google News, Google Shopping, and Amazon APIs to compare these results. However, SerpApi includes many more APIs that offer powerful insights for product trend predictions. Some shopping examples are The Home Depot Search API and the Walmart Search API. We also offer a Google Trends API and a Google Trends Trending Now API that scrape trending results directly from the Google Trends engine.
Starting with SerpApi
SerpApi provides real time search engine results in a structured JSON format. This means you can collect large amounts of data, over time, and use it to draw important conclusions.
If you're new to SerpApi, here's an introduction on how to get started.
- Sign up for a free account here: https://serpapi.com/users/sign_up
- Access your API key here: https://serpapi.com/manage-api-key
- SerpApi Library (Optional): https://serpapi.com/integrations
- In this example we will be using the Python library.
- No Code Integrations (Optional): Make.com, N8N, Google Sheets
- If you prefer an option with no coding, review one of the blogs above to get started with a no code option.
Now that you have your account all set up and ready to go, let's look at how to pull the necessary data.
Example: Collecting Product Data using SerpApi
In this example we're going to look at collecting results for trending tech products. We're going to compile results across Google Shopping API, Amazon Search API, and Google News API. This will provide us with data from major shopping platforms as well as a news source to see what people are searching for and talking about.
First let's start with pulling the data from each source using SerpApi. We will be breaking up each API's instructions for clarity.
Each API you will need to specify the SerpApi engine, this will differ depending what API you are using. You'll also need your search parameter, in these 3 examples it is q (Google) or k (Amazon). Lastly you will need your API key, refer to step 2 above, replace "YOUR_SECRET_API_KEY" with your actual API key.
Google Shopping API
from serpapi import GoogleSearch
params = {
"engine": "google_shopping",
"q": "tech",
"api_key": "YOUR_SECRET_API_KEY"
}
search = GoogleSearch(params)
results = search.get_dict()For getting started with the Google Shopping API, read more here:

Amazon Search API
from serpapi import GoogleSearch
params = {
"engine": "amazon",
"k": "tech",
"api_key": "YOUR_SECRET_API_KEY"
}
search = GoogleSearch(params)
results = search.get_dict()For getting started with the Amazon Search API, read more here:

Google News API
from serpapi import GoogleSearch
params = {
"engine": "google_news",
"q": "tech",
"api_key": "YOUR_SECRET_API_KEY"
}
search = GoogleSearch(params)
results = search.get_dict()For getting started with the Google News API, read more here:

JSON Results Structure
Each API has results in structured JSON. We're going to examine an example of 1 result for each API within various fields. There are many more fields than what I've included.
Google Shopping API
"inline_shopping_results": [
{
"position": 1,
"block_position": "",
"title": "",
"price": "",
....
},
...
],
"categorized_shopping_results": [
{
"title": "",
"shopping_results": [
{
"position": 1,
"title": "",
"product_link": "",
"product_id": "",
...
]
},
"shopping_results": [
{
"position": 1,
"title": "",
"product_link": "",
"product_id": "",
"source": "",
.....
},Amazon Search API
"product_ads": {
{
"position": 1,
"asin": "",
"sponsored": ,
"title": "",
.....
},
},
"organic_results": [
{
"position": 1,
"asin": "",
"sponsored": true,
"title": "",
"link": "",
.....
},
"related_searches": [
{
"position": 1,
"query": "",
"link": ""
},
}Google News API
{
"news_results": [
{
"position": 1,
"title": "",
"snippet": "",
"source": {
"title": "",
"name": "",
"icon": "",
"authors": [
"String - Name of the author"
]
},
]
}Narrow Down Results to the "title"
In this example, as we are only comparing titles, we are going to use the json_restrictor parameter. You can restrict your responses to the fields you need for smaller and faster results. You are welcome to receive the full results at no additional cost, and parse them from there if you prefer, however in this example we will be using the json_restrictor.
You can read more with examples here: https://serpapi.com/json-restrictor.
Depending on what you want included ads, organic results, etc you can decide what to include using the json_restrictor.
For example if we want only the title from the google_news field above, we will set our json_restrictor parameter like this: "json_restrictor": "news_results[].title".
You can review some of the field names in the examples above, otherwise review our documentation and examples in our Playground!
In this example we will be scraping the titles of the result and ad fields, following the naming conventions of each API's output.
Tracking using Python
Now let's combine what we learned. We'll be collecting results from each engine, storing the titles, and tracking the differences to find new products that weren't mentioned before. Our search parameter for each engine will for "tech" for the comparison.
from serpapi import GoogleSearch
import json
# Dictionary for each engine with the query parameter name and the json_restrictor
engines_info = {
"google_shopping": {
"query_param": "q",
"json_restrictor": "inline_shopping_results[].title, categorized_shopping_results[].title, shopping_results[].title"
},
"amazon": {
"query_param": "k",
"json_restrictor": "product_ads[].title, organic_results[].title"
},
"google_news": {
"query_param": "q",
"json_restrictor": "news_results[].title"
}
}
# Initialize to store all current titles
all_titles = []
# Iterate through each engine to query "tech" and receive results for each
for engine, info in engines_info.items():
# Set paramaters based on API
params = {
"engine": engine,
info["query_param"]: "tech",
"api_key": "YOUR_SECRET_API_KEY",
"json_restrictor": info["json_restrictor"]
}
# Receive results from the API using the parameters
results = GoogleSearch(params).get_dict()
# Add the titles alone to the all_titles list
for key, value in results.items():
for item in value:
all_titles.append(item["title"])
# Only necessary for the initial load of the file
# with open("prev_products.json", "w") as f:
# json.dump(all_titles, f, indent=2)
# Open previous results stored in the JSON file and store in a set
with open("prev_products.json") as f:
prev_products = set(json.load(f))
# Extract product titles from current results
curr_products = set(all_titles)
# Compare current results vs previous results and store the new results
new_products = curr_products - prev_products
# Store new products in a JSON file
with open("new_products.json", "w") as f:
json.dump(list(new_products), f, indent=2)
# Save current results for next comparison
with open("prev_products.json", "w") as f:
json.dump(list(curr_products), f, indent=2)You can search for the titles of new tech products, compare them with previous results and track important upcoming trends across shopping and news outlets.
Conclusion
At SerpApi, we provide a wide array of APIs, from Google to Walmart, Home Depot, and beyond! You can query any of our search engines using our libraries, no-code integrations, or a simple GET request.
For predicting upcoming products, we offer shopping APIs, news APIs, and even a trends API. Tracking listings on these search engines daily, hourly, or even by the minute has never been easier. Our JSON_restrictor parameter allows you to receive only the portion of results you need, or you can parse the details after receiving the full results.
Live results from search engines offer a unique opportunity to gain insights into what users are seeing. Get started with a free SerpApi account here: https://serpapi.com/users/sign_up.


