PharmEasy APIpharmeasy.in ↗
Search PharmEasy's medicine catalog via API. Get real-time pricing, availability, prescription requirements, and manufacturer data by city or PIN code.
What is the PharmEasy API?
The PharmEasy API provides access to PharmEasy's medicine and healthcare product catalog through 1 endpoint, returning up to 15 products per page with pricing, availability, and prescription status. The search_medicines endpoint accepts a drug name or keyword and optionally a city name or 6-digit Indian PIN code, making it straightforward to query location-specific stock and cost data programmatically.
curl -X POST 'https://api.parse.bot/scraper/e7c250a1-5824-4027-9f84-c63d92aa5889/search_medicines' \
-H 'X-API-Key: $PARSE_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"page": "1",
"query": "paracetamol",
"location": "400001"
}'Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace pharmeasy-in-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: PharmEasy medicine search — bounded, re-runnable."""
from parse_apis.pharmeasy_in_api import PharmEasy, InvalidInput
client = PharmEasy()
# Search for a common medicine in Mumbai, cap total items fetched.
for med in client.medicines.search(query="paracetamol", location="mumbai", limit=5):
print(f"{med.name} — ₹{med.price} (MRP ₹{med.mrp}, {med.discount_percent}% off)")
# Drill-down: grab the first result for a different query.
result = client.medicines.search(query="vitamin d", limit=1).first()
if result is not None:
print(f"{result.name} | {result.manufacturer} | pack: {result.pack_size}")
print(f" Available: {result.is_available} | Rx required: {result.is_prescription_required}")
print(f" URL: {result.product_url}")
# Demonstrate error handling for an invalid (empty) query.
try:
client.medicines.search(query="", limit=1).first()
except InvalidInput as e:
print(f"Expected error for empty query: {e.message}")
print("exercised: medicines.search / InvalidInput")
Search for medicines by name or keyword with location-based availability and pricing. Returns paginated results (approximately 15 products per page) filtered to actual medicine/product listings. Each result includes pricing, manufacturer, availability status, prescription requirement, and product images. Page 1 is returned when page is omitted.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number for pagination, starting at 1. |
| queryrequired | string | Medicine name or keyword to search for (e.g. 'paracetamol', 'crocin', 'vitamin d'). |
| location | string | City name (e.g. 'mumbai', 'delhi', 'bangalore') or 6-digit Indian PIN code (e.g. '400001'). Determines product availability and pricing. When omitted, defaults to Delhi (110001). |
{
"type": "object",
"fields": {
"page": "Current page number",
"query": "The search query that was executed",
"results": "Array of medicine/product results matching the query",
"location": "The location used for the search (pincode or city name)"
},
"sample": {
"data": {
"page": 1,
"query": "paracetamol",
"results": [
{
"mrp": "32.12",
"name": "Dolo 650Mg Strip Of 15 Tablets",
"price": "28.91",
"images": [
"https://cdn01.pharmeasy.in/dam/productsnowatermark/059346/dolo-650mg-strip-of-15-tablets-front-2-1753347026-non-watermark.jpg"
],
"pack_size": "15 Tablet(s) in Strip",
"product_id": "44140",
"description": "PARACETAMOL / ACETAMINOPHEN",
"product_url": "https://pharmeasy.in/online-medicine-order/dolo-650mg-strip-of-15-tablets-44140",
"is_available": true,
"manufacturer": "MICRO LABS",
"discount_percent": "10",
"is_prescription_required": false
}
],
"location": "400001"
},
"status": "success"
}
}About the PharmEasy API
What the API Returns
The search_medicines endpoint accepts a query string — a medicine name, brand, or keyword such as 'paracetamol', 'crocin', or 'vitamin d' — and returns a paginated list of matching products from PharmEasy's catalog. Each page contains approximately 15 results. The response includes the results array alongside the echoed query, current page number, and the resolved location used for the search.
Location-Specific Pricing and Availability
The optional location parameter accepts either a city name (e.g. 'mumbai', 'bangalore') or a 6-digit Indian PIN code (e.g. '400001'). Passing a location causes the API to return pricing and availability figures specific to that delivery area. Without a location, results reflect default catalog data. Each product result includes pricing, manufacturer name, availability status, and whether a prescription is required — fields that differ by geography and stock level.
Pagination and Coverage
Results are paginated using the page integer parameter, starting at page 1. The catalog covers medicines, over-the-counter drugs, and healthcare products listed on PharmEasy. Filtering is applied so results represent actual product listings rather than editorial or informational content. Use the page parameter incrementally to walk through all matches for a broad query.
The PharmEasy API is a managed, monitored endpoint for pharmeasy.in — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when pharmeasy.in changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official pharmeasy.in API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Compare medicine prices across cities by running the same query with different
locationvalues - Flag products that require a prescription before showing them to users in a health app
- Build a medicine availability checker that alerts users when a product is in stock at their PIN code
- Aggregate manufacturer data across a drug category to map which brands PharmEasy carries
- Paginate through search results to build a local cache of a product category's pricing
- Surface OTC vs prescription drug distinctions in a patient-facing medication search tool
- Monitor price changes for a specific medicine by querying the same keyword on a schedule
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does PharmEasy have an official developer API?+
What does each result in the `results` array include?+
How does the `location` parameter affect results?+
location parameter returns pricing and availability specific to that delivery area. Omitting it returns general catalog data that may not reflect local stock or regional pricing differences.