Uk Nhs Organisation Ods Directory Scraper
Pricing
from $2.99 / 1,000 results
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
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
4 days ago
Last modified
Categories
Features
Share
UK NHS Organisation (ODS) Directory Scraper — Pharmacies, GPs and NHS Trusts

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
| Mode | Description |
|---|---|
search | Search organisations by name. |
by_role | Find organisations using a primary role code. |
org | Retrieve a specific organisation using its ODS code. |
Input Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
mode | string | No | search | Collection mode: search, by_role, or org. |
name | string | No | pharmacy | Organisation name or text fragment for search mode. |
postCode | string | No | Empty | Optional postcode filter for list modes. |
primaryRoleId | string | No | RO182 | Primary role code for role-based collection. |
status | string | No | Active | Organisation status filter: active or inactive. |
orgId | string | No | RR8 | ODS organisation code for organisation lookup mode. |
fetchDetails | boolean | No | false | Retrieve additional details for each organisation in list results. |
maxItems | integer | No | 100 | Maximum number of organisation records to collect. Maximum: 1,000. |
requestDelayMs | integer | No | 500 | Delay between collection requests in milliseconds. |
Example Input
{"mode": "search","name": "pharmacy","status": "Active","maxItems": 50,"requestDelayMs": 500}
Pharmacy Search
{"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:
| Field | Description |
|---|---|
Name | Organisation name. |
OrgId | Unique ODS organisation code. |
Status | Organisation status, such as Active or Inactive. |
OrgRecordClass | Organisation record classification. |
PostCode | Organisation postcode. |
LastChangeDate | Date the organisation record was last changed. |
PrimaryRoleId | Primary organisation role code. |
PrimaryRoleDescription | Description of the primary organisation role. |
OrgLink | Link to the organisation's directory record. |
scrapedAt | Timestamp 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.
Is Web Scraping Legal?
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?.