# List

List Swiggy restaurants near a location.

- Platform: [Swiggy](https://docs.upscrape.com/docs/platforms/swiggy)
- Capability ID: `swiggy.list`
- Cost: 1 credit per request
- Maximum runtime: 30 seconds
- Execute endpoint: `POST https://data.upscrape.com/execute`

## Request

Use the exact public capability ID in the shared execute envelope.

```bash
curl --request POST \
  --url https://data.upscrape.com/execute \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Prefer: wait=30" \
  --data '{
  "input": {
    "latitude": 12.9121181,
    "limit": 5,
    "longitude": 77.6445548
  },
  "capability": "swiggy.list"
}'
```

## Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `latitude` | `number` | No | Latitude of the location. |
| `limit` | `integer` | No | Maximum number of results. |
| `longitude` | `number` | No | Longitude of the location. |
| `offset` | `integer` | No | Pagination offset. |

### Example input

```json
{
  "latitude": 12.9121181,
  "limit": 5,
  "longitude": 77.6445548
}
```

## Response

Successful output is returned in `results[0].data`. Raw platform output is intentionally open-ended and may evolve with the upstream source.

### Illustrative sample output

This redacted fixture is an example, not a fixed response schema.

```json
{
  "count": 5,
  "latitude": 12.9121181,
  "longitude": 77.6445548,
  "next_offset": "CJhlELQ4KICo7qLp8ezbDjCnEzgD",
  "raw_meta": {
    "offset": ""
  },
  "results": [
    {
      "area_name": "HSR Layout",
      "avg_rating": 4,
      "avg_rating_string": "4.0",
      "cloudinary_image_id": "RX_THUMBNAIL/IMAGES/VENDOR/2026/6/15/[redacted:token].JPG",
      "cost_for_two": "₹300 for two",
      "cuisines": [
        "Pizzas"
      ],
      "delivery_time_minutes": 25,
      "id": "10581",
      "image_url": "https://media-assets.swiggy.com/swiggy/image/upload/RX_THUMBNAIL/IMAGES/VENDOR/2026/6/15/[redacted:token].JPG",
      "is_open": true,
      "last_mile_travel_km": 0.9,
      "last_mile_travel_string": "0.9 km",
      "locality": "14th Main",
      "name": "Pizza Hut",
      "offers": [
        {
          "discount_tag": "FLAT DEAL",
          "header": "50% OFF",
          "offer_tag": "FLAT DEAL"
        }
      ],
      "parent_id": "721",
      "restaurant_url": "https://www.swiggy.com/city/bangalore/[redacted:token]",
      "serviceability": "SERVICEABLE",
      "sla_string": "25-30 mins",
      "source_url": "[redacted:acquisition_url]",
      "total_ratings_string": "21K+"
    },
    {
      "area_name": "HSR Layout",
      "avg_rating": 4.2,
      "avg_rating_string": "4.2",
      "cloudinary_image_id": "RX_THUMBNAIL/IMAGES/VENDOR/2024/11/7/[redacted:token].jpg",
      "cost_for_two": "₹200 for two",
      "cuisines": [
        "Bubble Tea",
        "Burger",
        "Korean"
      ],
      "delivery_time_minutes": 22,
      "id": "819617",
      "image_url": "https://media-assets.swiggy.com/swiggy/image/upload/RX_THUMBNAIL/IMAGES/VENDOR/2024/11/7/[redacted:token].jpg",
      "is_open": true,
      "last_mile_travel_km": 0.6,
      "last_mile_travel_string": "0.6 km",
      "locality": "5TH SECTOR",
      "name": "Boba Bhai - Bubble Tea & Korean Street Food",
      "offers": [
        {
          "header": "60% OFF",
          "sub_header": "UPTO ₹120"
        }
      ],
      "parent_id": "361235",
      "restaurant_url": "https://www.swiggy.com/city/bangalore/[redacted:token]",
      "serviceability": "SERVICEABLE",
      "sla_string": "20-25 mins",
      "source_url": "[redacted:acquisition_url]",
      "total_ratings_string": "1.2K+"
    },
    {
      "area_name": "HSR Layout",
      "avg_rating": 4.3,
      "avg_rating_string": "4.3",
      "cloudinary_image_id": "RX_THUMBNAIL/IMAGES/VENDOR/2026/6/18/[redacted:token].JPG",
      "cost_for_two": "₹400 for two",
      "cuisines": [
        "Burgers",
        "Beverages",
        "Cafe"
      ],
      "delivery_time_minutes": 26,
      "id": "23682",
      "image_url": "https://media-assets.swiggy.com/swiggy/image/upload/RX_THUMBNAIL/IMAGES/VENDOR/2026/6/18/[redacted:token].JPG",
      "is_open": true,
      "last_mile_travel_km": 1.4,
      "last_mile_travel_string": "1.4 km",
      "locality": "HSR Layout",
      "name": "McDonald's",
      "offers": [
        {
          "header": "ITEMS",
          "sub_header": "AT ₹64"
        }
      ],
      "parent_id": "630",
      "restaurant_url": "https://www.swiggy.com/city/bangalore/mcdonalds-hsr-layout-rest23682",
      "serviceability": "SERVICEABLE",
      "sla_string": "25-30 mins",
      "source_url": "[redacted:acquisition_url]",
      "total_ratings_string": "79K+"
    }
  ],
  "source_url": "[redacted:acquisition_url]"
}
```
### Illustrative output fields

Derived from the sample above for orientation only. These fields are not a fixed response schema.

| Path | Observed type | Example |
| --- | --- | --- |
| `count` | `integer` | 5 |
| `latitude` | `number` | 12.9121181 |
| `longitude` | `number` | 77.6445548 |
| `next_offset` | `string` | CJhlELQ4KICo7qLp8ezbDjCnEzgD |
| `raw_meta` | `object` | 1 fields |
| `raw_meta.offset` | `string` |  |
| `results` | `array` | 3 items |
| `results` | `array` | 3 items |
| `source_url` | `string` | [redacted:acquisition_url] |

## Execution behavior

A `200` response completed inline. A `202` response was queued; poll `GET /jobs/{id}` until the job reaches `completed` or `failed`. Use an `Idempotency-Key` when retrying must not create a duplicate logical job.

## Related documentation

- [Authentication](https://docs.upscrape.com/docs/api/authentication)
- [Jobs and results](https://docs.upscrape.com/docs/api/jobs)
- [Errors and retries](https://docs.upscrape.com/docs/api/errors)
- [Idempotency](https://docs.upscrape.com/docs/api/idempotency)
