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));
Response
{ "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" ] } ]}