1mg API1mg.com ↗
Access 1mg.com medicine search, drug details, Ayurveda herbs, category trees, and location-based availability via 7 structured endpoints.
What is the 1mg API?
The 1mg API exposes 7 endpoints covering medicine search, structured drug information, Ayurveda herb listings, and the full product category hierarchy from 1mg.com. The get_medicine_info endpoint alone returns up to nine distinct data fields per drug — including composition, side effects, mechanism of action, and safety advice — while search_medicines_by_location filters results by city name or Indian PIN code to surface location-specific pricing and availability.
curl -X GET 'https://api.parse.bot/scraper/f703cd2f-7d9c-47bc-8106-6d9631d9b223/search_medicines?page=0&limit=5&query=paracetamol' \ -H 'X-API-Key: $PARSE_API_KEY'
Full-text search over medicines and health products on 1mg.com. Returns generic drugs and branded products matching the query. Paginates via page number or scroll_id from a previous response. Each result carries type (generic or product), identity, URL, and type-specific fields (price/rating for products, description for generics).
| Param | Type | Description |
|---|---|---|
| page | integer | Page number (zero-based). |
| limit | integer | Number of results per page. |
| queryrequired | string | Medicine name or keyword to search for. |
| scroll_id | string | Scroll ID for deep pagination, returned from a previous search response. |
{
"type": "object",
"fields": {
"query": "string, the search query echoed back",
"results": "array of search result objects, each with type, id, name, url, and additional fields depending on type",
"scroll_id": "string, pagination token for fetching the next page",
"total_found": "boolean indicating if results were found"
},
"sample": {
"data": {
"query": "paracetamol",
"results": [
{
"id": "210459",
"url": "https://www.1mg.com/generics/paracetamol-210459",
"name": "Paracetamol",
"type": "generic",
"description": "Paracetamol is used for pain relief and fever."
},
{
"id": "143883",
"mrp": 33.76,
"url": "https://www.1mg.com/drugs/dolo-650-tablet-15-s-143883",
"name": "Dolo 650 Tablet",
"type": "product",
"brand": "Micro Labs Ltd",
"image": "https://onemg.gumlet.io/example.jpg",
"price": 30.38,
"rating": 4.6,
"discount": "10% off",
"pack_size": "strip of 15 tablets",
"availability": true,
"rating_count": 1200
}
],
"scroll_id": "HmIUzR6-j5-655J_cjOIiU4A_8u3CuIixjhNDHn9Rw8=",
"total_found": true
},
"status": "success"
}
}About the 1mg API
Medicine Search and Product Data
The search_medicines endpoint accepts a query string and returns an array of results typed as either generic drugs or branded products. Each result includes id, name, url, and type-specific fields. Deep pagination is handled via a scroll_id token returned in each response — pass it back to retrieve the next page beyond what standard page numbering covers. The search_medicines_by_location endpoint mirrors this but requires an additional location parameter (a city name like Mumbai or a 6-digit PIN code), with each result including price, mrp, discount, pack_size, rx_required, available, and manufacturer.
Detailed Drug Information
Two endpoints operate on individual medicine pages identified by a slug_id — the URL path segment from a 1mg.com medicine page, such as dolo-650-tablet-15-s-143883. get_medicine_info returns the drug's composition, uses array, side_effects array, how_it_works text, introduction, fact_box (classification attributes like chemical class and therapeutic class), and a safety_advice array broken down by topic (alcohol, pregnancy, driving, etc.). get_medicine_detail focuses on widget-level data: related products, substitutes, and a qna block containing community questions and answers.
Ayurveda Herbs and Category Tree
The get_ayurveda_herbs endpoint accepts an alphabet parameter (single letter a–z) to browse herbs alphabetically, returning each herb's name, description, slug, and image_url alongside meta pagination fields (count, total_count). The get_category_tree endpoint takes no inputs and returns the complete product category hierarchy as a nested array — each node carries name, id, slug, url, display_text, image_url, and a children array for subcategories.
Offers and Utility
The get_offers endpoint returns the promotional offers page url and its HTTP status_code, giving a quick way to verify whether the offers section is currently accessible before surfacing it to end users.
The 1mg API is a managed, monitored endpoint for 1mg.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when 1mg.com 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 1mg.com 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?+
- Build a medicine price comparison tool using
search_medicines_by_locationwith PIN codes to surface city-specificpriceandmrpdata. - Populate drug information pages using
get_medicine_infofields:composition,side_effects,uses, andsafety_advice. - Create an Ayurveda herb browser using
get_ayurveda_herbswith alphabetical filtering and paginated results. - Index the full 1mg product taxonomy for navigation or filtering using the nested
childrentree fromget_category_tree. - Show medicine substitutes and related products in a pharmacy app using
widgetsdata fromget_medicine_detail. - Surface community Q&A content for a specific drug by pulling the
qnaobject fromget_medicine_detail. - Validate whether promotional offers are currently live before rendering offer banners, using
get_offersstatus checks.
| 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 1mg have an official public developer API?+
What does `get_medicine_info` return beyond basic drug names?+
composition (salt and strength), an array of uses, an array of side_effects, how_it_works (mechanism of action), a full introduction text, fact_box entries covering chemical class and therapeutic class, and a safety_advice array with per-topic advice and description fields covering alcohol, pregnancy, breastfeeding, driving, and similar categories.How does location-based search pagination work?+
search_medicines_by_location uses zero-based page numbering alongside a limit parameter. The standard search_medicines endpoint additionally supports a scroll_id token for deep pagination — pass the scroll_id from one response as the input to the next call to continue beyond what page numbering alone handles. search_medicines_by_location does not currently expose a scroll_id.Does the API return user reviews or star ratings for medicines?+
Is medicine availability outside India covered?+
search_medicines_by_location endpoint is scoped to Indian cities and 6-digit Indian PIN codes. International locations are not supported. If you need to extend coverage, you can fork this API on Parse and revise the location handling to accommodate additional input formats or markets.