Discover/PharmData API
live

PharmData APIpharmdata.co.uk

Access UK pharmacy dispensing stats, NHS service data, EPS nominations, MHRA drug safety alerts, and LPC rankings via the PharmData API.

Endpoint health
verified 4d ago
get_areas
list_mhra_alerts
get_area_leaderboard
get_mhra_alert_detail
search
7/7 passing latest checkself-healing
Endpoints
8
Updated
26d ago

What is the PharmData API?

The PharmData API provides 8 endpoints covering UK pharmacy profiles, NHS dispensing trends, and MHRA safety alerts sourced from PharmData.co.uk. The get_pharmacy_detail endpoint returns monthly items-dispensed trends, EPS nomination counts, prescription sources, and service reports (Flu, COVID, TSP) for any individual pharmacy identified by its ODS/NACS code. National chain performance, area leaderboards, and LPC rankings are also available.

Try it
Search keyword — pharmacy name, UK postcode, or ODS code.
api.parse.bot/scraper/ec6a96d0-fd3d-4100-bfc2-07a4720d908d/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/ec6a96d0-fd3d-4100-bfc2-07a4720d908d/search?query=SW1A' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace pharmdata-co-uk-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

from parse_apis.pharmdata_api import PharmData, Pharmacy, Area, Alert, AlertDetail, LeaderboardEntry, Trend

client = PharmData()

# Search for pharmacies by postcode
for pharmacy in client.pharmacies.search(query="SW1A"):
    print(pharmacy.name, pharmacy.nacs, pharmacy.address, pharmacy.relevance)

# Get detailed profile for a specific pharmacy
profile = client.pharmacy(nacs="FFF12").profile.get()
print(profile.nacs, profile.items_data, profile.flu_report)

# List all NHS areas and get the leaderboard for one
for area in client.areas.list():
    print(area.name)

# Get leaderboard for a specific area
for entry in client.area(name="Community Pharmacy Essex").leaderboard.list():
    print(entry.name, entry.nacs, entry.items_dispensed)

# Get national dispensing trends
trends = client.trends.get()
print(trends.multiples_performance, trends.global_trends)

# List MHRA alerts and get details for one
for alert in client.alerts.list():
    print(alert.title, alert.date)
    detail = alert.detail.get()
    print(detail.content, detail.mhra_url)
All endpoints · 8 totalmissing one? ·

Full-text search for pharmacies, GP surgeries, and dispensing doctors by name, postcode, or ODS code. Returns results ordered by relevance score. Each result includes a type indicator, name, NACS code, address, and relevance score. Use the NACS code from results to fetch detailed pharmacy profiles via get_pharmacy_detail.

Input
ParamTypeDescription
queryrequiredstringSearch keyword — pharmacy name, UK postcode, or ODS code.
Response
{
  "type": "object",
  "fields": {
    "results": "array of matching locations with type, name, nacs, address, and relevance score"
  },
  "sample": {
    "data": {
      "results": [
        {
          "nacs": "FFF12",
          "name": "DR HARRIS & CO CHEMISTS",
          "type": "mortar-pestle",
          "address": "29 ST JAMES'S STREET, SW1A 1HB",
          "relevance": 15.08
        }
      ]
    },
    "status": "success"
  }
}

About the PharmData API

Pharmacy Search and Profiles

The search endpoint accepts a name, postcode, or ODS code as query and returns an array of matching pharmacies, GP surgeries, and dispensing doctors, each with a nacs code, address, type, and relevance score. That nacs code is the key input for get_pharmacy_detail, which returns a full profile including items_data (monthly dispensing volume trend), eps_nominations, nearest_pharmacies, prescription_sources, and flu_repo service report data. This makes it straightforward to build per-site performance dashboards or compare a pharmacy against its local competitors.

National Trends and Area Leaderboards

get_national_stats returns two top-level fields: global_trends (national NHS dispensing percentage arrays) and multiples_performance (chain-level arrays covering major pharmacy groups such as Boots, Lloyds, and Well). For regional analysis, get_areas lists all available NHS Area Teams and LPCs by name. Passing one of those names to get_area_leaderboard returns a ranked list of pharmacies in that area with each entry showing name, nacs, and items_dispensed. The get_lpc_ranking endpoint extends this with KPI-level ranking — for example, Pharmacy First consultation volumes — and accepts optional kpi and month (YYYY-MM-DD) parameters.

MHRA Drug Safety Alerts

