Swiggy Instamart Resolve Location
swiggy-instamart.location.resolve
Turn a returned place ID into coordinates and readable location text.
At a glance
- Endpoint ID
swiggy-instamart.location.resolve- Price
- 1.5 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.location.resolve", "input": { "place_id": "ChIJjZnUL1kUrjsRouLcBOiEhJU" }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "swiggy-instamart.location.resolve", "input": { "place_id": "ChIJjZnUL1kUrjsRouLcBOiEhJU" }}''')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.location.resolve", "input": { "place_id": "ChIJjZnUL1kUrjsRouLcBOiEhJU" }}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
Input
- Send a place ID returned by location suggest. A pincode or place name does not work in its place.
| Field | Type | Required | What it does | Example |
|---|---|---|---|---|
place_id |
string | yes | Place ID returned by instamart.location.suggest | ChIJjZnUL1kUrjsRouLcBOiEhJU |
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:
{ "title": "Prestige Philadelphia", "latitude": 12.9269357, "longitude": 77.62442949999999, "subtitle": "560034, 2nd Cross Rd, Koramangala 3 Block, Koramangala, Bengaluru, Karnataka 560034, India"}
Fields
| Field | Type | What it is | Example |
|---|---|---|---|
latitude |
number | Latitude of the resolved or checked delivery point. | 12.93 |
longitude |
number | Longitude of the resolved or checked delivery point. | 77.62 |
title |
string | Resolved place title. | Prestige Philadelphia |
subtitle |
string | Resolved address text. | 560034, 2nd Cross Rd, Koramangala 3 Block, Koramangala, Bengalu… |
What to know
- The returned coordinates identify the resolved place. Check location.serviceability or eta to learn whether that point is served.
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.serviceabilityResolve serviceabilityswiggy-instamart.location.suggestSuggest locationsswiggy-instamart.product.getProductswiggy-instamart.products.searchProducts searchswiggy-instamart.search.suggestionsSuggestions search
Something missing or unclear? Ask the team that builds the Swiggy Instamart endpoints.