Swiggy Restaurants
swiggy.list.restaurants
The restaurants listed at a location as one row each, ready for a spreadsheet or a database.
At a glance
- Endpoint ID
swiggy.list.restaurants- Price
- 3 credits per call; failed calls are free
- Runs for up to
- 30 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.list.restaurants", "input": { "latitude": 12.9121181, "limit": 5, "longitude": 77.6445548 }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "swiggy.list.restaurants", "input": { "latitude": 12.9121181, "limit": 5, "longitude": 77.6445548 }}''')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.list.restaurants", "input": { "latitude": 12.9121181, "limit": 5, "longitude": 77.6445548 }}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
Input
| Field | Type | Required | What it does | Example |
|---|---|---|---|---|
latitude |
number | one of | Latitude; supply together with longitude, or omit both for the default delivery area. From -90 to 90. | 12.9121181 |
longitude |
number | one of | Longitude; supply together with latitude, or omit both for the default delivery area. From -180 to 180. | 77.6445548 |
limit |
integer | no | Maximum number of results, taken from Swiggy's first listing page. | 5 |
offset |
string | no | Not supported: Swiggy serves one listing page per location, so there is no next page to continue. Omit it; any value is rejected as invalid_input. |
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:
{ "summary": { "has_more": true, "latitude": 12.9121181, "longitude": 77.6445548, "total_items": 5 }, "items": [ { "name": "Pizza Hut", "rating": 4, "area_name": "HSR Layout", "cost_for_two_minor": 30000, "cost_for_two_text": "₹300 for two", "cuisines_text": "Pizzas", "delivery_time_minutes": 25, "is_open": true, "last_mile_travel_km": 0.9, "last_mile_travel_text": "0.9 km", "latitude": 12.9121181, "locality": "14th Main", "longitude": 77.6445548, "offer_text": "50% OFF", "parent_id": "721", "rating_text": "4.0", "restaurant_id": "10581", "serviceability": "SERVICEABLE", "sla_text": "25-30 mins", "total_ratings_text": "21K+", "cuisines": [ "Pizzas" ], "offer_headers": [ "50% OFF" ] }, { "name": "Boba Bhai - Bubble Tea & Korean Street Food", "rating": 4.2, "area_name": "HSR Layout", "cost_for_two_minor": 20000, "cost_for_two_text": "₹200 for two", "cuisines_text": "Bubble Tea, Burger, Korean, Beverages, Fast Food, Juice and shake", "delivery_time_minutes": 22, "is_open": true, "last_mile_travel_km": 0.6, "last_mile_travel_text": "0.6 km", "latitude": 12.9121181, "locality": "5TH SECTOR", "longitude": 77.6445548, "offer_text": "60% OFF", "parent_id": "361235", "rating_text": "4.2", "restaurant_id": "819617", "serviceability": "SERVICEABLE", "sla_text": "20-25 mins", "total_ratings_text": "1.2K+", "cuisines": [ "Bubble Tea", "Burger" ], "offer_headers": [ "60% OFF" ] } ]}
Fields
| Field | Type | What it is | Example |
|---|---|---|---|
items[].name |
string | The name of the restaurant or dish. | Pizza Hut |
items[].rating |
integer | The average rating, out of 5. | 4 |
items[].area_name |
string | The area of the restaurant. | HSR Layout |
items[].cost_for_two_minor |
integer | The price guide for two, in paise. | 30,000 |
items[].cost_for_two_text |
string | Swiggy's price guide for two people. | ₹300 for two |
items[].cuisines |
array | The restaurant's cuisines. | Pizzas |
items[].cuisines_text |
string | The cuisines as one line. | Pizzas |
items[].delivery_time_minutes |
integer | Swiggy's delivery time estimate, in minutes. | 25 |
items[].is_open |
boolean | Whether the restaurant is open now. | true |
items[].last_mile_travel_km |
number | Distance from the restaurant to you, in kilometres. | 0.9 |
items[].last_mile_travel_text |
string | That distance as Swiggy shows it. | 0.9 km |
items[].latitude |
number | Latitude. | 12.91 |
items[].locality |
string | The restaurant's locality. | 14th Main |
items[].longitude |
number | Longitude. | 77.64 |
items[].offer_headers |
array | The offer as Swiggy headlines it. | 50% OFF |
items[].offer_text |
string | The offer as Swiggy shows it. | 50% OFF |
items[].parent_id |
string | 721 | |
items[].rating_text |
string | The rating as Swiggy shows it. | 4.0 |
items[].restaurant_id |
string | Swiggy's ID for the restaurant, used by the menu endpoint. | 10581 |
items[].serviceability |
string | Whether the restaurant delivers to your location. | SERVICEABLE |
items[].sla_text |
string | Swiggy's delivery time estimate. | 25-30 mins |
items[].total_ratings_text |
string | How many ratings, as Swiggy rounds it. | 21K+ |
items |
array | The results. | 3 records |
summary |
object | Totals for this response. | 4 fields |
summary.has_more |
boolean | Whether more results follow this page. | true |
summary.latitude |
number | Latitude. | 12.91 |
summary.longitude |
number | Longitude. | 77.64 |
summary.total_items |
integer | How many results this response holds. | 5 |
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 endpoints
swiggy.ads.listAdsswiggy.area.menu_itemsArea menu items gridswiggy.area.restaurantsArea restaurantsswiggy.categoriesCategoriesswiggy.listListswiggy.list.all_restaurantsAll restaurantsswiggy.menuMenuswiggy.menu.area_itemsArea menu itemsswiggy.menu.itemsMenu itemsswiggy.search.dishesDishes searchswiggy.search.restaurantsRestaurants search
Something missing or unclear? Ask the team that builds the Swiggy endpoints.