ready-made APIby Olivia Suzuki

1mg Medicines & Health Products

1mg.com

Search medicines and health products on 1mg.com, optionally for a delivery city or PIN code, read structured drug information (composition, uses, side effects), and browse the category tree, Ayurveda herbs and product Q&A.

Writ CloudRESTMCPwebhookschedule3 credits / callPro+ required

No website sign-in or persona needed. This listing requires Pro or above. Try any function below with your own values, no account: 10 free credits a day per device. Cloud calls after that use your own credits. Pricing →

The name 1mg.com belongs to its owner. This API is not affiliated with, endorsed by or sponsored by 1mg.com. You are responsible for how you use it.

Functions included in this API

01 · Functions7 functions

The form is the docs.

Choose a function, fill in its inputs, and run it: the answer comes back from the live site, with your values. Without an account you get 10 free credits a day per device for this; install the listing in Writ to keep calling it.

7 functionschoose one to explore
01get_category_treeFull 1mg.com medicine and health product category hierarchy (GET /pwa-api/api/v4/udp_tree): categories[] {id, name, slug, url, level, position, image_url, display_text, children[] (2 nested levels)}.02get_offersCheck availability of the 1mg.com promotional offers page: returns url, the HTTP status_code of GET https://www.1mg.com/offers, and final_url after redirects.03get_ayurveda_herbsAyurveda herbs on 1mg.com listed alphabetically (GET /pwa-api/api/v4/ayurvedas/by_alphabet, 50 per page): herbs[] {name, description, slug, image_url}, meta {count, total_count}. Inputs: alphabet (a-z, default a), page (from 1, default 1).04search_medicinesFull-text search over medicines and health products on 1mg.com (GET /pwa-api/api/v4/search/all). Returns generic drugs (type generic: id, name, url, description) and products (type product: id, name, url, price, mrp, discount, image, pack_size, availability, rx_required, rating, rating_count, produc05search_medicines_by_locationSearch medicines and health products on 1mg.com for a delivery location (city name, or 6-digit PIN code resolved to its city via /pwa-api/api/v4/pincode). Returns results[] (drug and OTC products: name, id, price, mrp, discount, manufacturer (always null at search level), available, pack_size, rx_re06get_medicine_infoStructured medicine information from 1mg.com's drug data API (GET /pwa-api/api/v6/drug_skus/<id>/static): name, composition (salt with strength), uses[], side_effects[], how_it_works, introduction, fact_box[] {label, value}, safety_advice[] {category, advice, description}, url, slug_id. Input: slug_07get_medicine_detailWidget sections (related products) and Q&A/feedback data for a 1mg.com medicine identified by its slug ID: the trailing numeric id is extracted and used for /pwa-api/api/v5/drug/widgets/<id> and /pwa-api/webservices/get-question (salt id read from the drug data API). Returns sku_id, url, name, widge
When a call does not work
No key · GET

AI assistants and tools that can only open a URL can call it with no key: one URL per function, its inputs in the query string. Each call spends the free keyless allowance, 10 credits a day per IP address.

GET https://api.usewrit.app/api/marketplace/listings/1mg-medicines-health-products/run?function_name=get_category_treeGET https://api.usewrit.app/api/marketplace/listings/1mg-medicines-health-products/run?function_name=get_offersGET https://api.usewrit.app/api/marketplace/listings/1mg-medicines-health-products/run?function_name=get_ayurveda_herbs&alphabet=m&page=2GET https://api.usewrit.app/api/marketplace/listings/1mg-medicines-health-products/run?function_name=search_medicines&query=crocin&page=2&limit=5GET https://api.usewrit.app/api/marketplace/listings/1mg-medicines-health-products/run?function_name=search_medicines_by_location&query=crocin&location=Bangalore&page=2&limit=5GET https://api.usewrit.app/api/marketplace/listings/1mg-medicines-health-products/run?function_name=get_medicine_info&slug_id=augmentin-625-duo-tablet-138629GET https://api.usewrit.app/api/marketplace/listings/1mg-medicines-health-products/run?function_name=get_medicine_detail&slug_id=augmentin-625-duo-tablet-138629
02 · Checks and timingsmeasured per function

Built to be called again.

Every function was called on the live site before this API was published, and keeps being measured. The numbers are the listing’s own.

—typical callnot measured yet
—measured runsacross 7 functions
—daily checks passedchecks start with the first install
—buyer runs succeededno counted buyer runs yet
functionmedian · 95th percentilemedianruns
get_category_tree Not measured —
get_offers Not measured —
get_ayurveda_herbs Not measured —
search_medicines Not measured —
search_medicines_by_location Not measured —
get_medicine_info Not measured —
get_medicine_detail Not measured —
Checked daily No daily check results published yet. Checks begin with the first install; no pass rate is claimed.
Repaired when it breaks A function that fails its check is re-tested and rebuilt. Installed copies receive the update; you redeploy nothing.
Buyer runs counted No counted buyer runs published yet; uptime counts real buyers’ runs only. Writ service status →

Historical measurements from the public listing, refreshed Dec 4, 2026. Timing samples are not an uptime claim or a guarantee for your next call.

03 · Your copyyour account

Install your copy. Call it your way.

3 credits
Priced per cloud call.

The listing’s base price is 3 credits per call. Longer runs, residential traffic and CAPTCHA solving can add usage. A site or Writ failure is free; your own input or login failures can be billable. Full usage rates →

cloud
No computer to keep running.

Marketplace copies execute in Writ Cloud, in your own account. Requirements and prices are checked before you use the listing.

REST · MCP
Every way to call it, at once.

Use your API key, connect an assistant, set a schedule with email or webhook delivery, or export answers as a dataset.

read-only
It only reads.

The published functions read data from the source website. No website sign-in or persona is needed for this listing.

private copy
Your account, your usage.

Your installed copy belongs to your account. Its underlying recipe stays sealed with its creator; no creator credentials are included.

04 · Or build your ownwebsite → API

Missing a function? Describe it.

Give Writ a website and say what you want. It builds and tests the API for your task.

On your computeryour machine

Build it in Writ Desktop and run it from your own IP. Execution on your machine costs 0 credits.

Get Writ Desktop →
In Writ Cloudcloud

Keep your API online without leaving your computer running. Cloud calls start at 2 credits, or 20 with a browser.

Build an API →
05 · More ready-madeAll APIs →
06 · Questions
Does 1mg have an API?
This page is an independent API and MCP server for 1mg.com: Writ built it on the site’s public pages and tests it, and it has 7 functions you can call today. It is not an official 1mg product. For an official API, check 1mg’s own developer pages.
How do I use the 1mg API from Claude, ChatGPT or Cursor?
Install it in Writ, then add Writ’s MCP server (https://api.usewrit.app/mcp) to Claude, ChatGPT, Cursor or any MCP client: your assistant can run this API’s functions and read the results. From your own code, call the same functions over REST with a Writ API key.
How much does a call to the 1mg API cost?
3 credits per call, charged only when the call succeeds. It needs the Pro plan. New accounts start with 1,000 free credits, then 500 a month on the Free plan, no card.