# Search

Search Zomato restaurants by query and location with normalized restaurant cards and opaque cursor pagination.

- Platform: [Zomato](https://docs.upscrape.com/docs/platforms/zomato)
- Capability ID: `zomato.search`
- Cost: 1 credit per request
- Maximum runtime: 60 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 $UPSCRAPE_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Prefer: wait=30" \
  --data '{
  "input": {
    "query": "biryani"
  },
  "capability": "zomato.search"
}'
```

## Input


| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `city` | `string` | No | City name. Default: `ncr`. |
| `cursor` | `string` | No | Opaque continuation cursor returned by pagination.next_cursor. |
| `latitude` | `number` | No | Latitude in decimal degrees. From -90 to 90. |
| `limit` | `integer` | No | Maximum number of results to return. From 1 to 100. Default: `20`. |
| `longitude` | `number` | No | Longitude in decimal degrees. From -180 to 180. |
| `query` | `string` | Yes | Search query. |

### Example input

```json
{
  "query": "biryani"
}
```

## 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 example shows one response. Values and optional fields vary with the data available.

```json
{
  "count": 1,
  "fetched_at": "2026-09-24T08:48:44Z",
  "latitude": 28.625789,
  "longitude": 77.210276,
  "pagination": {
    "has_more": true,
    "next_cursor": "[redacted:opaque-cursor]",
    "page": 1,
    "total_results": 2981
  },
  "query": "biryani",
  "results": [
    {
      "aggregate_rating": 4.2,
      "cost_for_two": {
        "amount": 2800,
        "currency": "INR",
        "text": "₹2,800 for two"
      },
      "cuisine_string": "North Indian, Continental, Mexican, Italian, Oriental, Biryani, Beverages",
      "cuisines": [
        "North Indian",
        "Continental",
        "Mexican"
      ],
      "distance_km": 1.2,
      "fetched_at": "2026-09-24T08:48:44Z",
      "locality": "Connaught Place, New Delhi",
      "name": "Local",
      "offer": {
        "discount_text": "20% OFF",
        "is_gold": true,
        "title": "Flat"
      },
      "rank": 1,
      "res_id": "18382360",
      "restaurant_id": "18382360",
      "slug": "local-connaught-place-new-delhi",
      "source_url": "https://www.zomato.com/ncr/restaurants/biryani",
      "sponsored": true,
      "url": "https://www.zomato.com/ncr/local-connaught-place-new-delhi/info"
    }
  ],
  "source_url": "https://www.zomato.com/ncr/restaurants/biryani"
}
```
### 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` | 1 |
| `fetched_at` | `string` | 2026-09-24T08:48:44Z |
| `latitude` | `number` | 28.625789 |
| `longitude` | `number` | 77.210276 |
| `pagination` | `object` | 4 fields |
| `pagination.has_more` | `boolean` | true |
| `pagination.next_cursor` | `string` | [redacted:opaque-cursor] |
| `pagination.page` | `integer` | 1 |
| `pagination.total_results` | `integer` | 2981 |
| `query` | `string` | biryani |
| `results` | `array` | 1 items |
| `results` | `array` | 1 items |
| `source_url` | `string` | https://www.zomato.com/ncr/restaurants/biryani |

## 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)
