Apollo Pharmacy Products Search
apollo-pharmacy.search.products
Products search from Apollo Pharmacy, as JSON.
At a glance
- Endpoint ID
apollo-pharmacy.search.products- Price
- 1 credit per call; failed calls are free
- Runs for up to
- 60 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": "apollo-pharmacy.search.products", "input": { "include_facets": true, "page": 1, "per_page": 5, "pincode": "110001", "query": "paracetamol", "sort": "relevance" }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "apollo-pharmacy.search.products", "input": { "include_facets": true, "page": 1, "per_page": 5, "pincode": "110001", "query": "paracetamol", "sort": "relevance" }}''')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": "apollo-pharmacy.search.products", "input": { "include_facets": true, "page": 1, "per_page": 5, "pincode": "110001", "query": "paracetamol", "sort": "relevance" }}),});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 | Medicine, brand or health product to search for. | paracetamol |
filters |
array<object> | no | Filters to apply, using the ids and values returned in facets. | |
include_facets |
boolean | no | Return the filter options the route offers for this query. Default: false. |
true |
max_pages |
integer | no | How many pages to read forward from page, de-duplicated by SKU. From 1 to 5. Default: 1. |
|
page |
integer | no | First result page. The route stops at 200 results, ten pages of twenty. From 1 to 10. Default: 1. |
1 |
per_page |
integer | no | Results per page. The route returns at most 20. From 1 to 20. Default: 20. |
5 |
pincode |
string | no | Indian PIN code used to localise prices, substitutes, offers and availability. | 110001 |
sort |
string | no | Result order offered by the search route. Allowed values: relevance, price_low, price_high. Default: relevance. |
relevance |
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:
{ "end_page": 1, "has_more": true, "start_page": 1, "total_results": 200, "facets": [ { "name": "Age Group", "id": "Age Group", "type": "checkbox", "values": [ { "name": "Adult", "id": "adult" }, { "name": "Pediatric", "id": "pediatric" } ] }, { "name": "Country Of Origin", "id": "Country Of Origin", "type": "checkbox", "values": [ { "name": "India", "id": "india" } ] } ], "products": [ { "name": "Pacimol 650 Tablet 15's", "price": 23.68, "mrp": 32, "rating": 3.9, "review_count": 44, "availability": "in_stock", "currency": "INR", "delivery_eta": "3 hr", "discount_percent": 26, "image_url": "https://images.apollo247.in/pub/media/catalog/product/P/A/PAC0003_1_1.jpg", "prescription_required": false, "product_id": "26263", "sku": "PAC0003", "subcategory": "C.N.S Drugs", "unit_price": "₹1.57/unit", "url": "https://www.apollopharmacy.in/otc/pacimol-650mg-tablet", "tags": [ "Fever", "Pain" ] }, { "name": "Crocin Advance Tablet 20's", "price": 19, "mrp": 19, "availability": "in_stock", "brand": "CROCIN", "currency": "INR", "delivery_eta": "3 hr", "image_url": "https://images.apollo247.in/pub/media/catalog/product/C/R/CRO0091_1.jpg", "prescription_required": false, "product_id": "48741", "sku": "CRO0091", "subcategory": "Otc", "unit_price": "₹0.95/unit", "url": "https://www.apollopharmacy.in/otc/crocin-advance-tablet", "tags": [ "Fever", "Pain" ] } ]}
Fields
| Field | Type | Example |
|---|---|---|
facets[].name |
string | Age Group |
facets[].values[].name |
string | Adult |
facets[].id |
string | Age Group |
facets[].type |
string | checkbox |
facets[].values |
array | 2 records |
facets[].values[].id |
string | adult |
end_page |
integer | 1 |
facets |
array | 3 records |
has_more |
boolean | true |
products |
array | 3 records |
products[].availability |
string | in_stock |
products[].currency |
string | INR |
products[].delivery_eta |
string | 3 hr |
products[].discount_percent |
integer | 26 |
products[].image_url |
string | https://images.apollo247.in/pub/media/catalog/product/P/A/PAC00… |
products[].mrp |
integer | 32 |
products[].name |
string | Pacimol 650 Tablet 15's |
products[].prescription_required |
boolean | false |
products[].price |
number | 23.68 |
products[].product_id |
string | 26263 |
products[].rating |
number | 3.9 |
products[].review_count |
integer | 44 |
products[].sku |
string | PAC0003 |
products[].subcategory |
string | C.N.S Drugs |
products[].tags |
array | Fever, Pain, Headache |
products[].unit_price |
string | ₹1.57/unit |
products[].url |
string | https://www.apollopharmacy.in/otc/pacimol-650mg-tablet |
start_page |
integer | 1 |
total_results |
integer | 200 |
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 Apollo Pharmacy endpoints
apollo-pharmacy.brand.productsBrand productsapollo-pharmacy.categories.listCategoriesapollo-pharmacy.category.productsCategory productsapollo-pharmacy.pincode.checkCheck PIN codeapollo-pharmacy.product.getProductapollo-pharmacy.product.offersProduct offersapollo-pharmacy.product.reviewsProduct reviewsapollo-pharmacy.product.substitutesProduct substitutesapollo-pharmacy.search.suggestSuggestions searchapollo-pharmacy.stores.nearNearby storesapollo-pharmacy.trending.searchesTrending searches
Something missing or unclear? Ask the team that builds the Apollo Pharmacy endpoints.