Endpoints
Search medicines by name. Returns up to 10 results with id, name, and price.
q
string
required
— Medicine name to search
Get full pharmaceutical details using the id from search results.
id
string
required
— The id field from /api/search
Response · /api/search
{ "success": true, "query": "panadol", "count": 2,
"results": [
{ "id": "panadol-500mg-tab-200-s",
"name": "Panadol 500mg Tab 200's",
"price": "Rs. 36.0" }
]
}
Response · /api/details
{ "success": true,
"medicine": {
"id": "panadol-500mg-tab-200-s",
"name": "Panadol 500mg Tab 200's",
"price": "Rs. 36.0", "discount": "10% OFF",
"details": [
{ "section": "uses", "title": "Uses",
"content": "Used to treat mild to moderate pain..." }
]
}
}
Error Codes
400
Missing required query parameter
404
No results found for query or id
405
Method not allowed — use GET only
500
Upstream fetch failed — please retry