# NHS API: Search nearby services

> Find nearby NHS service listings from a UK postcode or town, nearest first. NHS service search covers England; urgent_care returns A&E listings. Hours, patient availability and websites are null when not shown.

Unofficial. Not affiliated with or endorsed by NHS.

- Page: https://fous.com/methods/nhs.uk/search-nearby-services
- Method: `nhs.uk/search_nearby_services`, version 1
- Website: nhs.uk
- Returns: name, address, postcode, phone, distance, today's opening hours, new-patient status, website, NHS page link
- Effect: read (it gets data and changes nothing)
- Sign-in: none needed
- Cost: 1 credit per completed run (1¢ with pay as you go); failed runs are free
- Verified: Nov 2, 2026

## Inputs

| Field | Type | Required | In the run below | Description |
|---|---|---|---|---|
| `service` | string | yes | `"pharmacy"` | Service to find, for example pharmacy. One of "gp_surgery", "pharmacy", "dentist", "urgent_care", "hospital", "optician". |
| `location` | string | yes | `"SW1A 1AA"` | UK postcode or town, for example SW1A 1AA or Leeds. |
| `max_results` | integer | no | `3` | Maximum listings to return, for example 10 (up to 50). Default 10. |

## Output

From a run on Oct 31, 2026. Its input:

```json
{
  "service": "pharmacy",
  "location": "SW1A 1AA",
  "max_results": 3
}
```

Its output:

```json
{
  "services": [
    {
      "name": "Boots",
      "phone": "020 7828 6013",
      "address": "5 CATHEDRAL WALK, VICTORIA, LONDON, SW1E 5JH",
      "website": "https://www.boots.com/",
      "postcode": "SW1E 5JH",
      "nhs_page_link": "https://www.nhs.uk/services/pharmacy/boots/XFHV67",
      "distance_miles": 0.3,
      "opening_hours_today": "7:30am to 8pm",
      "accepting_new_patients": null
    },
    {
      "name": "Boots",
      "phone": "020 7834 5792",
      "address": "107 VICTORIA STREET, LONDON, SW1E 6RA",
      "website": "https://www.boots.com/",
      "postcode": "SW1E 6RA",
      "nhs_page_link": "https://www.nhs.uk/services/pharmacy/boots/XFQT75",
      "distance_miles": 0.3,
      "opening_hours_today": "8am to 7pm",
      "accepting_new_patients": null
    },
    {
      "name": "Dolphins Pharmacy",
      "phone": "020 7222 1828",
      "address": "9-11 THE BROADWAY, LONDON, SW1H 0AZ",
      "website": null,
      "postcode": "SW1H 0AZ",
      "nhs_page_link": "https://www.nhs.uk/services/pharmacy/dolphins-pharmacy/XFKE09",
      "distance_miles": 0.4,
      "opening_hours_today": "9am to 5:30pm",
      "accepting_new_patients": null
    }
  ]
}
```

## Run it

From code, with a Fous API key in `FOUS_API_KEY`; the answer's `data` holds the output:

```bash
curl https://api.fous.com/v1/runs \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method":"nhs.uk/search_nearby_services","input":{"service":"pharmacy","location":"SW1A 1AA","max_results":3}}'
```

From an AI agent connected to the Fous MCP server: its `run` with the same method and input. To connect one, give it `set up https://fous.com/SKILL.md`.

## Ask your agent

- Find dentists near LS6 2AB that are currently taking on new NHS patients, closest first
- Which pharmacies close to Bristol are open today? Give me their hours and phone numbers
- List the nearest A&E departments to M14 5RB, up to 5, with distances
- Using nhs.uk, show me 20 GP surgeries near Norwich and whether they're accepting new patients
- I need an optician near SE15 4QF — check the NHS website for the closest ones with addresses and websites

## Input schema

```json
{
  "type": "object",
  "required": [
    "location",
    "service"
  ],
  "properties": {
    "service": {
      "enum": [
        "gp_surgery",
        "pharmacy",
        "dentist",
        "urgent_care",
        "hospital",
        "optician"
      ],
      "type": "string",
      "description": "Service to find, for example pharmacy."
    },
    "location": {
      "type": "string",
      "description": "UK postcode or town, for example SW1A 1AA or Leeds."
    },
    "max_results": {
      "type": "integer",
      "default": 10,
      "maximum": 50,
      "minimum": 1,
      "description": "Maximum listings to return, for example 10 (up to 50)."
    }
  }
}
```

## Output schema

```json
{
  "type": "object",
  "required": [
    "services"
  ],
  "properties": {
    "services": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name",
          "address",
          "postcode",
          "phone",
          "distance_miles",
          "opening_hours_today",
          "accepting_new_patients",
          "website",
          "nhs_page_link"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "website": {
            "type": [
              "string",
              "null"
            ]
          },
          "postcode": {
            "type": [
              "string",
              "null"
            ]
          },
          "nhs_page_link": {
            "type": "string"
          },
          "distance_miles": {
            "type": [
              "number",
              "null"
            ]
          },
          "opening_hours_today": {
            "type": [
              "string",
              "null"
            ]
          },
          "accepting_new_patients": {
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}
```

## See more

- [NHS API: Get medicine guidance](https://fous.com/methods/nhs.uk/get-medicine.md): Looks up a medicine in the NHS medicines A to Z and returns its guidance: uses, key facts, who can take it, how to take it, side effects, pregnancy and interactions. Sections absent from NHS guidance are null; a plain name with separate adult and child pages selects the adult page.
- [NHS API: Get guidance for a health condition](https://fous.com/methods/nhs.uk/get-condition.md): Gets NHS guidance for a named health condition, including symptoms, when to seek help, causes, treatment and prevention. Sections not shown on NHS pages are null; for conditions with several guidance pages, the review date is the latest among the pages used.
- [HHS API: Search healthcare providers](https://fous.com/methods/npiregistry.cms.hhs.gov/search-providers.md): Finds US healthcare providers by name, place, specialty and provider type in the NPI Registry, with practice contact details and primary taxonomy. Results may include providers with similar names.
- [Postcodes.io API: List nearby postcodes](https://fous.com/methods/postcodes.io/list-nearby-postcodes.md): Lists UK postcodes nearest to a postcode or named place, with distance, ward, council and coordinates. For places sharing a name, a city or town is preferred.
- [find-tender.service.gov.uk API: Search UK tenders](https://fous.com/methods/find-tender.service.gov.uk/search-tenders.md): Finds open UK public-sector tender notices on Find a Tender matching keywords, optionally filtered by contract region, estimated value and closing date, newest first.
- [HHS API: Get provider by NPI](https://fous.com/methods/npiregistry.cms.hhs.gov/get-provider.md): Looks up a provider in the NPI Registry by 10-digit NPI number and returns the public name, specialties, addresses, contact details and registry dates.
- [police.uk API: Get neighbourhood policing team by postcode](https://fous.com/methods/police.uk/get-neighbourhood-team.md): Finds the neighbourhood policing team for a UK postcode (England, Wales, Northern Ireland) with its force, contacts, officers, priorities and upcoming events.
- [Starbucks API: Find nearby cafés](https://fous.com/methods/starbucks.com/search-stores.md): Finds Starbucks cafés near a city, address or ZIP code, nearest first, with whether each is open now, today's local hours and amenities; optionally only cafés open now.
- [All NHS methods](https://fous.com/methods/nhs.uk.md)
