{
  "openapi": "3.0.1",
  "info": {
    "title": "GOC Optician & Optometrist Register Scraper",
    "description": "Search the General Optical Council's Specialist Register (str.optical.org) for UK optometrists, dispensing opticians, students and optical businesses - by name, exact GOC number, specialty, company or postcode radius, with practice addresses and FTP decision documents.",
    "version": "2.0",
    "x-build-id": "UvNLj8gOebSn7KfpY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nimbryxo-studio~goc-optician-and-optometrist-register-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nimbryxo-studio-goc-optician-and-optometrist-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/nimbryxo-studio~goc-optician-and-optometrist-register-scraper/runs": {
      "post": {
        "operationId": "runs-sync-nimbryxo-studio-goc-optician-and-optometrist-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/nimbryxo-studio~goc-optician-and-optometrist-register-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-nimbryxo-studio-goc-optician-and-optometrist-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": "What do you want to collect?",
            "enum": [
              "registrant",
              "bodyCorporate",
              "byGocNumber",
              "allBusinesses"
            ],
            "type": "string",
            "description": "Choose the task. `registrant` searches individuals by name, register type, specialty, address, postcode, or GOC number. `bodyCorporate` searches registered businesses. `byGocNumber` checks a list of exact GOC numbers and detects registrants vs businesses automatically. `allBusinesses` exports the full registered-business list (~3,000 records).",
            "default": "registrant"
          },
          "surnames": {
            "title": "Surnames (one or more)",
            "type": "array",
            "description": "One or more surnames to search. Each surname runs its own search and results are merged without duplicates. Leave empty if you search by company, register type, specialty, address, postcode, or GOC number instead. Latin-script values only: the GOC search ignores non-Latin text.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "forename": {
            "title": "First name contains",
            "type": "string",
            "description": "Optional first-name filter applied to every surname search in registrant mode.",
            "default": ""
          },
          "soundsLikeSurname": {
            "title": "Sounds-like surname matching",
            "type": "boolean",
            "description": "Match surnames phonetically (e.g. 'Smyth' also finds 'Smith') instead of as a literal substring.",
            "default": false
          },
          "registerType": {
            "title": "Registered as",
            "enum": [
              "",
              "Optometrist",
              "Dispensing Optician",
              "Student Optometrist",
              "Student Dispensing Optician",
              "Dispensing Optician, Student Optometrist",
              "Student Dispensing Optician, Student Optometrist"
            ],
            "type": "string",
            "description": "Restrict registrant searches to one registration category.",
            "default": ""
          },
          "speciality": {
            "title": "Specialty",
            "enum": [
              "",
              "Additional supply",
              "Contact lens",
              "Independent prescribing",
              "Supplementary prescribing"
            ],
            "type": "string",
            "description": "Restrict registrant searches to one specialty annotation.",
            "default": ""
          },
          "addresses": {
            "title": "Address or town contains (one or more)",
            "type": "array",
            "description": "One or more address, town, or postcode-area text searches for registrant mode. Each value runs its own search and results are merged. Latin-script values only.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "companyNames": {
            "title": "Company names (one or more)",
            "type": "array",
            "description": "One or more optical-business names to search in bodyCorporate mode. Each value runs its own search and results are merged. Latin-script values only.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "gocNumbers": {
            "title": "GOC number(s)",
            "type": "array",
            "description": "Exact GOC registration numbers, e.g. 01-12294, D-9396, SO-44231, CO-4310. In byGocNumber mode this is the whole lookup list (registrants and businesses can be mixed). Missing hyphens, lowercase, and a missing leading zero are normalised. In search modes the numbers are combined (AND) with the other filters.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "postcode": {
            "title": "Postcode for a distance search",
            "type": "string",
            "description": "UK postcode or outward code (SW1A 1AA or EH1) used with radiusMiles. Works for registrant and business searches. Only real postcodes return results.",
            "default": ""
          },
          "radiusMiles": {
            "title": "Distance radius (miles)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Distance in miles from the postcode. Only used when postcode is set.",
            "default": 50
          },
          "sortBy": {
            "title": "Sort order (registrant searches)",
            "enum": [
              "",
              "Registrant Surname (a - z)",
              "Registrant Surname (z - a)"
            ],
            "type": "string",
            "description": "Sort registrant results by surname. The GOC register ignores this for business searches.",
            "default": ""
          },
          "fetchDetails": {
            "title": "Fetch full profile details",
            "type": "boolean",
            "description": "Visit each result's detail page to capture qualifications, town, every practice address, postcodes, and FTP decision documents. Slower and dependent on the GOC's flaky detail pages; disable for a fast list-only run. Ignored in allBusinesses mode, which is always list-only.",
            "default": true
          },
          "maxDetailedItems": {
            "title": "Maximum records with full details",
            "minimum": 1,
            "maximum": 3000,
            "type": "integer",
            "description": "Only used when fetchDetails is on. The first N records are enriched; the rest are emitted with list-level fields. Keep this modest for large runs. Ignored in allBusinesses mode.",
            "default": 2000
          },
          "maxItems": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 25000,
            "type": "integer",
            "description": "Hard cap on records emitted across all searches. The registrant register is about 33,359 rows at 5 per page, so a complete registrant export cannot finish in one default run. The full business register is about 2,973 rows and allBusinesses is list-only.",
            "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}