{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Optician Register Scraper",
    "description": "Search the General Optical Council's public Specialist Register (str.optical.org) for registered UK optometrists, dispensing opticians, students, and optical businesses - by name, GOC number, specialty, or postcode radius.",
    "version": "1.0",
    "x-build-id": "SNQEk09lWqIvZ6I2o"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~uk-optician-register-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-uk-optician-register-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/crawlerbros~uk-optician-register-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-uk-optician-register-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/crawlerbros~uk-optician-register-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-uk-optician-register-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "registrant",
              "bodyCorporate"
            ],
            "type": "string",
            "description": "Search individual registrants (optometrists/dispensing opticians) or registered optical businesses (body corporates).",
            "default": "registrant"
          },
          "surname": {
            "title": "Surname contains (mode=registrant)",
            "type": "string",
            "description": "Filter registrants whose surname contains this text. Case-insensitive, matches anywhere in the surname.",
            "default": "Smith"
          },
          "soundsLikeSurname": {
            "title": "Sounds-like surname match (mode=registrant)",
            "type": "boolean",
            "description": "When enabled, `surname` is matched phonetically (e.g. 'Smyth' also matches 'Smith') instead of as a literal substring.",
            "default": false
          },
          "forename": {
            "title": "First name (mode=registrant)",
            "type": "string",
            "description": "Filter registrants by first name (contains match).",
            "default": ""
          },
          "registerType": {
            "title": "Registered as (mode=registrant)",
            "enum": [
              "",
              "Optometrist",
              "Dispensing Optician",
              "Student Optometrist",
              "Student Dispensing Optician",
              "Dispensing Optician, Student Optometrist",
              "Student Dispensing Optician, Student Optometrist"
            ],
            "type": "string",
            "description": "Restrict to a specific registration category.",
            "default": ""
          },
          "speciality": {
            "title": "Specialty (mode=registrant)",
            "enum": [
              "",
              "Additional supply",
              "Contact lens",
              "Independent prescribing",
              "Supplementary prescribing"
            ],
            "type": "string",
            "description": "Restrict to registrants holding a specific specialty annotation.",
            "default": ""
          },
          "address": {
            "title": "Address contains (mode=registrant)",
            "type": "string",
            "description": "Filter registrants by address text (contains match).",
            "default": ""
          },
          "sortBy": {
            "title": "Sort order (mode=registrant)",
            "enum": [
              "",
              "Registrant Surname (a - z)",
              "Registrant Surname (z - a)"
            ],
            "type": "string",
            "description": "Sort registrant results by surname.",
            "default": ""
          },
          "companyName": {
            "title": "Company name contains (mode=bodyCorporate)",
            "type": "string",
            "description": "Filter optical businesses whose registered name contains this text.",
            "default": ""
          },
          "gocNumbers": {
            "title": "GOC number(s)",
            "type": "array",
            "description": "Exact-match one or more GOC registration numbers (e.g. `01-12294` for a registrant or `CO-4310` for a business). Overrides name-based search when provided.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "postcode": {
            "title": "Postcode (geography search)",
            "type": "string",
            "description": "UK postcode to search around. Combined with `radiusMiles`. Works for both registrants and businesses.",
            "default": ""
          },
          "radiusMiles": {
            "title": "Radius in miles (geography search)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Distance in miles from `postcode` to search within. Only used when `postcode` is set.",
            "default": 50
          },
          "fetchDetails": {
            "title": "Fetch full profile details",
            "type": "boolean",
            "description": "Visit each registrant/business detail page to also capture qualifications, town, practice address, and fitness-to-practise decisions. Slower but much richer records. Disable for a faster, list-only run.",
            "default": true
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Hard cap on the number of records returned.",
            "default": 50
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}