↑ ↓ to move ↵ to open
Swiggy API reference

Swiggy Categories

swiggy.categories

The cuisines and food categories Swiggy suggests at a location, in the order it shows them.

At a glance

Endpoint ID
swiggy.categories
Price
1 credit per call; failed calls are free
Runs for up to
30 seconds
Request
POST /execute
Run an endpoint
MCP tool when pinned
swiggy__categories
Pin tools
OpenAPI
openapi.json
Download

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.categories",  "input": {    "latitude": 12.9121181,    "limit": 20,    "longitude": 77.6445548  }}'

Input

FieldTypeRequiredWhat it doesExample
latitude number no Latitude of the location. 12.9121181
limit integer no Maximum number of categories. 20
longitude number no Longitude of the location. 77.6445548

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:

results[0].data
{  "summary": {    "latitude": 12.9121181,    "longitude": 77.6445548,    "total_items": 12  },  "items": [    {      "entity_id": "swiggy://explore?query=Rolls",      "id": "600995",      "latitude": 12.9121181,      "link": "swiggy://explore?query=Rolls",      "longitude": 77.6445548,      "query": "Rolls",      "rank": 1,      "section": "Popular Cuisines"    },    {      "entity_id": "swiggy://explore?query=Pizza",      "id": "600813",      "latitude": 12.9121181,      "link": "swiggy://explore?query=Pizza",      "longitude": 77.6445548,      "query": "Pizza",      "rank": 2,      "section": "Popular Cuisines"    }  ]}

Fields

FieldTypeWhat it isExample
items[].rank integer The restaurant's place in the list. 1
items[].query string The search term. Rolls
items[].section string The section of Swiggy's search page. Popular Cuisines
items[].entity_id string swiggy://explore?query=Rolls
items[].id string 600995
items[].latitude number Latitude. 12.91
items[].link string Swiggy's link for the search. swiggy://explore?query=Rolls
items[].longitude number Longitude. 77.64
items array The results. 12 records
summary object Totals for this response. 3 fields
summary.latitude number Latitude. 12.91
summary.longitude number Longitude. 77.64
summary.total_items integer How many results this response holds. 12

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

Something missing or unclear? Ask the team that builds the Swiggy endpoints.