PharmEasy Medicine Details
pharmeasy.get_medicine_details
Get one medicine from its slug: price, brand, manufacturer, composition, availability and prescription status, for a PIN code if you give one.
At a glance
- Endpoint ID
pharmeasy.get_medicine_details- Price
- 1 credit 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.get_medicine_details", "input": { "medicine_slug": "dolo-650mg-strip-of-15-tablets-44140", "pincode": "400001" }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "pharmeasy.get_medicine_details", "input": { "medicine_slug": "dolo-650mg-strip-of-15-tablets-44140", "pincode": "400001" }}''')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.get_medicine_details", "input": { "medicine_slug": "dolo-650mg-strip-of-15-tablets-44140", "pincode": "400001" }}),});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 |
|---|---|---|---|---|
medicine_slug |
string | yes | The medicine's slug from search, such as dolo-650mg-strip-of-15-tablets-44140. | dolo-650mg-strip-of-15-tablets-44140 |
pincode |
string | no | A six-digit Indian PIN code, for that delivery area. | 400001 |
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:
{ "medicine": { "name": "Dolo 650 Tablet", "price": 24.86, "availability": "https://schema.org/InStock", "brand": "DOLO", "composition": "Paracetamol / Acetaminophen(650.0 Mg)", "currency": "INR", "manufacturer": "MICRO LABS", "medicine_id": "44140", "prescription_required": false, "prescription_status": "https://schema.org/OTC", "slug": "dolo-650mg-strip-of-15-tablets-44140", "url": "https://pharmeasy.in/online-medicine-order/dolo-650mg-strip-of-15-tablets-44140", "active_ingredients": [ "Paracetamol / Acetaminophen(650.0 Mg)" ] }}
Fields
| Field | Type | What it is | Example |
|---|---|---|---|
medicine |
object | The medicine. | 13 fields |
medicine.name |
string | The medicine or category name as PharmEasy shows it. | Dolo 650 Tablet |
medicine.brand |
string | The medicine's brand. | DOLO |
medicine.manufacturer |
string | Who makes the medicine. | MICRO LABS |
medicine.price |
number | The selling price, in the currency given. | 24.86 |
medicine.currency |
string | The currency code of the price. | INR |
medicine.composition |
string | The active ingredients and their strength. | Paracetamol / Acetaminophen(650.0 Mg) |
medicine.prescription_required |
boolean | Whether a prescription is needed to order it. | false |
medicine.availability |
string | Whether the medicine is in stock, as a standard web value. | https://schema.org/InStock |
medicine.active_ingredients |
array | The medicine's active ingredients. | Paracetamol / Acetaminophen(650.0 Mg) |
medicine.medicine_id |
string | PharmEasy's ID for the medicine; the details endpoint takes it. | 44140 |
medicine.prescription_status |
string | Whether it is sold over the counter, as a standard web value. | https://schema.org/OTC |
medicine.slug |
string | The name in its page address. | dolo-650mg-strip-of-15-tablets-44140 |
medicine.url |
string | The medicine's page on PharmEasy. | https://pharmeasy.in/online-medicine-order/dolo-650mg-strip-of-… |
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.