Crawl: the most reliable web crawler APISee what’s new
Zenrows
Talk to sales Start free

Pharmaceutical data scraping

Pharmaceutical data scraping collects drug prices, formulary placement, regulatory approvals and patient-reported signals from public websites. Zenrows fetches pharmacy product pages, formulary tools and FDA or EMA records in each country where prices differ, and returns structured JSON. Batch reruns the full price grid to show every change by pharmacy, pack size and date.

Updated

Sample output: one drug across pharmacies
{
  "drug": "atorvastatin",
  "strength": "20 mg",
  "form": "tablet",
  "ndc": "12345-678-90",
  "quantity": 30,
  "market": "US",
  "observed_at": "2026-10-16",
  "prices": [
    { "pharmacy": "Online pharmacy A", "price": 14.20, "type": "cash", "in_stock": true },
    { "pharmacy": "Retail chain B", "price": 18.99, "type": "cash", "in_stock": true },
    { "pharmacy": "Discount program C", "price": 9.85, "type": "coupon", "in_stock": true }
  ],
  "currency": "USD",
  "formulary": {
    "plan": "Example Health Plan 2026",
    "tier": 1,
    "prior_authorization": false,
    "quantity_limit": "90 per 90 days"
  }
}
Illustrative: one price joined to a formulary entry. NDC, strength and quantity on each row make pharmacies comparable.

What pharmaceutical data teams collect

Market teams want prices, coverage and competitors; safety teams want what patients say.

The sources barely overlap.

JobData you collectTypical sources
Drug price monitoring Cash price, coupon price, pack size, stock status GoodRx, Cost Plus Drugs, CVS, Walgreens, Amazon Pharmacy, DocMorris, Shop Apotheke
Formulary and coverage tracking Tier, prior authorization, step therapy, quantity limits Insurer and PBM formularies, Medicare Plan Finder
Regulatory approvals and labels Approval date, indication, label changes, generic and biosimilar entry Drugs@FDA, Orange Book, Purple Book, EMA EPARs, Health Canada Drug Product Database
Competitor pipeline Phase changes, readouts, partnerships Pipeline pages, press wires, BioSpace, trial registries
Pharmacovigilance signals Side effects, product, dosage, post date Drugs.com and WebMD reviews, patient forums, Reddit health communities
OTC product tracking Price, rating, review count, availability Amazon, Walmart, Boots, pharmacy chains

Why pharma data collection breaks

A price needs strength, quantity, pharmacy and location, and each site shows them differently.

What it looks like

Prices differ by ZIP code, pharmacy and 30 or 90 count

How Zenrows handles it

One URL per grid cell; geotargeting per country

How to collect pharmaceutical data with Zenrows

  1. Build the price grid: drug, strength, quantity, pharmacy and location; one URL per cell.
  2. Name the fields once (price, pack size, NDC, stock), or skip selectors with Extract.
  3. Run the grid as a job in Batch daily, each result stored with cell and date.
  4. Pull regulatory pages as text: approvals, labels and EPARs as Markdown from the CLI, diffed per version.
# pip install requests
import json
import requests

# Example selectors: match them to the pharmacy's product page
fields = {
    "name": "h1",
    "price": ".price",
    "pack_size": ".pack-size",
    "ndc": ".ndc",
    "stock": ".availability",
}
params = {
    "apikey": "YOUR_ZENROWS_API_KEY",
    "url": "PHARMACY_PRODUCT_URL",
    "mode": "auto",
    "proxy_country": "us",
    "css_extractor": json.dumps(fields),
}
response = requests.get("https://api.zenrows.com/v1/", params=params)
print(response.json())

What success looks like

MeasureWhat good looks likeHow to check it
Grid coverage Every cell priced for the day Filled cells over planned cells, per run
Normalisation rate Nearly every row maps to an NDC or your product ID Unmapped rows per pharmacy
Approval lead time FDA approvals and EMA opinions ingested same day Publication against ingestion date
Formulary change capture Tier changes caught the cycle they appear Diff each plan per run
Price freshness Every price from the latest daily run Cells whose newest price is over a day old

Pharmaceutical data FAQ

  • Public web information on medicines: prices, formulary placement, approvals and labels, pipeline news, and what patients and clinicians say. Commercial, market access and safety teams each use a slice.

  • Pharmacy and discount sites: GoodRx, Cost Plus Drugs, CVS, Walgreens, Amazon Pharmacy in the US; DocMorris, Shop Apotheke in Europe. CMS offers NADAC, a weekly survey of pharmacy acquisition costs, free. Retail pages show what patients pay.

  • Prices, formularies and regulatory records are public. Patient posts are special-category health data under GDPR: drop usernames, keep only what you need, check forum terms. HIPAA does not cover patients' own posts; other laws may. Ask your legal team.

  • Your pharmacovigilance team decides. EMA's good pharmacovigilance practice guidance covers digital media screening, and companies document how monitored posts are reviewed. URL and date on each post make that review possible.

  • Drugs@FDA, the Orange Book and openFDA offer downloads and an API. Labels, press releases, EMA committee highlights and EPARs are web pages: fetch as Markdown on a schedule and diff.

  • Which drugs a plan covers, at which tier, with which restrictions (prior authorization, step therapy, quantity limits). Plans publish search tools and PDF or spreadsheet files. Collect the files, run search-only tools in a browser session, diff each plan for tier changes.

  • Yes. Geotargeting requests each market from its country (Germany for German pharmacies, the UK for UK chains) for local prices and currency. Keep market and currency per row; convert in your pipeline, keeping the original.

Turn the live web into usable data.