> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anysite.io/llms.txt
> Use this file to discover all available pages before exploring further.

# /nhs/services/search

> Search NHS service organisations near a UK postcode by service type (GP, dentist, pharmacy, hospital, optician, podiatrist, sexual health, screening and many more), optionally narrowed by attributes such as accepting new patients or open now. Returns each organisation's ODS code, name, type, address, phone, distance, status flags, online registration link (GP) and profile URL, ordered nearest first.

**Price:** 5 credits

**⚠️ Common errors:** 412: Postcode could not be resolved or no services found



## OpenAPI

````yaml /openapi/local-places.json post /api/nhs/services/search
openapi: 3.1.0
info:
  title: Any Site API
  description: >+
    Any Site API provides programmatic access to data from LinkedIn, Instagram,
    Twitter, and other platforms.


    ## Authentication


    All API endpoints require an `access-token` header with a valid API token.
    Tokens can be created in the [dashboard](https://app.anysite.io/).


    ## Pricing


    Each endpoint has a credit cost listed in its description. Credits are
    deducted from your token balance per request.

  version: 0.0.1
servers: []
security:
  - AccessToken: []
paths:
  /api/nhs/services/search:
    post:
      tags:
        - /nhs
      summary: /nhs/services/search
      description: >-
        Search NHS service organisations near a UK postcode by service type (GP,
        dentist, pharmacy, hospital, optician, podiatrist, sexual health,
        screening and many more), optionally narrowed by attributes such as
        accepting new patients or open now. Returns each organisation's ODS
        code, name, type, address, phone, distance, status flags, online
        registration link (GP) and profile URL, ordered nearest first.


        **Price:** 5 credits


        **⚠️ Common errors:** 412: Postcode could not be resolved or no services
        found
      operationId: __api_nhs_services_search_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NhsServicesSearchPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NhsServiceSearchItem'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    NhsServicesSearchPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        service_type:
          $ref: '#/components/schemas/NhsServiceType'
        postcode:
          type: string
          minLength: 1
        filters:
          anyOf:
            - items:
                $ref: '#/components/schemas/NhsServiceFilter'
              type: array
            - type: 'null'
        count:
          type: integer
          minimum: 1
      type: object
      required:
        - service_type
        - postcode
        - count
    NhsServiceSearchItem:
      properties:
        '@type':
          type: string
          default: NhsServiceSearchItem
        id:
          type: string
        name:
          type: string
        org_type_code:
          anyOf:
            - type: string
            - type: 'null'
        address:
          anyOf:
            - type: string
            - type: 'null'
        phone:
          anyOf:
            - type: string
            - type: 'null'
        distance_miles:
          anyOf:
            - type: number
            - type: 'null'
        status:
          items:
            type: string
          type: array
          default: []
        registration_url:
          anyOf:
            - type: string
            - type: 'null'
        detail_url:
          anyOf:
            - type: string
            - type: 'null'
      type: object
      required:
        - id
        - name
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    NhsServiceType:
      type: string
      enum:
        - gp
        - dentist
        - pharmacy
        - hospital
        - nhs_sight_test
        - podiatrist
        - sexual_health_clinic
        - hiv_treatment
        - breast_screening
        - abdominal_aortic_aneurysm_screening
        - diabetic_eye_screening
        - chlamydia_screening
        - sti_testing
        - emergency_contraception
        - free_condoms
        - sexual_health_advice
        - young_people_sexual_health
        - rape_and_sexual_assault_referral
        - drug_treatment
        - drug_addiction_support
        - stop_smoking
        - pals
        - pregnancy_testing
    NhsServiceFilter:
      type: string
      enum:
        - GpAcceptingNewPatients
        - GpAcceptingOutOfAreaPatients
        - PharmacyOpenNow
        - ConsultationRoom
        - CarParking
        - DisabledCarParking
        - StepFreeAccess
        - WheelchairAccess
        - DentistAcceptingChildren
        - DentistAcceptingAdults
        - DentistAcceptingFreeCare
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
        input: {}
        ctx:
          type: object
      type: object
      required:
        - loc
        - msg
        - type
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: API token from the dashboard

````