New: the Crawl API. A whole website in one job, priced before it starts. See how it works
Playground Sign in Start free
Other · drugs.com

How to scrape Drugs.com

Drugs.com (drugs.com) is a website. This guide is built from our own checks of its public pages: what the pages contain, whether our requests get through right now, and the request settings that worked.

Ujeebu scrapes any public website. Not listed here? Try any URL in the Playground or ask us about a site.

Working 5 credits a page, about $0.50 per 1,000 on Pro

7 of 7 of our checks passed in the last 7 days (100%).

Last check 2026-12-03 23:02 UTC · last pass 2026-12-03 23:02 UTC · checked with our own requests, never customer data.

Try it in the Playground

Extract API one call

Drugs.com articles as JSON with the Extract API

5 credits an article
  • title
  • author
  • pub_date
  • text
  • html
  • images
curl -G 'https://api.ujeebu.com/extract' \
  -H "ApiKey: $UJEEBU_API_KEY" \
  --data-urlencode 'url=https://www.drugs.com/metformin.html'

Send any Drugs.com article URL. The answer is {"article": {...}}: title, author, dates, the full text and HTML, images and the site name. Successful responses cost credits; blocked, timed-out and failed requests are free.

Run the code on this page with your own key: 5,000 free credits for 21 days, no card. Get a free API key →

Articles: the Extract API

Send any Drugs.com article URL to the Extract API and get the article itself: title, author, publication and update dates, the full text and HTML, the images and the site name, with no rules to write.

One call: GET /extract 5 credits an article

curl -G 'https://api.ujeebu.com/extract' \
  -H "ApiKey: $UJEEBU_API_KEY" \
  --data-urlencode 'url=https://www.drugs.com/metformin.html'

The answer is {"article": {...}}; the Ujb-Credits header gives the cost. Try it in the Playground

What the answer holds

