Swiggy Instamart Suggestions Search
swiggy-instamart.search.suggestions
See autocomplete suggestions for a query at a pincode.
At a glance
- Endpoint ID
swiggy-instamart.search.suggestions- Price
- 2 credits per call; failed calls are free
- Runs for up to
- 120 seconds
Request
Send the endpoint ID as capability and its fields as input. Set UPSCRAPE_API_KEY to your key first.
curl --request POST \ --url https://data.upscrape.com/execute \ --header "Authorization: Bearer $UPSCRAPE_API_KEY" \ --header "Content-Type: application/json" \ --header "Prefer: wait=30" \ --data '{ "capability": "swiggy-instamart.search.suggestions", "input": { "pincode": "560034", "query": "milk" }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "swiggy-instamart.search.suggestions", "input": { "pincode": "560034", "query": "milk" }}''')response = requests.post( "https://data.upscrape.com/execute", headers={ "Authorization": f"Bearer {os.environ['UPSCRAPE_API_KEY']}", "Content-Type": "application/json", "Prefer": "wait=30", }, json=payload,)response.raise_for_status()print(json.dumps(response.json(), indent=2))
const response = await fetch("https://data.upscrape.com/execute", { method: "POST", headers: { "Authorization": `Bearer ${process.env.UPSCRAPE_API_KEY}`, "Content-Type": "application/json", "Prefer": "wait=30", }, body: JSON.stringify({ "capability": "swiggy-instamart.search.suggestions", "input": { "pincode": "560034", "query": "milk" }}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
Input
- Send a search term of up to 200 characters with a six-digit pincode. A store ID or coordinates alone are not enough; if you add a store ID, it must be the store serving that pincode.
| Field | Type | Required | What it does | Example |
|---|---|---|---|---|
pincode |
string | yes | 6-digit Indian PIN code of the delivery location; Instamart suggests from the store serving it | 560034 |
query |
string | yes | Search query. | milk |
primary_store_id |
string | no | Optional check: must equal the primary store serving the delivery location | |
store_id |
string | no | Optional check: the Instamart store you expect. Instamart picks the store from the delivery location (pincode); a different store is rejected, never substituted | |
tracking_id |
string | no | Tracking identifier. |
Response
A finished call answers with HTTP 200; the data is in results[0].data, and billing.credits_charged is what it cost. A call still running after the wait answers 202: see jobs and results.
This is results[0].data from a real run:
{ "suggestions": [ { "text": "Milk", "highlighted_text": "{{Milk}}", "link": "swiggy://stores/instamart/search?query=Milk&metadata=%7B%22type%22%3A%22CATEGORY%22%2C%22data%22%3A%7B%22cloudinaryId%22%3A%22NI_CATALOG%2F…", "type": "SUGGESTION_TYPE_INSTAMART_CATEGORY" }, { "text": "Nandini milk", "highlighted_text": "Nandini {{milk}}", "link": "swiggy://stores/instamart/search?query=Nandini%20milk&metadata=%7B%22type%22%3A%22HYBRID%22%2C%22data%22%3A%7B%22cloudinaryId%22%3A%22NI_CA…", "type": "SUGGESTION_TYPE_INSTAMART_HYBRID" } ]}
Fields
| Field | Type | What it is | Example |
|---|---|---|---|
suggestions[].text |
string | Suggestion text where supplied. | Milk |
suggestions[].highlighted_text |
string | Autocomplete text as shown, with Swiggy's highlight marks. | {{Milk}} |
suggestions[].link |
string | The link the suggestion opens in the Instamart app. | swiggy://stores/instamart/search?query=Milk&metadata=%7B%22type… |
suggestions[].type |
string | The product types you can filter by. | SUGGESTION_TYPE_INSTAMART_CATEGORY |
suggestions |
array | Search suggestions for what you typed. | 9 records |
What to know
- Suggestions are autocomplete choices, not a product-stock response. Use products.search to collect matching product packs and product.get to confirm availability.
If a call fails
A failed call costs nothing. The response carries an error.code you can branch on; Errors and retries lists every code and which ones to retry.
Other Swiggy Instamart endpoints
swiggy-instamart.categories.listCategoriesswiggy-instamart.category.products.listCategory productsswiggy-instamart.collection.products.listCollection productsswiggy-instamart.etaDelivery ETAswiggy-instamart.home.listHome productsswiggy-instamart.location.resolveResolve locationswiggy-instamart.location.serviceabilityResolve serviceabilityswiggy-instamart.location.suggestSuggest locationsswiggy-instamart.product.getProductswiggy-instamart.products.searchProducts search
Something missing or unclear? Ask the team that builds the Swiggy Instamart endpoints.