Walmart Related Searches Scraper API
Our Walmart related searches scraper takes a query and returns the related search terms Walmart surfaces for it as JSON, each with its query text and the search URL it points to.
Quickstart
curl "https://api.walmartscraperapi.com/api/v1/walmart/relatedqueries?query=laptop&api_key=$API_KEY" import requests, os
BASE = "https://api.walmartscraperapi.com"
API_KEY = os.environ["API_KEY"]
data = requests.get(
f"{BASE}/api/v1/walmart/relatedqueries",
params={"query": "laptop", "api_key": API_KEY},
timeout=30,
).json()
for row in data["related_queries"]:
print(row["query"]) Response
{
"query": "laptop",
"related_queries": [
{
"query": "gaming laptop",
"url": "https://www.walmart.com/search?q=gaming+laptop"
},
{
"query": "hp laptop",
"url": "https://www.walmart.com/search?q=hp+laptop"
},
{
"query": "laptop computer",
"url": "https://www.walmart.com/search?q=laptop+computer"
}
]
} | Field | Type | Description |
|---|---|---|
query | string | The search term you passed as query. |
related_queries | array | The related search terms Walmart surfaces for the query. |
related_queries[].query | string | The related search term text. |
related_queries[].url | string | The Walmart search URL for that related term. |
Params
| Parameter | Required | Default | Notes |
|---|---|---|---|
query | required | - | The Walmart search term whose related searches you want. |
api_key | required | - | Your API key, passed as a query parameter. Get one free at signup. |
Use it for
Keyword expansion
PPC and SEO research
Catalog gap analysis
Query trees
Pricing
| Plan | Price | Best for |
|---|---|---|
| Free | 1,000 requests | Testing and small jobs |
| Pro | $0.60 / 1k | Production workloads |
| Pay-as-you-go | $0.90 / 1k | Spiky or one-off volume |
Median response 2.6s. You only pay for successful requests.
FAQ
What is a Walmart related searches scraper?
It reads the related search terms Walmart shows for a query and returns them in a structured format. Our API takes a search term and returns the related_queries list as JSON, where each item carries the related query text and its Walmart search URL.
How is this different from the search endpoint?
The Walmart search endpoint returns the product results for a query and also includes a related_queries field. This endpoint returns only the related queries, so you skip parsing the full product grid when related terms are all you need.
What input does it take?
Pass the search term in the query parameter. The endpoint reads the search page and returns the related search pills Walmart renders for it.
What if a query has no related searches?
Some queries do not surface a related-searches block. In that case related_queries comes back as an empty array. We return the real state and never invent terms.
How fast is the API?
Median end-to-end response is about 2.6 seconds, including proxy routing, anti-bot handling, retries, and parsing.