Uk Nhs Organisation Ods Directory Scraper avatar

Uk Nhs Organisation Ods Directory Scraper

Pricing

from $2.99 / 1,000 results

Go to Apify Store
Uk Nhs Organisation Ods Directory Scraper

Uk Nhs Organisation Ods Directory Scraper

This Actor collects official UK healthcare organisation records from the NHS Organisation Data Service (ODS), including GP practices, trusts, hospitals, and pharmacies. It extracts ODS codes, statuses, addresses, regions, and parent trusts to support healthtech prospecting, provider verification

Pricing

from $2.99 / 1,000 results

Rating

0.0

(0)

Developer

Zoro

Zoro

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Categories

Features

Limited permissions

Share

UK NHS Organisation (ODS) Directory Scraper — Pharmacies, GPs and NHS Trusts

UK NHS Organisation (ODS) Directory Scraper cover

Collect organisation records from the UK NHS Organisation Data Service (ODS) directory. Search organisations by name, filter by primary role, or retrieve a specific organisation using its ODS code. Export structured records containing organisation names, codes, status, postcodes, role information, and directory links in JSON, CSV, Excel, and other supported formats.

Features

  • Organisation search: Find NHS organisations using a name or text fragment.
  • Role-based filtering: Collect organisations by primary role, including pharmacies and other organisation types.
  • Organisation lookup: Retrieve a specific organisation using its ODS code.
  • Status filtering: Filter list results by active or inactive status.
  • Postcode filtering: Narrow list results using a postcode.
  • Organisation details: Optionally retrieve additional details for each organisation.
  • Structured records: Collect organisation identifiers, classifications, role descriptions, and change dates.
  • Duplicate prevention: Deduplicate records using their organisation codes.
  • Flexible exports: Save results as JSON, CSV, Excel, and other supported Apify dataset formats.

Collection Modes

ModeDescription
searchSearch organisations by name.
by_roleFind organisations using a primary role code.
orgRetrieve a specific organisation using its ODS code.

Input Parameters

ParameterTypeRequiredDefaultDescription
modestringNosearchCollection mode: search, by_role, or org.
namestringNopharmacyOrganisation name or text fragment for search mode.
postCodestringNoEmptyOptional postcode filter for list modes.
primaryRoleIdstringNoRO182Primary role code for role-based collection.
statusstringNoActiveOrganisation status filter: active or inactive.
orgIdstringNoRR8ODS organisation code for organisation lookup mode.
fetchDetailsbooleanNofalseRetrieve additional details for each organisation in list results.
maxItemsintegerNo100Maximum number of organisation records to collect. Maximum: 1,000.
requestDelayMsintegerNo500Delay between collection requests in milliseconds.

Example Input

{
"mode": "search",
"name": "pharmacy",
"status": "Active",
"maxItems": 50,
"requestDelayMs": 500
}
{
"mode": "by_role",
"primaryRoleId": "RO182",
"status": "Active",
"maxItems": 100
}

Single Organisation Lookup

{
"mode": "org",
"orgId": "RR8",
"fetchDetails": true
}

Extracted Data

The scraper collects the following organisation information:

FieldDescription
NameOrganisation name.
OrgIdUnique ODS organisation code.
StatusOrganisation status, such as Active or Inactive.
OrgRecordClassOrganisation record classification.
PostCodeOrganisation postcode.
LastChangeDateDate the organisation record was last changed.
PrimaryRoleIdPrimary organisation role code.
PrimaryRoleDescriptionDescription of the primary organisation role.
OrgLinkLink to the organisation's directory record.
scrapedAtTimestamp indicating when the record was collected.

The dataset overview includes key fields such as Name, OrgId, Status, OrgRecordClass, PostCode, LastChangeDate, and PrimaryRoleId.

Example Output

{
"Name": "THE GREEN PHARMACY ANNEXE",
"OrgId": "5AH10",
"Status": "Inactive",
"OrgRecordClass": "RC2",
"PostCode": "CO7 8PJ",
"LastChangeDate": "2013-05-08",
"PrimaryRoleId": "RO180",
"PrimaryRoleDescription": "PRIMARY CARE TRUST SITE",
"OrgLink": "https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/5AH10",
"scrapedAt": "2026-10-26T00:00:00+00:00"
}

Use Cases

  • Pharmacy directories: Collect pharmacy organisation records and postcodes for research and mapping.
  • GP and trust research: Find NHS organisations by name or retrieve known organisation codes.
  • Organisation lookup: Retrieve information about a specific NHS organisation.
  • Directory synchronisation: Refresh organisation status and record change dates.
  • Healthcare research: Build structured datasets of NHS organisation types and primary roles.
  • Dataset exports: Prepare organisation records for spreadsheets, dashboards, and data analysis.

FAQ

What types of organisations can I collect?

You can search for pharmacies, GP-related organisations, trusts, and other organisations available in the ODS directory.

What is an ODS organisation code?

An ODS code is an identifier used to distinguish an organisation in the NHS Organisation Data Service directory.

Can I search by postcode?

Yes. Use postCode to filter list-mode results.

Can I retrieve additional organisation details?

Yes. Enable fetchDetails to request additional details for organisations returned by list modes.

How many organisations can I collect?

You can configure maxItems up to 1,000 records per run.

What export formats are supported?

You can export results as JSON, CSV, Excel, and other supported Apify dataset formats.

Can I schedule recurring collections?

Yes. Use Apify Schedules to refresh organisation records automatically at your preferred intervals.

Collecting information that is already public is generally legal. There is no single law that bans all forms of web scraping. The limits are the usual ones: do not break into accounts, do not take private or confidential data, and be careful with personal data and copyrighted works. A site's terms can also restrict how you access it. Facts such as a public name, price, or rating are not the same as republishing someone's article or photo.

This actor collects information from public pages. It does not log in and it does not bypass access controls.

For a longer explanation, see Apify's article Is web scraping legal?.