Drugs.com API: Identify pill by imprint
Finds possible pill matches on the Drugs.com pill identifier by imprint, optionally narrowed by color and shape, with each pill's labeler.
Unofficial. Not affiliated with or endorsed by Drugs.com.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Color optional
color Pill color, for example white.
(default)
- Shape optional
shape Pill shape, for example capsule, oval, or round.
round
Default
.- Imprint, required
imprint Letters or numbers printed on the pill, for example L484.
M
Input as JSON
{ "shape": "round", "imprint": "M"}Output
{ "matches": [ { "color": "White", "shape": "Round", "imprint": "M", "strength": "2 mg", "manufacturer": "SpecGx LLC", "medicine_name": "Levorphanol Tartrate", "pill_page_link": "https://www.drugs.com/imprints/m-29950.html" , "pill_image_link": "https://www.drugs.com/images/pills/custom/pill29950-2/levorphanol-tartrate-2-mg-m-124556.png" }, { "color": "White", "shape": "Round", "imprint": "M", "strength": "0.025 mg / 2.5 mg", "manufacturer": "Aphena Pharma Solutions - Tennessee, LLC", "medicine_name": "Atropine Sulfate and Diphenoxylate Hydrochloride", "pill_page_link": "https://www.drugs.com/imprints/m-31501.html" , "pill_image_link": "https://www.drugs.com/images/pills/custom/pill31501-1/atropine-sulfate-and-diphenoxylate-hydrochloride-0-025-mg-2-5-mg-m-117623.png" }, { "color": "White", "shape": "Round", "imprint": "M", "strength": "70 mg", "manufacturer": "Radius Health, Inc.", "medicine_name": "Binosto", "pill_page_link": "https://www.drugs.com/imprints/m-19894.html" , "pill_image_link": "https://www.drugs.com/images/pills/fio/MIS01010/binosto-70-mg-m-94635.JPG" } ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"drugs.com/identify_pill","input":{"shape":"round","imprint":"M"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "drugs.com/identify_pill" , "input": { "shape": "round", "imprint": "M" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "drugs.com/identify_pill" , "input": { "shape": "round", "imprint": "M" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run drugs.com/identify_pill# with {"shape":"round","imprint":"M"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "imprint" ], "properties": { "color": { "type": "string", "default": "", "description": "Pill color, for example white." }, "shape": { "type": "string", "default": "", "description": "Pill shape, for example capsule, oval, or round." }, "imprint": { "type": "string", "minLength": 1, "description": "Letters or numbers printed on the pill, for example L484." } }}Output schema
{ "type": "object", "required": [ "matches" ], "properties": { "matches": { "type": "array", "items": { "type": "object", "required": [ "medicine_name", "strength", "imprint", "color", "shape", "manufacturer", "pill_image_link", "pill_page_link" ], "properties": { "color": { "type": [ "string", "null" ], "description": "Color listed for this pill." }, "shape": { "type": [ "string", "null" ], "description": "Shape listed for this pill." }, "imprint": { "type": [ "string", "null" ], "description": "Pill imprint shown for this match." }, "strength": { "type": [ "string", "null" ], "description": "Strength printed in the pill listing, when known." }, "manufacturer": { "type": [ "string", "null" ], "description": "Company listed as labeler on the pill page, when available; it may not be the physical manufacturer." }, "medicine_name": { "type": [ "string", "null" ], "description": "Name of the identified medicine." }, "pill_page_link": { "type": [ "string", "null" ], "description": "Link to this pill's details." }, "pill_image_link": { "type": [ "string", "null" ], "description": "Link to a photo of the pill, when available." } } }, "description": "Possible pills that match the description, at most 20." } }}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
drugs.com/identify_pill- Returns
- medicine name, strength, imprint, color, shape, manufacturer (labeler), pill image link, pill page link
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method drugs.com/identify_pill with the inputs above.
Ask your agent
- Found a white oval pill with M367 stamped on it in my kid's backpack. What is it?
- On drugs.com, look up a pill with imprint IP 109 and tell me the drug name, strength, and who makes it
- Yellow round tablet marked 'G 3722' — can you figure out what medication this is and link me to a picture?
- Identify a blue capsule-shaped pill with the imprint 'TEVA 3109' and list possible matches with their manufacturers
- Use the Drugs.com pill identifier to find what a pink round pill imprinted '54 733' is
See more
All Drugs.com methodsLooks up a medicine by brand or generic name on Drugs.com and returns a plain-language overview: class, uses, availability, schedule, dosage forms, side effects, and pregnancy and breastfeeding notes.
drugs.com/get_drugGets the US cash prices Drugs.com lists for a brand or generic medicine by strength, dosage form and quantity, optionally filtered. Where a range is listed the lower price is returned.
drugs.com/get_drug_pricesChecks 2 to 10 medicine names together on the Drugs.com interaction checker and returns drug-to-drug interactions and food or lifestyle warnings, most severe first, plus the names it could not recognise.
drugs.com/check_drug_interactionsFinds the latest FDA drug label for a brand or generic medicine and returns its uses, directions, warnings, ingredients and a DailyMed link.
open.fda.gov/get_drug_labelFinds FDA drug enforcement recalls by medicine or company name, newest first, with status, class, reason and quantity. Recent recalls may not yet appear.
open.fda.gov/search_drug_recallsLooks up a medicine at Cost Plus Drugs by generic or brand name and returns the listed price and its breakdown for a strength, form and quantity, with the strengths and forms on offer. The drug price excludes shipping and taxes; standard shipping is shown separately.
costplusdrugs.com/get_drug_priceLooks up a chemical on PubChem by common name or CAS number and returns its formula, molecular weight, names, description, SMILES, InChIKey and 2D structure image link.
pubchem.ncbi.nlm.nih.gov/get_chemicalLooks up a medicine in the NHS medicines A to Z and returns its guidance: uses, key facts, who can take it, how to take it, side effects, pregnancy and interactions. Sections absent from NHS guidance are null; a plain name with separate adult and child pages selects the adult page.
nhs.uk/get_medicine