list_mhra_alerts returns all current MHRA alerts and recalls as an array, each with title, alert_id, date, and response_deadline. Passing an alert_id to get_mhra_alert_detail retrieves the full alert including a content text summary and, where available, an mhra_url linking directly to the source article on the MHRA website. This makes it practical to pipe drug safety notices into internal compliance workflows or pharmacy management systems without manually monitoring the MHRA website.

Reliability & maintenanceVerified

The PharmData API is a managed, monitored endpoint for pharmdata.co.uk — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when pharmdata.co.uk changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official pharmdata.co.uk API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
4d ago
Latest check
7/7 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Track monthly items-dispensed trends for individual pharmacies using items_data from get_pharmacy_detail.
  • Build a regional pharmacy leaderboard by combining get_areas and get_area_leaderboard to rank sites by dispensing volume.
  • Monitor MHRA drug recalls and response deadlines with list_mhra_alerts and alert to relevant staff before response_deadline passes.
  • Compare EPS nomination counts across competing pharmacies in a local area to inform site acquisition decisions.
  • Benchmark national pharmacy chain performance using multiples_performance data from get_national_stats.
  • Power a Pharmacy First service dashboard by pulling LPC rankings via get_lpc_ranking filtered by KPI code and month.
  • Cross-reference a pharmacy's prescription sources with its flu and COVID service reports for contract compliance reporting.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does PharmData.co.uk have an official developer API?+
PharmData.co.uk does not publish an official developer API or documentation portal. This Parse API surfaces the same data available on the PharmData website in a structured, programmable form.
What does `get_pharmacy_detail` return beyond basic address information?+
It returns a full profile object for one pharmacy identified by its nacs code. Fields include items_data (a monthly dispensing trend array), eps_nominations, nearest_pharmacies, prescription_sources, and flu_repo (Flu, COVID, and TSP service report data). It does not return raw prescription line-level data or patient identifiers.
Does the API cover GP surgery dispensing data, not just pharmacies?+
The search endpoint returns GP surgeries and dispensing doctors alongside pharmacies. However, the detailed profile endpoint (get_pharmacy_detail) is scoped to pharmacies, and dedicated GP-level dispensing breakdowns are not currently exposed. You can fork this API on Parse and revise it to add a GP-detail endpoint if that coverage is needed.
Is historical dispensing data available for past years, or only recent months?+
The items_data field in get_pharmacy_detail reflects the trend data PharmData publishes, which covers recent monthly periods. There is no parameter to request a specific historical date range. If you need deeper historical archives, you can fork this API on Parse and revise it to target the relevant historical data pages.
What does `get_lpc_ranking` return, and how granular is the KPI filtering?+
It returns an array of LPC rankings for a given KPI code (for example, Pharmacy First consultation volumes) and an optional month in YYYY-MM-DD format. The available KPI codes correspond to NHS service metrics published by PharmData. If a specific KPI code is not passed, the endpoint returns its default ranking set. The full enumeration of valid KPI codes is not documented inline — test against the get_areas output for valid area names, and consult PharmData's published service categories for KPI codes.
Page content last updated . Spec covers 8 endpoints from pharmdata.co.uk.
Related APIs in HealthcareSee all →
drugs.com API
Search for drugs and pill identifications, get detailed information about FDA approvals and drug interactions, and find medications by condition or letter. Look up side effects, dosages, and potential drug interactions to make informed health decisions.
apollo247.com API
Search and compare medicines, view detailed product information, discover lab tests, and locate nearby Apollo 24|7 pharmacy stores. Browse medical specialties and popular diagnostic services to plan your healthcare needs in one convenient platform.
chemistwarehouse.co.nz API
Search for medications and health products at Chemist Warehouse NZ, browse categories, view detailed product information, and find nearby store locations. Get access to product pricing, descriptions, and store addresses all in one place.
blinkhealth.com API
Find affordable medications by comparing prices across pharmacies, viewing available formulations, and locating nearby participating locations. Search drugs, discover generic alternatives, and check preferred drug lists to save money on prescriptions.
dischem.co.za API
Search for pharmacy products and retrieve detailed information including prices, descriptions, and images directly from Dis-Chem's catalog. Browse product listings and access complete product details all in one place.
docmorris.de API
Search and browse products from DocMorris.de to compare pricing, read customer reviews, and find current discounts. Look up specific products by name or pharmaceutical number (PZN) to retrieve detailed information, real-time pricing, and availability data.
fahorro.com API
Search and browse Farmacias del Ahorro's pharmacy product catalog to find medications, health products, and promotions with detailed information including prices, availability, and product specifications. Filter products by category, brand, and apply advanced search to discover deals and exclusive Marca Propia items.
medex.com.bd API
Access data from medex.com.bd.