# Search medicines

Search PharmEasy medicine and healthcare product suggestions with optional PIN-code targeting.

- Platform: [PharmEasy](https://docs.upscrape.com/docs/platforms/pharmeasy)
- Capability ID: `pharmeasy.search_medicines`
- Cost: 1 credit per request
- Maximum runtime: 45 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": {
    "limit": 10,
    "pincode": "400001",
    "query": "paracetamol"
  },
  "capability": "pharmeasy.search_medicines"
}'
```

## Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | `integer` | No | Maximum number of unique products to return. |
| `pincode` | `string` | No | Optional six-digit Indian PIN code used for location targeting. |
| `query` | `string` | Yes | Medicine or healthcare product name to search. |

### Example input

```json
{
  "limit": 10,
  "pincode": "400001",
  "query": "paracetamol"
}
```

## 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
{
  "pincode": "400001",
  "products": [
    {
      "active_ingredients": [
        "PARACETAMOL / ACETAMINOPHEN"
      ],
      "entity_type": 2,
      "is_medicine": true,
      "medicine_id": "44140",
      "name": "Dolo 650Mg Strip Of 15 Tablets",
      "prescription_required": false,
      "slug": "dolo-650mg-strip-of-15-tablets-44140",
      "subtitle": "15 Tablet(s) in Strip",
      "url": "https://pharmeasy.in/online-medicine-order/dolo-650mg-strip-of-15-tablets-44140"
    },
    {
      "active_ingredients": [
        "NIMESULIDE+PARACETAMOL / ACETAMINOPHEN"
      ],
      "entity_type": 2,
      "is_medicine": true,
      "medicine_id": "6216",
      "name": "Nicip Plus Strip Of 10 Tablets",
      "prescription_required": false,
      "slug": "nicip-plus-tablet-6216",
      "subtitle": "10 Tablet(s) in Strip",
      "url": "https://pharmeasy.in/online-medicine-order/nicip-plus-tablet-6216"
    },
    {
      "active_ingredients": [
        "PARACETAMOL / ACETAMINOPHEN"
      ],
      "entity_type": 2,
      "is_medicine": true,
      "medicine_id": "188729",
      "name": "Leemol 650Mg Strip Of 15 Tablets",
      "prescription_required": false,
      "slug": "leemol-650mg-tablet-15-s-188729",
      "subtitle": "15 Tablet(s) in Strip",
      "url": "https://pharmeasy.in/online-medicine-order/leemol-650mg-tablet-15-s-188729"
    }
  ],
  "query": "paracetamol"
}
```
### Illustrative output fields

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

| Path | Observed type | Example |
| --- | --- | --- |
| `pincode` | `string` | 400001 |
| `products` | `array` | 3 items |
| `products` | `array` | 3 items |
| `query` | `string` | paracetamol |

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