~ / endpoints / Related Searches API

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.

Get a free API keyBrowse the endpoints
1,000
free requests / mo
2.6s
median response
query + url
per related term
JSON
structured output

Quickstart

cURL
curl "https://api.walmartscraperapi.com/api/v1/walmart/relatedqueries?query=laptop&api_key=$API_KEY"
Python
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

200 OK
{
  "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"
    }
  ]
}
FieldTypeDescription
querystringThe search term you passed as query.
related_queriesarrayThe related search terms Walmart surfaces for the query.
related_queries[].querystringThe related search term text.
related_queries[].urlstringThe Walmart search URL for that related term.

Params

ParameterRequiredDefaultNotes
queryrequired-The Walmart search term whose related searches you want.
api_keyrequired-Your API key, passed as a query parameter. Get one free at signup.

Use it for

>

Keyword expansion

Turn one seed term into the adjacent searches real shoppers use on Walmart.
>

PPC and SEO research

Feed the related terms into ad targeting and product-page keyword coverage.
>

Catalog gap analysis

Spot demand around a term that your current listings do not cover.
>

Query trees

Walk related terms recursively to map a whole category the way Walmart clusters it.

Pricing

PlanPriceBest for
Free1,000 requestsTesting and small jobs
Pro$0.60 / 1kProduction workloads
Pay-as-you-go$0.90 / 1kSpiky 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.

Get related searches api as JSON
Free plan, 1,000 requests. No credit card required.
Get a free API key All endpoints