SerpBase

API reference · E-commerce

Walmart Search Autocomplete

Retrieve Walmart search suggestions for a query. This endpoint does not retrieve a Walmart product page.

POSThttps://api.serpbase.dev/walmart/autocomplete
1 creditOpen in Playground

Example

BASH
curl -X POST 'https://api.serpbase.dev/walmart/autocomplete' \
  -H "Content-Type: application/json" \
  -H 'X-API-Key: YOUR_API_KEY' \
  --max-time 60 \
  -d '{"query":"laptop"}'
Response · real, shortened
{
  "status": 0,
  "credits_charged": 1,
  "request_id": "r-4b27fe8a36d9ac303a5da7dd",
  "product_id": "walmart_autocomplete",
  "query": "laptop",
  "action": "autocomplete",
  "source": "walmart",
  "suggestions": [
    {
      "image_url": "https://i5.walmartimages.com/asr/a39aa0bc-55ec-4191-b551-bb1f2091298a.96c5bae25e4983bb3cd56ebe40bf1aad.jpeg",
      "link": "https://www.walmart.com/typeahead/v3/query=laptop&typeahead=laptop",
      "text": "laptop",
      "type": "QUERY",
      "url": "https://www.walmart.com/typeahead/v3/query=laptop&typeahead=laptop"
    },
    {
      "image_url": "https://i5.walmartimages.com/asr/043886ec-7727-46d0-aa46-432fb2e614b3.ae5320e8c87a64e2baf391c5dd85b801.jpeg",
      "link": "https://www.walmart.com/typeahead/v3/query=laptop%20computers%20under%20%24200&typeahead=laptop",
      "text": "laptop computers under $200",
      "type": "QUERY",
      "url": "https://www.walmart.com/typeahead/v3/query=laptop%20computers%20under%20%24200&typeahead=laptop"
    }
  ],
  "url": "https://www.walmart.com/typeahead/v3/complete?term=laptop"
}

Parameters

format
"json" | "markdown"
json (default) returns the parsed result.
More

markdown returns the same result as Markdown text (text/markdown) for language models: no envelope, no duplicate alias fields, no inline images. Same credits; failures keep the JSON envelope.

query
string
Example: "laptop"
country
string
Public alias for locale.country.
More

Use one spelling at a time; the API validates the parameters and values supported by this product.

cursor
string
Public alias for pagination.cursor.
More

Use one spelling at a time; the API validates the parameters and values supported by this product.

device
string
Public alias for options.device.
More

Use one spelling at a time; the API validates the parameters and values supported by this product.

gl
string
Public alias for locale.country.
More

Use one spelling at a time; the API validates the parameters and values supported by this product.

hl
string
Public alias for locale.language.
More

Use one spelling at a time; the API validates the parameters and values supported by this product.

html
boolean
Public alias for include_html.
More

Use one spelling at a time; the API validates the parameters and values supported by this product.

language
string
Public alias for locale.language.
More

Use one spelling at a time; the API validates the parameters and values supported by this product.

limit
integer
Public alias for pagination.limit.
More

Use one spelling at a time; the API validates the parameters and values supported by this product.

markdown
boolean
Public alias for include_markdown.
More

Use one spelling at a time; the API validates the parameters and values supported by this product.

mobile
boolean
Public alias for options.device.
More

Use one spelling at a time; the API validates the parameters and values supported by this product.

num
integer
Public alias for pagination.limit.
More

Use one spelling at a time; the API validates the parameters and values supported by this product.

page
integer
Public alias for pagination.page.
More

Use one spelling at a time; the API validates the parameters and values supported by this product.

q
string
Public alias for query.
More

Use one spelling at a time; the API validates the parameters and values supported by this product.

The sample shows example parameters, not the complete request contract. Known fields are validated by the API; additional parameters are allowed.

What comes back

The fields are those in the response above; every endpoint also carries status, credits_charged and request_id.

If it fails

A failed request has a non-zero status and an error, and is not charged. The ones you will see here:

1000A parameter is missing or wrongFix the request
1020No credits leftTop up
1029Over your requests per secondWait Retry-After seconds
1502 · 1504The source could not be read this timeRetry
All status codes →