PharmEasy Products Search
pharmeasy.search_products
Search the public PharmEasy catalogue and return each result with its selling price and printed MRP.
At a glance
- Endpoint ID
pharmeasy.search_products- 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.search_products", "input": { "max_pages": 1, "page": 2, "query": "paracetamol" }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "pharmeasy.search_products", "input": { "max_pages": 1, "page": 2, "query": "paracetamol" }}''')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_products", "input": { "max_pages": 1, "page": 2, "query": "paracetamol" }}),});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 | Search query. | paracetamol |
max_pages |
integer | no | How many pages to read forward from page. From 1 to 10. Default: 1. |
1 |
page |
integer | no | Result page. The public search route takes a page number directly. From 1 to 100. Default: 1. |
2 |
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:
{ "has_more": true, "products": [ { "name": "Leemol 650Mg Strip Of 15 Tablets", "price": 21.08, "mrp": 31, "availability": "available", "currency": "INR", "discount_percent": 32, "entity_type": 2, "manufacturer": "LEEFORD HEALTHCARE LTD", "molecule_name": "PARACETAMOL / ACETAMINOPHEN", "prescription_required": true, "product_id": "188729", "slug": "leemol-650mg-tablet-15-s-188729", "subtitle": "15 Tablet(s) in Strip", "url": "https://pharmeasy.in/health-care/products/leemol-650mg-tablet-15-s-188729" }, { "name": "Welset 650Mg Strip Of 10 Tablets", "price": 17.12, "mrp": 19.02, "availability": "available", "currency": "INR", "discount_percent": 10, "entity_type": 2, "manufacturer": "RANBAXY LABORATORIES (SUN PHARMA)", "molecule_name": "PARACETAMOL / ACETAMINOPHEN", "prescription_required": false, "product_id": "73928", "slug": "welset-650mg-strip-of-10-tablets-73928", "subtitle": "10 Tablet(s) in Strip", "url": "https://pharmeasy.in/health-care/products/welset-650mg-strip-of-10-tablets-73928" } ]}
Fields
| Field | Type | Example |
|---|---|---|
products[].name |
string | Leemol 650Mg Strip Of 15 Tablets |
products[].price |
number | 21.08 |
products[].mrp |
integer | 31 |
products[].availability |
string | available |
products[].currency |
string | INR |
products[].discount_percent |
integer | 32 |
products[].entity_type |
integer | 2 |
products[].manufacturer |
string | LEEFORD HEALTHCARE LTD |
products[].molecule_name |
string | PARACETAMOL / ACETAMINOPHEN |
products[].prescription_required |
boolean | true |
products[].product_id |
string | 188729 |
products[].slug |
string | leemol-650mg-tablet-15-s-188729 |
products[].subtitle |
string | 15 Tablet(s) in Strip |
products[].url |
string | https://pharmeasy.in/health-care/products/leemol-650mg-tablet-1… |
has_more |
boolean | true |
products |
array | 2 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.