# Search products

Search public Tata 1mg product and medicine listings with bounded pagination and normalized pricing/rating fields.

- Platform: [Tata 1mg](https://docs.upscrape.com/docs/platforms/tata-1mg)
- Capability ID: `tata-1mg.search.products`
- Cost: 1 credit per request
- Maximum runtime: 120 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": {
    "max_pages": 1,
    "page": 1,
    "query": "biotin"
  },
  "capability": "tata-1mg.search.products"
}'
```

## Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | `integer` | No | Maximum number of results to return. |
| `max_pages` | `integer` | No | Max pages supplied for this request. |
| `page` | `integer` | No | One-based result page to fetch. |
| `pincode` | `string` | No | Pincode supplied for this request. |
| `query` | `string` | Yes | Search query. |

### Example input

```json
{
  "max_pages": 1,
  "page": 1,
  "query": "biotin"
}
```

## 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
{
  "end_page": 1,
  "has_more": false,
  "items": [
    {
      "availability": "available",
      "currency": "INR",
      "discount_percent": 39,
      "mrp": 48400,
      "name": "Biotin + Advanced Tablet for Healthy and Strong Hair | by Tata 1mg",
      "price": 29500,
      "product_id": "842970",
      "url": "https://www.1mg.com/otc/[redacted:token]"
    },
    {
      "availability": "available",
      "currency": "INR",
      "discount_percent": 38,
      "mrp": 44000,
      "name": "Tata 1mg Biotin Gummies for Nourished and Happy Hair jar of 30 gummies",
      "price": 27500,
      "product_id": "781759",
      "url": "https://www.1mg.com/otc/[redacted:token]"
    },
    {
      "availability": "available",
      "currency": "INR",
      "discount_percent": 16,
      "mrp": 65500,
      "name": "Ad Nutrasium Plant Based Biotin 10000mcg Tablet",
      "price": 54900,
      "product_id": "1127224",
      "url": "https://www.1mg.com/otc/[redacted:token]"
    }
  ],
  "limit": 20,
  "pages_fetched": 1,
  "query": "biotin",
  "start_page": 1
}
```
### Illustrative output fields

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

| Path | Observed type | Example |
| --- | --- | --- |
| `end_page` | `integer` | 1 |
| `has_more` | `boolean` | false |
| `items` | `array` | 3 items |
| `items` | `array` | 3 items |
| `limit` | `integer` | 20 |
| `pages_fetched` | `integer` | 1 |
| `query` | `string` | biotin |
| `start_page` | `integer` | 1 |

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