---
title: "Pharmaceutical data scraping"
description: "Pharmaceutical data from pharmacy prices, insurer formularies, FDA and EMA approvals and patient forums. Drug price data across pharmacies as JSON."
canonical: https://www.zenrows.com/use-cases/pharmaceutical-data
updated: 2026-10-18
---

# 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.

## Sample output: one drug across pharmacies

```json
{
  "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.

| Job | Data you collect | Typical 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 breaks | What it looks like | How Zenrows handles it |
|---|---|---|
| Price depends on location and quantity | Prices differ by ZIP code, pharmacy and 30 or 90 count | One URL per grid cell; geotargeting per country |
| Pharmacy and discount sites block scripts | Cloudflare challenges, or an empty price element | Adaptive Stealth Mode adds rendering and Zenrows' stealth only when needed |
| Formularies hide behind search tools | Tier shown only after picking plan year and drug | Browser runs the search; the links output filter lists formulary documents |
| One drug, many names | Brand, generic, salt and pack text differ by site | CSS selectors for NDC, strength and form; normalise on your side |
| Forum volume is mostly noise | Thousands of weekly posts, mostly off-product | Markdown output gives clean text to classify |

## 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.

```python Python
# 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())
```

```bash cURL
curl -X POST "https://async.api.zenrows.com/v1/jobs" \
  -H "X-API-Key: YOUR_ZENROWS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "regular",
    "status": "closed",
    "zenrows_params": { "mode": "auto", "extract": "auto" },
    "tasks": [
      { "url": "PHARMACY_A_PRODUCT_URL", "external_id": "atorvastatin-20mg-30-pharmacy-a" },
      { "url": "PHARMACY_B_PRODUCT_URL", "external_id": "atorvastatin-20mg-30-pharmacy-b" }
    ]
  }'
```

```bash CLI
npx -y @zenrows/cli init
# Approval and EPAR pages as Markdown, ready to diff against the last version
zenrows fetch EPAR_PAGE_URL --output markdown --out epar-today.md
# Formulary documents linked from a plan page
zenrows extract PLAN_PAGE_URL --outputs links
```

```text Claude Code (MCP)
# Connect once
claude mcp add zenrows -e ZENROWS_API_KEY=YOUR_ZENROWS_API_KEY -- npx -y @zenrows/mcp

# Then ask:
Use Zenrows to look up atorvastatin 20 mg, 30 tablets, on GoodRx and Cost Plus Drugs
for ZIP code 10001, and return each pharmacy's name and price as a table.
```

## Which Zenrows product fits

| If you need to | Use | Why |
|---|---|---|
| Read a pharmacy product or label page | [Fetch](/products/fetch) | The rendered page from protected pharmacies |
| Get price and pack data without selectors | [Extract](/products/extract) | Structured fields that survive a redesign |
| Price the whole grid every day | [Batch](/products/batch) | Thousands of URLs, one job, an `external_id` per cell |
| Pull approval and EPAR pages into scripts | [CLI](/cli) | One command, a page as Markdown |
| Search a formulary by plan and drug | [Browser](/products/browser) | A real browser for forms and dropdowns |

## What success looks like

| Measure | What good looks like | How 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

### What is pharmaceutical data?

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.

### Where can I get drug price data?

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.

### Is it legal to scrape pharmaceutical data and patient forums?

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.

### Do posts I find on social media count as adverse event reports?

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.

### How do I track FDA and EMA approvals?

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.

### What is formulary data, and how is it collected?

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.

### Can I compare drug prices across countries?

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.

## Related use cases

- [Healthcare data scraping](https://www.zenrows.com/use-cases/healthcare-data-scraping.md): Clinical trials, recalls, hospital prices and research papers from public registries and agency sites, kept current.
- [Healthcare provider data](https://www.zenrows.com/use-cases/healthcare-provider-data.md): Clinician and facility records from payer directories and hospital sites, matched on NPI and re-verified on schedule.
- [Competitor price scraping](https://www.zenrows.com/use-cases/price-scraping.md): Competitor prices, promotions, shipping and stock per SKU from retailers and marketplaces, refreshed on your schedule.
- [Sentiment analysis data](https://www.zenrows.com/use-cases/sentiment-analysis-data.md): Review text with ratings, forum threads and comments, cleaned and labeled for sentiment and NLP models.
- [Regulatory compliance monitoring](https://www.zenrows.com/use-cases/compliance-monitoring.md): Rule changes, enforcement actions and sanctions updates from regulator sites, diffed daily and archived with dates.
- [Insurance data scraping](https://www.zenrows.com/use-cases/insurance-data.md): Competitor quotes, policy terms, rate filings and property risk data, captured per test profile.

Start free: https://app.zenrows.com/register. Docs: https://docs.zenrows.com

## Structured data



<script type="application/ld+json">
{"@context":"https://schema.org","@graph":[{"@type":"WebPage","@id":"https://www.zenrows.com/use-cases/pharmaceutical-data#webpage","url":"https://www.zenrows.com/use-cases/pharmaceutical-data","name":"Pharmaceutical data scraping","description":"Pharmaceutical data from pharmacy prices, insurer formularies, FDA and EMA approvals and patient forums. Drug price data across pharmacies as JSON.","isPartOf":{"@id":"https://www.zenrows.com/#website"},"inLanguage":"en","datePublished":"2026-10-18","dateModified":"2026-10-18","about":{"@type":"Thing","name":"pharmaceutical data"},"keywords":"pharmaceutical data, pharma data scraping, drug price data, drug pricing data, pharmacy price scraping, formulary data, fda approval data, pharmacovigilance social media monitoring","publisher":{"@type":"Organization","name":"Zenrows","url":"https://www.zenrows.com/"}},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://www.zenrows.com/"},{"@type":"ListItem","position":2,"name":"Use cases","item":"https://www.zenrows.com/use-cases"},{"@type":"ListItem","position":3,"name":"Pharmaceutical data scraping","item":"https://www.zenrows.com/use-cases/pharmaceutical-data"}]},{"@type":"FAQPage","@id":"https://www.zenrows.com/use-cases/pharmaceutical-data#faq","mainEntity":[{"@type":"Question","name":"What is pharmaceutical data?","acceptedAnswer":{"@type":"Answer","text":"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."}},{"@type":"Question","name":"Where can I get drug price data?","acceptedAnswer":{"@type":"Answer","text":"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."}},{"@type":"Question","name":"Is it legal to scrape pharmaceutical data and patient forums?","acceptedAnswer":{"@type":"Answer","text":"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."}},{"@type":"Question","name":"Do posts I find on social media count as adverse event reports?","acceptedAnswer":{"@type":"Answer","text":"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."}},{"@type":"Question","name":"How do I track FDA and EMA approvals?","acceptedAnswer":{"@type":"Answer","text":"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."}},{"@type":"Question","name":"What is formulary data, and how is it collected?","acceptedAnswer":{"@type":"Answer","text":"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."}},{"@type":"Question","name":"Can I compare drug prices across countries?","acceptedAnswer":{"@type":"Answer","text":"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."}}]}]}
</script>