FieldTypeExample
article.titletextMetformin: Dosage, Side Effects, Diabetes, PCOS - Drugs.com
article.authortextMelisa Puckey
article.pub_datedate2026-12-03 00:00:00
article.modified_datedate2026-12-03 00:00:00
article.summarytextLearn how metformin treats type 2 diabetes, including dosage, side effects, warnings, and its off-label use for weight l...
article.texttextMetformin Generic name: metformin [ met-FOR-min ] Brand names: Fortamet (discontinued), Glucophage (discontinued), Gluco...
article.htmlHTML<h1>Metformin</h1><p> <b>Generic name:</b> metformin [ <i>met-FOR-min</i> ]<br/> <b>Brand names:</b> Fortamet (discontin...
article.imageimage URLhttps://www.drugs.com/images/pills/custom/pill23397-1/metformin-hydrochloride-500-mg-g-10-125505.jpg
article.imageslist of image URLsnull
article.languagecodeen
article.site_nametextDrugs.com
article.urlURLhttps://www.drugs.com/metformin.html
article.canonical_urlURLhttps://www.drugs.com/metformin.html
article.is_articlenumber1
article.faviconURLhttps://www.drugs.com/img/logo/favicon/ddc-icon-16x16.png

Sample output (real call on 2026-12-03, trimmed)

{
    "article": {
        "title": "Metformin: Dosage, Side Effects, Diabetes, PCOS - Drugs.com",
        "author": "Melisa Puckey",
        "pub_date": "2026-12-03 00:00:00",
        "modified_date": "2026-12-03 00:00:00",
        "summary": "Learn how metformin treats type 2 diabetes, including dosage, side effects, warnings, and its off-label use for weight loss and PCOS. Reviewed drug info",
        "text": "Metformin Generic name: metformin [ met-FOR-min ] Brand names: Fortamet (discontinued), Glucophage (discontinued), Glucophage XR (discontinued), Glumetza, Riomet Drug class: Biguanides What is metformin? Metformin is a first-line treatment used for type 2 diabetes in adults and children 10 years and older to help impro...",
        "html": "<h1>Metformin</h1><p>\n<b>Generic name:</b> metformin [ <i>met-FOR-min</i> ]<br/>\n<b>Brand names:</b> Fortamet (discontinued), Glucophage (discontinued), Glucoph...",
        "image": "https://www.drugs.com/images/pills/custom/pill23397-1/metformin-hydrochloride-500-mg-g-10-125505.jpg",
        "images": null,
        "language": "en",
        "site_name": "Drugs.com",
        "url": "https://www.drugs.com/metformin.html",
        "canonical_url": "https://www.drugs.com/metformin.html",
        "is_article": 1,
        "favicon": "https://www.drugs.com/img/logo/favicon/ddc-icon-16x16.png"
    }
}

Code

Complete scripts: set the UJEEBU_API_KEY environment variable and run them as they are. Each one makes the call above and prints the main fields of the answer, and prints the credits the request cost (the Ujb-Credits response header) on stderr. A non-200 answer stops the script with the API's error message.

Articles (Extract API)

Extracts the article above and prints its title, author, date and the start of its text.

drugs_article_sdk.py pip install ujeebu-python==0.1.5
# Extract a Drugs.com article with the Ujeebu Extract API.
# GET /extract with the article URL: the API answers {"article": {...}} with the title, author, dates, full text and HTML, images and site name.
# Uses the official SDK ujeebu-python 0.1.5: pip install ujeebu-python==0.1.5
# Run: UJEEBU_API_KEY=your_key python3 drugs_article_sdk.py

import json
import os
import sys

import requests
from ujeebu_python import UjeebuClient

API_KEY = os.environ.get("UJEEBU_API_KEY")
URL = "https://www.drugs.com/metformin.html"
PARAMS = {}  # a query string: booleans as "true"

if not API_KEY:
    sys.exit("Set the UJEEBU_API_KEY environment variable.")

client = UjeebuClient(api_key=API_KEY)
try:
    response = client.extract(URL, params=PARAMS)
except requests.RequestException as error:
    sys.exit(f"Request failed: {error}")
if response.status_code != 200:
    try:
        message = response.json().get("message", response.text)
    except ValueError:
        message = response.text
    sys.exit(f"HTTP {response.status_code}: {str(message)[:300]}")
print(f"Ujb-Credits: {response.headers.get('Ujb-Credits')}", file=sys.stderr)
article = response.json()["article"]
print(article.get("title"))
print(article.get("author"), article.get("pub_date"))
print((article.get("text") or "")[:500])
# every field: print(json.dumps(article, indent=2, ensure_ascii=False))

SDK tabs use the official Ujeebu SDKs (ujeebu-python 0.1.5, @ujeebu-org/ujeebu-sdk 0.1.2, github.com/ujeebu/ujeebu-go v0.1.8); there is no PHP SDK, so the PHP tab calls the API with curl. For agents and scripts, the same status and settings are at /scrape/drugs.json.

Try it yourself

Run this on Drugs.com with your own key

Get a free API key, set UJEEBU_API_KEY and run any script above as it is. 5,000 free credits for 21 days, no card.

Settings that work today

From our health checks over the last 7 days: the cheapest settings that return the real page most of the time.

Endpoint/scrape
jstrue
Costup to 5 credits a request (only HTTP 200 and 404 are billed; blocked, timed-out and failed requests are free)

Collect detail page URLs from listing pages first, then fetch each detail page. Our checks run with JavaScript rendering on (js=true): keep it on.

Try it in the Playground

What people build with Drugs.com data

  • Research datasetsBuild datasets of public pages for analysis, search or LLM pipelines.More on this use case

Limits and etiquette

  • Public pages only. Pages behind a login, and data shown only to signed-in users, are out of scope.
  • Keep the rate modest: fetch pages one after another or with low concurrency, and cache what you already have.
  • robots.txt of www.drugs.com (read 2026-12-03): public pages allowed for generic crawlers; no crawl delay set.
  • Read Drugs.com's terms of service before you collect data at scale, and do not collect personal data you have no basis to process. This guide is not legal advice.

Questions

Can you scrape Drugs.com with Ujeebu?

Yes. 7 of 7 checks of public Drugs.com pages passed in the last 7 days with the settings on this page.

Which settings work for Drugs.com?

Call /scrape with js=true.

How many credits does a Drugs.com request cost?

With these settings a request costs up to 5 credits. Only responses with HTTP 200 or 404 are billed: a blocked or timed-out request is free.

How do I get the full text of Drugs.com articles?

Send the article URL to the Extract API (GET /extract?url=<article>). It returns the title, author, publication and update dates, the full text and HTML, the images and the site name as JSON, with no rules to write: 5 credits an article. Only successful responses are billed.

Is it allowed to scrape Drugs.com?

Its robots.txt allows generic crawlers on the page types in this guide. Collect public pages only, read Drugs.com's terms of service, keep your request rate modest and do not collect personal data you have no basis to process. This is not legal advice.

How fresh is this page?

The status and settings come from our own health checks of drugs.com, which run around the clock. Last check: 2026-12-03 23:02:43 UTC; last pass: 2026-12-03 23:02:43 UTC.