PharmEasy Medicines Search
pharmeasy.search_medicines
Search PharmEasy medicines and health products by name: each result's name, pack, active ingredients, whether it needs a prescription and its slug.
At a glance
- Endpoint ID
pharmeasy.search_medicines- Price
- 10 credits per call; failed calls are free
- Runs for up to
- 45 seconds
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": "pharmeasy.search_medicines", "input": { "limit": 5, "query": "dolo" }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "pharmeasy.search_medicines", "input": { "limit": 5, "query": "dolo" }}''')response = requests.post( "https://data.upscrape.com/execute", headers={ "Authorization": f"Bearer {os.environ['UPSCRAPE_API_KEY']}", "Content-Type": "application/json", "Prefer": "wait=30", }, json=payload,)response.raise_for_status()print(json.dumps(response.json(), indent=2))
const response = await fetch("https://data.upscrape.com/execute", { method: "POST", headers: { "Authorization": `Bearer ${process.env.UPSCRAPE_API_KEY}`, "Content-Type": "application/json", "Prefer": "wait=30", }, body: JSON.stringify({ "capability": "pharmeasy.search_medicines", "input": { "limit": 5, "query": "dolo" }}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
Input
| Field | Type | Required | What it does | Example |
|---|---|---|---|---|
query |
string | yes | A medicine or health product name, such as dolo. | dolo |
limit |
integer | no | How many products to return. | 5 |
pincode |
string | no | A six-digit Indian PIN code, for that delivery area. |
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:
{ "products": [ { "name": "Dolo 650Mg Strip Of 15 Tablets", "entity_type": 2, "is_medicine": true, "medicine_id": "44140", "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": [ "PARACETAMOL / ACETAMINOPHEN" ] }, { "name": "Leemol 650Mg Strip Of 15 Tablets", "entity_type": 2, "is_medicine": true, "medicine_id": "188729", "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", "active_ingredients": [ "PARACETAMOL / ACETAMINOPHEN" ] } ]}
Fields
| Field | Type | What it is | Example |
|---|---|---|---|
products[].name |
string | The medicine or category name as PharmEasy shows it. | Dolo 650Mg Strip Of 15 Tablets |
products[].subtitle |
string | The pack size as PharmEasy shows it. | 15 Tablet(s) in Strip |
products[].prescription_required |
boolean | Whether a prescription is needed to order it. | false |
products[].is_medicine |
boolean | Whether the product is a medicine. | true |
products[].medicine_id |
string | PharmEasy's ID for the medicine; the details endpoint takes it. | 44140 |
products[].slug |
string | The name in its page address. | dolo-650mg-strip-of-15-tablets-44140 |
products[].active_ingredients |
array | The medicine's active ingredients. | PARACETAMOL / ACETAMINOPHEN |
products[].entity_type |
integer | 2 | |
products[].url |
string | The medicine's page on PharmEasy. | https://pharmeasy.in/online-medicine-order/dolo-650mg-strip-of-… |
products |
array | The products. | 5 records |
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 PharmEasy endpoints
Something missing or unclear? Ask the team that builds the PharmEasy endpoints.