{
  "openapi": "3.0.3",
  "info": {
    "title": "CompanyData API",
    "version": "1.0.0",
    "description": "CompanyData API: search and export companies worldwide, plus lookup helpers for exact location names.\n\n**Corporate hierarchies**: export records include Local, National, and Global Headquarter fields. Pass a company's `Global Headquarter ID Number` as `worldwideHeadquarterID` on `/api/company/export` to retrieve every entity in the corporate group. Guide: https://companydata.com/api-docs/use-cases/corporate-structure/\n\n**Authentication**: send your API key in the `x-api-key` header on every request.\n**Rate limit**: 50 requests per second (default). **Monthly quota**: 100,000 requests unless agreed otherwise with support.\n\n**MCP server (AI assistants)**: open-source stdio server for Cursor and Claude Desktop at https://companydata.com/product/mcp-server/ (`company_search`, `company_enrich`, `field_lookup`). Repository: https://github.com/companydatacom/companydata-mcp-server\n\nHuman-readable documentation: https://companydata.com/api-docs/ (see also returned-fields and pagination guides on the docs site).",
    "contact": {
      "name": "CompanyData",
      "url": "https://companydata.com/api-docs/"
    },
    "license": {
      "name": "Commercial",
      "url": "https://companydata.com/company-data-api/"
    }
  },
  "servers": [
    {
      "url": "https://app.companydata.com",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Company",
      "description": "Company search and export"
    },
    {
      "name": "Corporate Structure",
      "description": "Parent-subsidiary relationships and worldwide corporate groups via HQ ID fields and the worldwideHeadquarterID filter. Guide: https://companydata.com/api-docs/use-cases/corporate-structure/"
    },
    {
      "name": "Domain Enrichment",
      "description": "Domain enrichment: download a public web page and extract the registration and VAT numbers and legal names that identify the company behind it via GET /api/website/html, then resolve them with company search. Guide: https://companydata.com/api-docs/domain-enrichment/"
    },
    {
      "name": "Lookup",
      "description": "City name autocomplete via GET /api/cities. Province and region names are exact-match filters on search/export (provinceName, regionName); use values as stored in the database."
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/api/company/search": {
      "get": {
        "operationId": "companySearch",
        "tags": [
          "Company"
        ],
        "summary": "Company search",
        "description": "Search companies by name, address, and filters. Returns a lightweight default field set; additional search fields may be available per agreement with support. Uses **standard pagination only** (no scroll). Search defaults: pageSize 25 (max 50), maximum **50 total records** retrievable across pages.\n\n**Errors**: every failure is signalled by the HTTP status code (400, 401, 403, 405, 429, 500, 503) with a JSON body carrying an `error` string; the only exception is the empty-query 400, which reuses the list envelope with `meta.totalCount` = -1. No failure is ever reported inside a 200 response.",
        "parameters": [
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/pageSize"
          },
          {
            "$ref": "#/components/parameters/ID"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/sic4Digits"
          },
          {
            "$ref": "#/components/parameters/importExportCode"
          },
          {
            "$ref": "#/components/parameters/legalStatus"
          },
          {
            "$ref": "#/components/parameters/statusCode"
          },
          {
            "$ref": "#/components/parameters/subsidiaryCode"
          },
          {
            "$ref": "#/components/parameters/countryCode"
          },
          {
            "$ref": "#/components/parameters/provinceName"
          },
          {
            "$ref": "#/components/parameters/cityName"
          },
          {
            "$ref": "#/components/parameters/streetName"
          },
          {
            "$ref": "#/components/parameters/regionName"
          },
          {
            "$ref": "#/components/parameters/countryName"
          },
          {
            "$ref": "#/components/parameters/postalCode"
          },
          {
            "$ref": "#/components/parameters/postalCodeIntegerMin"
          },
          {
            "$ref": "#/components/parameters/postalCodeIntegerMax"
          },
          {
            "$ref": "#/components/parameters/employeesHereMin"
          },
          {
            "$ref": "#/components/parameters/employeesHereMax"
          },
          {
            "$ref": "#/components/parameters/employeesTotalMin"
          },
          {
            "$ref": "#/components/parameters/employeesTotalMax"
          },
          {
            "$ref": "#/components/parameters/annualSalesMin"
          },
          {
            "$ref": "#/components/parameters/annualSalesMax"
          },
          {
            "$ref": "#/components/parameters/foundingYearsMin"
          },
          {
            "$ref": "#/components/parameters/foundingYearsMax"
          },
          {
            "$ref": "#/components/parameters/phoneNumber"
          },
          {
            "$ref": "#/components/parameters/mobileNumber"
          },
          {
            "$ref": "#/components/parameters/mobileOrPhoneNumber"
          },
          {
            "$ref": "#/components/parameters/email"
          },
          {
            "$ref": "#/components/parameters/worldwideHeadquarterID"
          },
          {
            "$ref": "#/components/parameters/nationalId"
          },
          {
            "$ref": "#/components/parameters/website"
          },
          {
            "$ref": "#/components/parameters/hasEmail"
          },
          {
            "$ref": "#/components/parameters/hasMarketability"
          },
          {
            "$ref": "#/components/parameters/hasPhone"
          },
          {
            "$ref": "#/components/parameters/hasWebsite"
          },
          {
            "$ref": "#/components/parameters/hasNationalID"
          },
          {
            "$ref": "#/components/parameters/hasCEOName"
          },
          {
            "$ref": "#/components/parameters/strictCountry"
          }
        ],
        "responses": {
          "200": {
            "description": "Standard pagination response. Records are under data.records; meta.totalCount is the full result set size and meta.currentPage / meta.totalPages / meta.pageSize describe the page.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanySearchResponse"
                },
                "example": {
                  "meta": {
                    "totalCount": 3,
                    "currentPage": 1,
                    "totalPages": 1,
                    "pageSize": 25
                  },
                  "data": {
                    "records": [
                      {
                        "ID": "330114331",
                        "Company Name": "Heineken N.V.",
                        "Country": "Netherlands",
                        "City": "AMSTERDAM"
                      }
                    ]
                  },
                  "visitor": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/SearchForbidden"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/SearchTooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/SearchInternalError"
          },
          "503": {
            "$ref": "#/components/responses/SearchUnavailable"
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "Search companies in the Netherlands",
            "source": "curl -G \"https://app.companydata.com/api/company/search\" \\\n  -H \"x-api-key: YOUR_API_KEY\" \\\n  --data-urlencode \"countryCode=NL\" \\\n  --data-urlencode \"search=Heineken\" \\\n  --data-urlencode \"page=1\" \\\n  --data-urlencode \"pageSize=25\""
          }
        ]
      }
    },
    "/api/company/export": {
      "get": {
        "operationId": "companyExport",
        "tags": [
          "Company",
          "Corporate Structure"
        ],
        "summary": "Company export",
        "description": "Export companies with the field set included in your subscription. Supports **standard pagination** (max 10,000 records) or **scroll pagination** (unlimited; scroll context expires after 8 minutes). Pass `export=true` as shown in the docs. Use `worldwideHeadquarterID` to retrieve all entities in a corporate group. Guide: https://companydata.com/api-docs/use-cases/corporate-structure/.",
        "parameters": [
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/pageSize"
          },
          {
            "$ref": "#/components/parameters/ID"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/sic4Digits"
          },
          {
            "$ref": "#/components/parameters/importExportCode"
          },
          {
            "$ref": "#/components/parameters/legalStatus"
          },
          {
            "$ref": "#/components/parameters/statusCode"
          },
          {
            "$ref": "#/components/parameters/subsidiaryCode"
          },
          {
            "$ref": "#/components/parameters/countryCode"
          },
          {
            "$ref": "#/components/parameters/provinceName"
          },
          {
            "$ref": "#/components/parameters/cityName"
          },
          {
            "$ref": "#/components/parameters/streetName"
          },
          {
            "$ref": "#/components/parameters/regionName"
          },
          {
            "$ref": "#/components/parameters/countryName"
          },
          {
            "$ref": "#/components/parameters/postalCode"
          },
          {
            "$ref": "#/components/parameters/postalCodeIntegerMin"
          },
          {
            "$ref": "#/components/parameters/postalCodeIntegerMax"
          },
          {
            "$ref": "#/components/parameters/employeesHereMin"
          },
          {
            "$ref": "#/components/parameters/employeesHereMax"
          },
          {
            "$ref": "#/components/parameters/employeesTotalMin"
          },
          {
            "$ref": "#/components/parameters/employeesTotalMax"
          },
          {
            "$ref": "#/components/parameters/annualSalesMin"
          },
          {
            "$ref": "#/components/parameters/annualSalesMax"
          },
          {
            "$ref": "#/components/parameters/foundingYearsMin"
          },
          {
            "$ref": "#/components/parameters/foundingYearsMax"
          },
          {
            "$ref": "#/components/parameters/phoneNumber"
          },
          {
            "$ref": "#/components/parameters/mobileNumber"
          },
          {
            "$ref": "#/components/parameters/mobileOrPhoneNumber"
          },
          {
            "$ref": "#/components/parameters/email"
          },
          {
            "$ref": "#/components/parameters/worldwideHeadquarterID"
          },
          {
            "$ref": "#/components/parameters/nationalId"
          },
          {
            "$ref": "#/components/parameters/website"
          },
          {
            "$ref": "#/components/parameters/hasEmail"
          },
          {
            "$ref": "#/components/parameters/hasMarketability"
          },
          {
            "$ref": "#/components/parameters/hasPhone"
          },
          {
            "$ref": "#/components/parameters/hasWebsite"
          },
          {
            "$ref": "#/components/parameters/hasNationalID"
          },
          {
            "$ref": "#/components/parameters/hasCEOName"
          },
          {
            "$ref": "#/components/parameters/exportFlag"
          },
          {
            "$ref": "#/components/parameters/useScroll"
          },
          {
            "$ref": "#/components/parameters/scrollId"
          }
        ],
        "responses": {
          "200": {
            "description": "Records are always under data.records. With standard pagination meta carries totalCount / currentPage / totalPages / pageSize; with scroll pagination (useScroll=true) meta carries scrollId / hasMoreRecords / recordCount / pageSize instead.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/StandardCompanyListResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ScrollCompanyExportResponse"
                    }
                  ]
                },
                "examples": {
                  "standardPagination": {
                    "summary": "Standard pagination (page + pageSize)",
                    "value": {
                      "meta": {
                        "totalCount": 1250,
                        "currentPage": 1,
                        "totalPages": 13,
                        "pageSize": 100
                      },
                      "data": {
                        "records": [
                          {
                            "ID": "330114331",
                            "Company Name": "Heineken N.V.",
                            "Trade Name": null,
                            "Address 1": "Keizersgracht 424",
                            "City": "AMSTERDAM",
                            "State/Province": "NOORD-HOLLAND",
                            "Country": "Netherlands",
                            "Postal Code": "1016 GC",
                            "Company Registration Number": "33011433",
                            "Company Registration Type Code": "KVK",
                            "Phone Number": "+31201234567",
                            "CEO Name": "Jane Doe",
                            "Business Category": "Computer Programming Services",
                            "Business Category Code 1": "7371",
                            "Employees Total": "50",
                            "Location Type": "0",
                            "Subsidiary Code": "0",
                            "Global Headquarter ID Number": "330114331",
                            "Global Headquarter Company Name": "Heineken N.V.",
                            "Number of Companies in Group": "1",
                            "Website": "https://companydata.com",
                            "Email": "info@companydata.com"
                          }
                        ]
                      }
                    }
                  },
                  "scrollPagination": {
                    "summary": "Scroll pagination (useScroll=true)",
                    "value": {
                      "meta": {
                        "pageSize": 1000,
                        "hasMoreRecords": true,
                        "scrollId": "abc123xyz456",
                        "recordCount": 1
                      },
                      "data": {
                        "records": [
                          {
                            "ID": "330114331",
                            "Company Name": "Heineken N.V.",
                            "Trade Name": null,
                            "Address 1": "Keizersgracht 424",
                            "City": "AMSTERDAM",
                            "State/Province": "NOORD-HOLLAND",
                            "Country": "Netherlands",
                            "Postal Code": "1016 GC",
                            "Company Registration Number": "33011433",
                            "Company Registration Type Code": "KVK",
                            "Phone Number": "+31201234567",
                            "CEO Name": "Jane Doe",
                            "Business Category": "Computer Programming Services",
                            "Business Category Code 1": "7371",
                            "Employees Total": "50",
                            "Location Type": "0",
                            "Subsidiary Code": "0",
                            "Global Headquarter ID Number": "330114331",
                            "Global Headquarter Company Name": "Heineken N.V.",
                            "Number of Companies in Group": "1",
                            "Website": "https://companydata.com",
                            "Email": "info@companydata.com"
                          }
                        ]
                      }
                    }
                  },
                  "corporateGroup": {
                    "summary": "All entities in a corporate group (worldwideHeadquarterID)",
                    "value": {
                      "meta": {
                        "totalCount": 2847,
                        "currentPage": 1,
                        "totalPages": 57,
                        "pageSize": 50
                      },
                      "data": {
                        "records": [
                          {
                            "ID": "407809109",
                            "Company Name": "Shell plc",
                            "City": "LONDON",
                            "Country": "United Kingdom",
                            "Location Type": "1",
                            "Subsidiary Code": "0",
                            "Global Headquarter ID Number": "407809109",
                            "Global Headquarter Company Name": "Shell plc",
                            "Number of Companies in Group": "2847"
                          },
                          {
                            "ID": "407809110",
                            "Company Name": "Shell Nederland B.V.",
                            "City": "THE HAGUE",
                            "Country": "Netherlands",
                            "Location Type": "3",
                            "Subsidiary Code": "3",
                            "Local Headquarter ID Number": "407809109",
                            "Local Headquarter Company Name": "Shell plc",
                            "National Headquarter ID Number": "407809109",
                            "National Headquarter Company Name": "Shell plc",
                            "Global Headquarter ID Number": "407809109",
                            "Global Headquarter Company Name": "Shell plc",
                            "Number of Companies in Group": "2847"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ExportBadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ExportForbidden"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "500": {
            "$ref": "#/components/responses/ExportInternalError"
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "Export with standard pagination",
            "source": "curl -G \"https://app.companydata.com/api/company/export\" \\\n  -H \"x-api-key: YOUR_API_KEY\" \\\n  --data-urlencode \"export=true\" \\\n  --data-urlencode \"countryCode=NL\" \\\n  --data-urlencode \"page=1\" \\\n  --data-urlencode \"pageSize=100\""
          },
          {
            "lang": "curl",
            "label": "Export all entities in a corporate group",
            "source": "curl -G \"https://app.companydata.com/api/company/export\" \\\n  -H \"x-api-key: YOUR_API_KEY\" \\\n  --data-urlencode \"export=true\" \\\n  --data-urlencode \"worldwideHeadquarterID=407809109\""
          }
        ]
      }
    },
    "/api/website/html": {
      "get": {
        "operationId": "downloadWebsiteHtml",
        "tags": [
          "Domain Enrichment"
        ],
        "summary": "Domain enrichment: download a website and extract the company behind it",
        "description": "Fetches a public web page server-side (redirects followed, body capped, SSRF-protected) and returns its HTML. With extract=true it also returns company candidates found in the page: JSON-LD organisation, KVK / Companies House / HRB / VAT identifiers, copyright and legal-suffix names. Pass a candidate nationalId or name to /api/company/search to resolve the website to a registered company. Guide: https://companydata.com/api-docs/domain-enrichment/",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Page to download: a bare domain (coolblue.nl), host with path, or full http(s) URL. Bare domains default to https.",
            "schema": {
              "type": "string",
              "example": "coolblue.nl"
            }
          },
          {
            "name": "extract",
            "in": "query",
            "required": false,
            "description": "Set to true to include the candidates array of company signals found in the page.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "maxBytes",
            "in": "query",
            "required": false,
            "description": "Cap on downloaded bytes. Default 2000000, minimum 10000, maximum 5000000. Larger bodies are cut off and flagged truncated.",
            "schema": {
              "type": "integer",
              "default": 2000000,
              "minimum": 10000,
              "maximum": 5000000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Downloaded page, optionally with extracted company candidates.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "requestedUrl",
                    "finalUrl",
                    "statusCode",
                    "html",
                    "bytes",
                    "truncated",
                    "redirects",
                    "fetchedAt"
                  ],
                  "properties": {
                    "requestedUrl": {
                      "type": "string",
                      "description": "Normalised URL that was fetched first."
                    },
                    "finalUrl": {
                      "type": "string",
                      "description": "URL after following redirects."
                    },
                    "statusCode": {
                      "type": "integer",
                      "description": "HTTP status of the final response."
                    },
                    "contentType": {
                      "type": "string",
                      "nullable": true,
                      "description": "Content-Type header of the final response."
                    },
                    "charset": {
                      "type": "string",
                      "description": "Charset used to decode the body."
                    },
                    "html": {
                      "type": "string",
                      "description": "Page body as text, up to maxBytes."
                    },
                    "bytes": {
                      "type": "integer",
                      "description": "Bytes downloaded."
                    },
                    "truncated": {
                      "type": "boolean",
                      "description": "True when the body exceeded maxBytes and was cut off."
                    },
                    "redirects": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Redirect targets followed, in order."
                    },
                    "fetchedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the page was fetched."
                    },
                    "candidates": {
                      "type": "array",
                      "description": "Only with extract=true. Company signals in trust order, deduplicated, max 12.",
                      "items": {
                        "type": "object",
                        "required": [
                          "source"
                        ],
                        "properties": {
                          "source": {
                            "type": "string",
                            "enum": [
                              "jsonld",
                              "identifier",
                              "copyright",
                              "legal-suffix",
                              "og"
                            ],
                            "description": "Where the signal was found."
                          },
                          "name": {
                            "type": "string",
                            "description": "Company or trade name, when found."
                          },
                          "nationalId": {
                            "type": "string",
                            "description": "Registration or VAT number; search it with nationalId=."
                          },
                          "countryHint": {
                            "type": "string",
                            "description": "ISO 2-letter country inferred from the identifier, JSON-LD address or ccTLD."
                          },
                          "city": {
                            "type": "string",
                            "description": "City from JSON-LD address, when present."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid url (code: invalid_url)."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Host is not public: IP literal, internal name, or resolves to a private address (code: blocked_host)."
          },
          "415": {
            "description": "The URL returned a non-HTML document (code: not_html)."
          },
          "502": {
            "description": "Site unreachable, DNS failure, or more than 5 redirects (code: unreachable, too_many_redirects)."
          },
          "504": {
            "description": "Site did not respond within 10 seconds (code: timeout)."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "Download coolblue.nl and extract company candidates",
            "source": "curl -G \"https://app.companydata.com/api/website/html\" \\\n  -H \"x-api-key: YOUR_API_KEY\" \\\n  --data-urlencode \"url=coolblue.nl\" \\\n  --data-urlencode \"extract=true\""
          }
        ]
      }
    },
    "/api/cities": {
      "get": {
        "operationId": "lookupCities",
        "tags": [
          "Lookup"
        ],
        "summary": "Look up city names",
        "description": "Returns exact cityName values to use with company search/export (cityName requires an exact database value).",
        "parameters": [
          {
            "$ref": "#/components/parameters/lookupSearch"
          },
          {
            "$ref": "#/components/parameters/lookupCountries"
          },
          {
            "$ref": "#/components/parameters/lookupLimit"
          }
        ],
        "responses": {
          "200": {
            "description": "List of matching cities.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "description": "Matching city entries with exact names for use in API filters.",
                      "items": {
                        "type": "object",
                        "required": [
                          "cityName",
                          "countryCode"
                        ],
                        "properties": {
                          "cityName": {
                            "type": "string",
                            "description": "City name as stored in the database (use verbatim in cityName filter)."
                          },
                          "countryCode": {
                            "type": "string",
                            "description": "ISO 2-letter country code for this city entry."
                          }
                        }
                      }
                    },
                    "total": {
                      "type": "integer",
                      "description": "Number of matching lookup results returned in this response."
                    },
                    "limit": {
                      "type": "integer",
                      "description": "Effective limit applied to this lookup request (requested or default)."
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "cityName": "AMSTERDAM",
                      "countryCode": "NL"
                    },
                    {
                      "cityName": "AMSTELVEEN",
                      "countryCode": "NL"
                    }
                  ],
                  "total": 2,
                  "limit": 100
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "Look up city names in the Netherlands",
            "source": "curl -G \"https://app.companydata.com/api/cities\" \\\n  -H \"x-api-key: YOUR_API_KEY\" \\\n  --data-urlencode \"search=Amster\" \\\n  --data-urlencode \"countries=NL\" \\\n  --data-urlencode \"limit=100\""
          }
        ]
      }
    }
  },
  "components": {
    "responses": {
      "BadRequest": {
        "description": "Either the request carried no query parameters at all - the body then reuses the list envelope with meta.totalCount = -1 and an explanatory meta.message, and data.records is empty - or it used a parameter name this endpoint does not have. An unknown name is refused rather than ignored, because a dropped filter would return the whole database as an apparently valid answer and spend a search doing it. The body names each unknown parameter and, where the name is a recognisable near-miss, what to send instead.",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/EmptyQueryResponse"
                },
                {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              ]
            },
            "examples": {
              "emptyQuery": {
                "summary": "No query parameters",
                "value": {
                  "meta": {
                    "totalCount": -1,
                    "message": "Fill in a query to get an estimation"
                  },
                  "data": {
                    "records": []
                  }
                }
              },
              "unknownParameter": {
                "summary": "Parameter name this endpoint does not have",
                "value": {
                  "error": "Unknown parameter",
                  "message": "This endpoint does not have the parameter(s): query.",
                  "unknownParameters": [
                    "query"
                  ],
                  "didYouMean": {
                    "query": "search"
                  },
                  "documentation": "https://companydata.com/api-docs/search"
                }
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "The x-api-key header does not match an existing key (search and export), or no key and no browser session was sent (export). Search without any key or session answers 403 instead.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "invalidApiKey": {
                "summary": "Unknown API key",
                "value": {
                  "error": "Invalid API key"
                }
              },
              "missingCredentials": {
                "summary": "No API key and no session (export only)",
                "value": {
                  "error": "Unauthorized: No token or user found. "
                }
              }
            }
          }
        }
      },
      "MethodNotAllowed": {
        "description": "Only GET (and the CORS preflight OPTIONS) are accepted.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "methodNotAllowed": {
                "summary": "Wrong HTTP method",
                "value": {
                  "error": "Method Not Allowed"
                }
              }
            }
          }
        },
        "headers": {
          "Allow": {
            "description": "Accepted methods for this endpoint.",
            "schema": {
              "type": "string",
              "example": "GET"
            }
          }
        }
      },
      "SearchForbidden": {
        "description": "The credentials were recognised but may not search. For API keys this means the key is disabled or the subscription is inactive; subscriptionStatus carries the subscription state when that is the cause. The remaining cases only apply to browser sessions (no x-api-key): a missing or expired guest session, a failed security check, or a guest or logged-in user asking for a page beyond their allowance (error = PAGINATION_LIMIT).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "apiKeyDisabled": {
                "summary": "API key disabled",
                "value": {
                  "error": "API key is disabled. Please check your subscription status."
                }
              },
              "subscriptionInactive": {
                "summary": "Subscription inactive",
                "value": {
                  "error": "Subscription inactive. Please update your payment method or reactivate your subscription.",
                  "subscriptionStatus": "PAYMENT_FAILED"
                }
              },
              "noGuestSession": {
                "summary": "No x-api-key header and no browser session",
                "value": {
                  "error": "No guest session. Please reload the page."
                }
              },
              "paginationLimit": {
                "summary": "Browser session beyond its page allowance (never returned for API keys)",
                "value": {
                  "error": "PAGINATION_LIMIT",
                  "paginationMessage": "Create an account to paginate through your results.",
                  "visitor": null
                }
              }
            }
          }
        }
      },
      "SearchTooManyRequests": {
        "description": "A quota for the key or its account is exhausted. Which quota applies depends on the contract: the monthly search allowance (searchesUsed / searchesLimit), a manually invoiced request allowance (requestsUsed / requestsLimit), the yearly account request limit, or the monthly limit of a legacy key. Quotas reset with the billing period; retrying sooner returns the same status. The per-IP variant only applies to browser sessions.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "monthlySearchLimit": {
                "summary": "Monthly search allowance used up",
                "value": {
                  "error": "Monthly API search limit exceeded",
                  "searchesUsed": 100000,
                  "searchesLimit": 100000
                }
              },
              "manualInvoiceLimit": {
                "summary": "Manually invoiced request allowance used up",
                "value": {
                  "error": "Rate limit exceeded",
                  "requestsUsed": 100000,
                  "requestsLimit": 100000
                }
              },
              "accountYearlyLimit": {
                "summary": "Yearly request limit of the account reached",
                "value": {
                  "error": "Rate limit exceeded for this year"
                }
              },
              "legacyKeyMonthlyLimit": {
                "summary": "Monthly limit of a key without an account",
                "value": {
                  "error": "Rate limit exceeded for this month, contact support to request more"
                }
              },
              "guestIpLimit": {
                "summary": "Browser session only",
                "value": {
                  "error": "Too many searches from this location. Please register or log in to continue."
                }
              }
            }
          }
        }
      },
      "SearchInternalError": {
        "description": "The search itself failed (for example the search cluster returned an error). Safe to retry with backoff.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "searchFailed": {
                "summary": "Search failed",
                "value": {
                  "error": "Error performing search"
                }
              },
              "visitorRecordFailed": {
                "summary": "Browser session only",
                "value": {
                  "error": "Internal server error checking visitor record."
                }
              }
            }
          }
        }
      },
      "SearchUnavailable": {
        "description": "No search index is currently selected on the server, typically during an index switch. Retry later.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "noMainIndex": {
                "summary": "No main index selected",
                "value": {
                  "error": "Search is temporarily unavailable: no main index is selected."
                }
              }
            }
          }
        }
      },
      "ExportBadRequest": {
        "description": "No query parameters were sent (list envelope with meta.totalCount = -1, see search), a parameter name this endpoint does not have was used, or parentUniqueID was combined with other filters.",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/EmptyQueryResponse"
                },
                {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              ]
            },
            "examples": {
              "emptyQuery": {
                "summary": "No query parameters",
                "value": {
                  "meta": {
                    "totalCount": -1,
                    "message": "Fill in a query to get an estimation"
                  },
                  "data": {
                    "records": []
                  }
                }
              },
              "unknownParameter": {
                "summary": "Parameter name this endpoint does not have",
                "value": {
                  "error": "Unknown parameter",
                  "message": "This endpoint does not have the parameter(s): query.",
                  "unknownParameters": [
                    "query"
                  ],
                  "didYouMean": {
                    "query": "search"
                  },
                  "documentation": "https://companydata.com/api-docs/search"
                }
              },
              "parentUniqueIdWithFilters": {
                "summary": "parentUniqueID combined with other filters",
                "value": {
                  "error": "When parentUniqueID is set, no other filters are allowed. Disallowed parameters: countryCode, cityName"
                }
              }
            }
          }
        }
      },
      "ExportForbidden": {
        "description": "The API key exists but is disabled.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "apiKeyDisabled": {
                "summary": "API key disabled",
                "value": {
                  "error": "API key is disabled. Please check your subscription status."
                }
              }
            }
          }
        }
      },
      "ExportInternalError": {
        "description": "The export failed. Note that the export error body uses message rather than error. Besides genuine server errors this status also carries account and quota failures raised while preparing the export: an unknown API key, an inactive subscription, an exhausted export allowance, or more than 10,000 records requested with standard pagination. The reason is in message.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ExportErrorResponse"
            },
            "examples": {
              "exportFailed": {
                "summary": "Export failed",
                "value": {
                  "message": "E: Error: Error performing export"
                }
              },
              "overLimit": {
                "summary": "Export allowance used up",
                "value": {
                  "message": "Export not allowed, over limit"
                }
              },
              "deepPagination": {
                "summary": "Standard pagination beyond 10,000 records",
                "value": {
                  "message": "The api allows max 10.000 export for the same selection"
                }
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "API key for the CompanyData API. Required on all endpoints."
      }
    },
    "parameters": {
      "page": {
        "name": "page",
        "in": "query",
        "required": false,
        "description": "Page number for standard pagination (starts at 1). Defaults to 1 if omitted. Export: maximum 10,000 records total with standard pagination.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "default": 1
        }
      },
      "pageSize": {
        "name": "pageSize",
        "in": "query",
        "required": false,
        "description": "Records per page. Search: defaults to 25, maximum 50; maximum 50 total records retrievable. Export: defaults to 25; recommended 100-1000 for standard pagination, 1000+ for scroll.",
        "schema": {
          "type": "integer",
          "minimum": 1
        }
      },
      "useScroll": {
        "name": "useScroll",
        "in": "query",
        "required": false,
        "description": "When true, enables scroll (cursor) pagination on export. Use scrollId from the previous response for subsequent requests. Export only.",
        "schema": {
          "type": "boolean"
        }
      },
      "scrollId": {
        "name": "scrollId",
        "in": "query",
        "required": false,
        "description": "Scroll session identifier from the previous export response. Required for subsequent requests when useScroll is true. Scroll context expires after 8 minutes.",
        "schema": {
          "type": "string"
        }
      },
      "exportFlag": {
        "name": "export",
        "in": "query",
        "required": false,
        "description": "Set to true on the export endpoint to receive the field set included in your subscription package.",
        "schema": {
          "type": "boolean"
        }
      },
      "ID": {
        "name": "ID",
        "in": "query",
        "required": false,
        "description": "Filter by company ID.",
        "schema": {
          "type": "string"
        }
      },
      "search": {
        "name": "search",
        "in": "query",
        "required": false,
        "description": "Company name lookup. Matches from the start of the stored name, so a leading word or two is enough (\"Heineken\" finds \"Heineken N.V.\"), but the words must appear in the order they are stored and accents must match (\"Telefonica\" does not find \"Telefónica\"). Common legal forms are interchangeable (BV / B.V., GmbH, Ltd / Limited). Anything else in the name - an extra word, a different word order, a typo - has to match. When the exact search finds nothing the API retries on its own - all words in any order, then the name without its legal form, then (for API keys) the closest spelling and, only with strictCountry=false, the same name in another country - and reports which step answered in meta.warnings. A retry is only accepted while its result set is small, so a common word cannot pass as a match. Tips: search the distinctive part of the name and leave the legal form off; use website= for a domain, nationalId= for a registration number and ID= for a CompanyData ID. A name in a non-Latin alphabet will not match, because names are stored in the Latin alphabet.",
        "schema": {
          "type": "string"
        }
      },
      "sic4Digits": {
        "name": "sic4Digits",
        "in": "query",
        "required": false,
        "description": "4-digit SIC code filter. Comma-separated list supported (e.g. 0111,0115).",
        "schema": {
          "type": "string"
        }
      },
      "importExportCode": {
        "name": "importExportCode",
        "in": "query",
        "required": false,
        "description": "Import/export activity codes: A, B, C, D, E, F, G, H. Comma-separated list supported.",
        "schema": {
          "type": "string"
        }
      },
      "legalStatus": {
        "name": "legalStatus",
        "in": "query",
        "required": false,
        "description": "Legal status / business legal type codes (numeric). Comma-separated list supported. Maps to Business Legal Type in responses.",
        "schema": {
          "type": "string"
        }
      },
      "statusCode": {
        "name": "statusCode",
        "in": "query",
        "required": false,
        "description": "Location type filter for corporate hierarchy: 0 = single location, 1 = headquarter/parent, 2 = branch. Comma-separated list supported. Often use 0,1 to exclude branches when searching. Maps to Location Type in responses. See https://companydata.com/api-docs/use-cases/corporate-structure/",
        "schema": {
          "type": "string"
        }
      },
      "subsidiaryCode": {
        "name": "subsidiaryCode",
        "in": "query",
        "required": false,
        "description": "Subsidiary filter for corporate hierarchy: 0 = not a subsidiary, 3 = is a subsidiary. Comma-separated list supported. Maps to Subsidiary Code in responses. See https://companydata.com/api-docs/use-cases/corporate-structure/",
        "schema": {
          "type": "string"
        }
      },
      "countryCode": {
        "name": "countryCode",
        "in": "query",
        "required": false,
        "description": "ISO 3166-1 alpha-2 country code filter, uppercase. Comma-separated list supported (e.g. AL,BY,NL). Lowercase codes and full country names (\"nl\", \"Netherlands\") are read as the matching code and reported in meta.warnings. A value that is not a country code is kept as a filter and matches nothing, so it is reported too rather than silently widening the search - put the company name in search, not here.",
        "schema": {
          "type": "string"
        }
      },
      "strictCountry": {
        "name": "strictCountry",
        "in": "query",
        "required": false,
        "description": "Search endpoint only. Whether countryCode stays a hard filter when the name search finds nothing. Default true: every retry stays in the countries you sent, and a name that is not there returns 0 rows. Send strictCountry=false to let the last retry search the same name in all countries; rows found that way come with SEARCH_MATCHED_OTHER_COUNTRY in meta.warnings. Your other filters (postalCode, phoneNumber, email, cityName) still apply in that retry, so a postal code from one country can match a company in another.",
        "schema": {
          "type": "boolean"
        }
      },
      "provinceName": {
        "name": "provinceName",
        "in": "query",
        "required": false,
        "description": "State/province name as stored in the database (exact match).",
        "schema": {
          "type": "string"
        }
      },
      "cityName": {
        "name": "cityName",
        "in": "query",
        "required": false,
        "description": "City name as stored in the database (exact match). Use /api/cities lookup for valid values.",
        "schema": {
          "type": "string"
        }
      },
      "streetName": {
        "name": "streetName",
        "in": "query",
        "required": false,
        "description": "Street address; supports prefix (partial) matching from the start of words.",
        "schema": {
          "type": "string"
        }
      },
      "regionName": {
        "name": "regionName",
        "in": "query",
        "required": false,
        "description": "Region or state name as stored in the database (exact match).",
        "schema": {
          "type": "string"
        }
      },
      "countryName": {
        "name": "countryName",
        "in": "query",
        "required": false,
        "description": "Country name as stored in the database (exact match).",
        "schema": {
          "type": "string"
        }
      },
      "postalCode": {
        "name": "postalCode",
        "in": "query",
        "required": false,
        "description": "Postal code, exact match after upper-casing and removing spaces and dashes (\"1016 gc\" matches \"1016GC\"). A US ZIP+4 such as \"41144-6075\" is matched exactly; a five-digit US ZIP such as \"41144\" matches every ZIP+4 inside it. When a ZIP+4 matches no company, its five-digit ZIP is searched instead and reported in meta.warnings as POSTAL_CODE_NORMALISED. Comma-separated list supported.",
        "schema": {
          "type": "string"
        }
      },
      "postalCodeIntegerMin": {
        "name": "postalCodeInteger[min]",
        "in": "query",
        "required": false,
        "description": "Minimum numeric postal code for range filtering (use with postalCodeInteger[max]).",
        "schema": {
          "type": "integer"
        }
      },
      "postalCodeIntegerMax": {
        "name": "postalCodeInteger[max]",
        "in": "query",
        "required": false,
        "description": "Maximum numeric postal code for range filtering (use with postalCodeInteger[min]).",
        "schema": {
          "type": "integer"
        }
      },
      "employeesHereMin": {
        "name": "employeesHere[min]",
        "in": "query",
        "required": false,
        "description": "Minimum employees at this location. Use with employeesHere[max].",
        "schema": {
          "type": "integer"
        }
      },
      "employeesHereMax": {
        "name": "employeesHere[max]",
        "in": "query",
        "required": false,
        "description": "Maximum employees at this location. Use with employeesHere[min].",
        "schema": {
          "type": "integer"
        }
      },
      "employeesTotalMin": {
        "name": "employeesTotal[min]",
        "in": "query",
        "required": false,
        "description": "Minimum total employees in the company. Use with employeesTotal[max].",
        "schema": {
          "type": "integer"
        }
      },
      "employeesTotalMax": {
        "name": "employeesTotal[max]",
        "in": "query",
        "required": false,
        "description": "Maximum total employees in the company. Use with employeesTotal[min].",
        "schema": {
          "type": "integer"
        }
      },
      "annualSalesMin": {
        "name": "annualSales[min]",
        "in": "query",
        "required": false,
        "description": "Minimum annual sales in U.S. dollars. Use with annualSales[max].",
        "schema": {
          "type": "integer"
        }
      },
      "annualSalesMax": {
        "name": "annualSales[max]",
        "in": "query",
        "required": false,
        "description": "Maximum annual sales in U.S. dollars. Use with annualSales[min].",
        "schema": {
          "type": "integer"
        }
      },
      "foundingYearsMin": {
        "name": "foundingYears[min]",
        "in": "query",
        "required": false,
        "description": "Minimum founding year (four-digit). Use with foundingYears[max].",
        "schema": {
          "type": "integer"
        }
      },
      "foundingYearsMax": {
        "name": "foundingYears[max]",
        "in": "query",
        "required": false,
        "description": "Maximum founding year (four-digit). Use with foundingYears[min].",
        "schema": {
          "type": "integer"
        }
      },
      "phoneNumber": {
        "name": "phoneNumber",
        "in": "query",
        "required": false,
        "description": "Company phone number: the landline, or the mobile when the company lists no landline. International format with country code; \"+\", spaces, dashes and underscores are removed before matching, so \"+31 6 1234-5678\" matches the stored \"31612345678\". Local formats (0612345678, 0031612345678) do not match. Comma-separated list supported.",
        "schema": {
          "type": "string"
        }
      },
      "mobileNumber": {
        "name": "mobileNumber",
        "in": "query",
        "required": false,
        "description": "Company mobile number only, same formatting rules as phoneNumber. A company that lists both a landline and a mobile is only found through its mobile with this filter or mobileOrPhoneNumber.",
        "schema": {
          "type": "string"
        }
      },
      "mobileOrPhoneNumber": {
        "name": "mobileOrPhoneNumber",
        "in": "query",
        "required": false,
        "description": "One number matched against both the phone and the mobile field, same formatting rules as phoneNumber. Use it when you do not know which number the company registered.",
        "schema": {
          "type": "string"
        }
      },
      "email": {
        "name": "email",
        "in": "query",
        "required": false,
        "description": "Filter by email address or pattern (e.g. domain or full address).",
        "schema": {
          "type": "string"
        }
      },
      "worldwideHeadquarterID": {
        "name": "worldwideHeadquarterID",
        "in": "query",
        "required": false,
        "description": "Filter by Global Headquarter ID Number to retrieve all entities in a corporate group (HQ, subsidiaries, and branches worldwide). Get the ID from any group member's export record, then pass it here on /api/company/export. Guide: https://companydata.com/api-docs/use-cases/corporate-structure/",
        "schema": {
          "type": "string"
        }
      },
      "nationalId": {
        "name": "nationalId",
        "in": "query",
        "required": false,
        "description": "National company registration number; combine with countryCode when possible. Stored without separators and with letters upper-cased (NL 24147166, GB FC000268, AR 33716282819, BR 51312418000175, ES Q9150013B, IN 27AAACH3235M1ZJ). A value that still carries the spaces, dots, dashes or slashes a registry prints is normalised before the lookup and reported in meta.warnings. Registries that issue more than one kind of identifier are not interchangeable: a German HRB number or an Indian CIN will not match.",
        "schema": {
          "type": "string"
        }
      },
      "website": {
        "name": "website",
        "in": "query",
        "required": false,
        "description": "Company website. Matches the stored URL from the start of the host, with or without \"www.\" and with or without a scheme, so \"aselsan.com\", \"www.aselsan.com\" and \"https://www.aselsan.com/tr\" all find the same company. Use this rather than search when you have a domain: a domain put into search only matches companies whose *name* is that domain.",
        "schema": {
          "type": "string"
        }
      },
      "hasEmail": {
        "name": "hasEmail",
        "in": "query",
        "required": false,
        "description": "If true, only companies with a non-empty Email field.",
        "schema": {
          "type": "boolean"
        }
      },
      "hasMarketability": {
        "name": "hasMarketability",
        "in": "query",
        "required": false,
        "description": "If true, filters for records marked as marketable (internal flag; no direct response field).",
        "schema": {
          "type": "boolean"
        }
      },
      "hasPhone": {
        "name": "hasPhone",
        "in": "query",
        "required": false,
        "description": "If true, only companies with a non-empty Phone Number.",
        "schema": {
          "type": "boolean"
        }
      },
      "hasFax": {
        "name": "hasFax",
        "in": "query",
        "required": false,
        "description": "If true, only companies with a non-empty Fax Number.",
        "schema": {
          "type": "boolean"
        }
      },
      "hasContactPerson": {
        "name": "hasContactPerson",
        "in": "query",
        "required": false,
        "description": "If true, only companies with a non-empty CEO Name.",
        "schema": {
          "type": "boolean"
        }
      },
      "hasWebsite": {
        "name": "hasWebsite",
        "in": "query",
        "required": false,
        "description": "If true, only companies with a non-empty Website.",
        "schema": {
          "type": "boolean"
        }
      },
      "hasNationalID": {
        "name": "hasNationalID",
        "in": "query",
        "required": false,
        "description": "If true, only companies with a Company Registration Number.",
        "schema": {
          "type": "boolean"
        }
      },
      "hasBusinessName": {
        "name": "hasBusinessName",
        "in": "query",
        "required": false,
        "description": "If true, only companies with a non-empty Company Name.",
        "schema": {
          "type": "boolean"
        }
      },
      "hasStreetAddress": {
        "name": "hasStreetAddress",
        "in": "query",
        "required": false,
        "description": "If true, only companies with a non-empty Address 1.",
        "schema": {
          "type": "boolean"
        }
      },
      "hasPostalCode": {
        "name": "hasPostalCode",
        "in": "query",
        "required": false,
        "description": "If true, only companies with a non-empty Postal Code.",
        "schema": {
          "type": "boolean"
        }
      },
      "hasCEOName": {
        "name": "hasCEOName",
        "in": "query",
        "required": false,
        "description": "If true, only companies with a non-empty CEO Name.",
        "schema": {
          "type": "boolean"
        }
      },
      "lookupSearch": {
        "name": "search",
        "in": "query",
        "required": true,
        "description": "Search term for autocomplete-style lookup (partial input allowed).",
        "schema": {
          "type": "string"
        }
      },
      "lookupCountries": {
        "name": "countries",
        "in": "query",
        "required": false,
        "description": "Optional ISO country code to restrict lookup results to one country.",
        "schema": {
          "type": "string"
        }
      },
      "lookupLimit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "description": "Maximum number of lookup results to return. Default 100.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "default": 100
        }
      }
    },
    "schemas": {
      "Executive": {
        "type": "object",
        "description": "One executive record. Only included if at least first name or last name is present. All properties may be null.",
        "properties": {
          "Position": {
            "type": "number",
            "nullable": true,
            "description": "Numeric rank of the executive within the company (1 = most senior)."
          },
          "Title": {
            "type": "string",
            "nullable": true,
            "description": "Job title of the executive (e.g., \"CEO\", \"CFO\", \"Director\")."
          },
          "Title Code": {
            "type": "string",
            "nullable": true,
            "description": "Standardized internal code representing the job title."
          },
          "First Name": {
            "type": "string",
            "nullable": true,
            "description": "Executive's first name."
          },
          "Last Name": {
            "type": "string",
            "nullable": true,
            "description": "Executive's last name."
          },
          "Gender": {
            "type": "string",
            "nullable": true,
            "description": "Gender of the executive (\"Male\" or \"Female\")."
          },
          "Language Preference": {
            "type": "string",
            "nullable": true,
            "description": "ISO locale code indicating the executive's preferred language (see Language Codes in human docs)."
          }
        }
      },
      "CompanyRecord": {
        "type": "object",
        "description": "Single company record. Field availability depends on your package. Values are strings unless noted; many fields may be null or empty when unknown.",
        "additionalProperties": true,
        "properties": {
          "ID": {
            "type": "string",
            "nullable": true,
            "description": "Unique identifier for the company record. Store this to retrieve or reference the company in future requests without re-searching."
          },
          "Company Name": {
            "type": "string",
            "nullable": true,
            "description": "Primary registered name of the company."
          },
          "Trade Name": {
            "type": "string",
            "nullable": true,
            "description": "Alternative or \"doing business as\" (DBA) name the company may operate under."
          },
          "Address Status": {
            "type": "string",
            "nullable": true,
            "description": "Indicates the address type on file. For European records, if only the registered address is available, it is used as the physical address and this field flags that."
          },
          "Address 1": {
            "type": "string",
            "nullable": true,
            "description": "Primary street address (street name and building number)."
          },
          "Address 2": {
            "type": "string",
            "nullable": true,
            "description": "Secondary address details (suite, floor, building name)."
          },
          "City": {
            "type": "string",
            "nullable": true,
            "description": "City of the company location."
          },
          "State/Province": {
            "type": "string",
            "nullable": true,
            "description": "State or province of the company location."
          },
          "Country": {
            "type": "string",
            "nullable": true,
            "description": "Country name in English (e.g., \"Netherlands\", \"United States\")."
          },
          "Postal Code": {
            "type": "string",
            "nullable": true,
            "description": "Postal or ZIP code. Always a string - may contain letters (e.g., \"1016 GC\"). Filter: postalCode (exact), postalCodeInteger (numeric range)."
          },
          "Company Registration Number": {
            "type": "string",
            "nullable": true,
            "description": "Official national registration ID (e.g., Dutch KvK number, UK Companies House number). See Company Registration Type Code for which system applies. Filter: nationalId."
          },
          "Company Registration Type Code": {
            "type": "string",
            "nullable": true,
            "description": "Code identifying the national registration system used (e.g., \"KVK\" for the Netherlands, \"CRO\" for the UK). Use this to determine how to validate or format Company Registration Number."
          },
          "Country Phone Access Code": {
            "type": "string",
            "nullable": true,
            "description": "International dialing prefix without leading + or 00 (e.g., \"31\" for the Netherlands, \"1\" for the US)."
          },
          "Phone Number": {
            "type": "string",
            "nullable": true,
            "description": "Company phone number. US numbers include area code with no punctuation. Filter: phoneNumber, hasPhone."
          },
          "Cable Telex": {
            "type": "string",
            "nullable": true,
            "description": "Legacy cable or telex number. Rarely populated on modern records."
          },
          "Fax Number": {
            "type": "string",
            "nullable": true,
            "description": "Company fax number. Filter: hasFax."
          },
          "CEO Name": {
            "type": "string",
            "nullable": true,
            "description": "Name of the highest-ranking contact at this location. Also available as Position 1 in the Executives array when executive data is enabled on your account. Filter: hasCEOName, hasContactPerson."
          },
          "CEO Title": {
            "type": "string",
            "nullable": true,
            "description": "Title of the CEO or top contact, possibly abbreviated (e.g., \"Pres\", \"Dir\", \"CEO\")."
          },
          "Business Category": {
            "type": "string",
            "nullable": true,
            "description": "Plain-English description of the company's primary activity (e.g., \"Computer Programming Services\")."
          },
          "Business Category Code 1": {
            "type": "string",
            "nullable": true,
            "description": "Primary 4-digit SIC code (1987 U.S. classification system). Filter: sic4Digits."
          },
          "Business Category Code 1 - Description": {
            "type": "string",
            "nullable": true,
            "description": "Description of the primary SIC code (e.g., \"Computer Programming, Data Processing\")."
          },
          "Founding Year": {
            "type": "string",
            "nullable": true,
            "description": "Four-digit year the current ownership took control, or the founding year if no change of control occurred. Not available for branch records. Filter: foundingYears[min] / foundingYears[max]."
          },
          "Yearly Revenue Local Currency": {
            "type": "string",
            "nullable": true,
            "description": "Annual sales in the local currency. See Currency Code for the applicable currency."
          },
          "Yearly Revenue Indicator": {
            "type": "string",
            "nullable": true,
            "description": "Data quality flag for Yearly Revenue Local Currency. \"0\" = actual figure, \"1\" = low-end range estimate, \"2\" = estimated (also used when the revenue value is zero), empty/null = not available."
          },
          "Yearly Revenue in U.S. Dollars": {
            "type": "string",
            "nullable": true,
            "description": "Annual sales in USD. Exchange rate updated once per year. Filter: annualSales[min] / annualSales[max]."
          },
          "Currency Code": {
            "type": "string",
            "nullable": true,
            "description": "ISO 4217 currency code for Yearly Revenue Local Currency (e.g., \"EUR\", \"USD\", \"GBP\")."
          },
          "Employees On Site": {
            "type": "string",
            "nullable": true,
            "description": "Number of employees at this specific location. Available primarily for US and Canadian records. Filter: employeesHere[min] / employeesHere[max]."
          },
          "Employees On Site Indicator": {
            "type": "string",
            "nullable": true,
            "description": "Data quality flag for Employees On Site. \"0\" = actual figure, \"1\" = low-end estimate, \"2\" = estimated (also used when the value is zero), empty/null = not available."
          },
          "Employees Total": {
            "type": "string",
            "nullable": true,
            "description": "Total number of employees across the entire company. Filter: employeesTotal[min] / employeesTotal[max]."
          },
          "Employees Total Indicator": {
            "type": "string",
            "nullable": true,
            "description": "Data quality flag for Employees Total. \"0\" = actual figure, \"1\" = low-end estimate, \"2\" = estimated (also used when the value is zero), empty/null = not available."
          },
          "Include Principles Indicator": {
            "type": "string",
            "nullable": true,
            "description": "Whether business owners or partners are counted in Employees Total. \"Y\" = included, empty/null = not included or unknown. Available primarily on non-US records."
          },
          "Import/Export Code": {
            "type": "string",
            "nullable": true,
            "description": "Trade activity of the company. \"A\" = imports, exports & agent, \"B\" = imports & exports, \"C\" = imports only, \"D\" = imports & agent, \"E\" = exports & agent, \"F\" = agent only (no inventory), \"G\" = none or not available, \"H\" = exports only, empty = not available. Filter: importExportCode."
          },
          "Business Legal Type": {
            "type": "string",
            "nullable": true,
            "description": "Legal entity type code. \"1\" or \"13\" = proprietorship, \"2\" or \"7\" = partnership, \"3\" = corporation, \"8\" = joint venture, \"9\" = master limited partnership, \"10\" = general partnership, \"11\" = limited partnership, \"12\" = partnership (unknown type), \"14\" = limited liability, \"15\" = friendly society, \"0\" or empty = not available. Other values may exist. Filter: legalStatus."
          },
          "Control Indicator": {
            "type": "string",
            "nullable": true,
            "description": "Reserved field, not currently in use."
          },
          "Location Type": {
            "type": "string",
            "nullable": true,
            "description": "Company's role in its corporate hierarchy. \"0\" = single location (no entities report to it), \"1\" = headquarter/parent (branches and/or subsidiaries report to it), \"2\" = branch (secondary location of a headquarter), empty = not available. Filter: statusCode."
          },
          "Subsidiary Code": {
            "type": "string",
            "nullable": true,
            "description": "Subsidiary status. \"0\" = not a subsidiary, \"3\" = is a subsidiary, empty = not linked. Populated on linked records only. Filter: subsidiaryCode."
          },
          "Local Headquarter ID Number": {
            "type": "string",
            "nullable": true,
            "description": "ID of the immediate parent entity above this location. Pass this value as the ID filter to fetch that record. Empty if not linked."
          },
          "Local Headquarter Company Name": {
            "type": "string",
            "nullable": true,
            "description": "Name of the immediate parent entity. Empty if not linked."
          },
          "Local Headquarter Street Address": {
            "type": "string",
            "nullable": true,
            "description": "Street address of the immediate parent entity. Empty if not linked."
          },
          "Local Headquarter City": {
            "type": "string",
            "nullable": true,
            "description": "City of the immediate parent entity. Empty if not linked."
          },
          "Local Headquarter State/Province": {
            "type": "string",
            "nullable": true,
            "description": "State/province of the immediate parent entity. Empty if not linked."
          },
          "Local Headquarter Country Name": {
            "type": "string",
            "nullable": true,
            "description": "Country name of the immediate parent entity. Empty if not linked."
          },
          "National Headquarter ID Number": {
            "type": "string",
            "nullable": true,
            "description": "ID of the highest entity within the same country as this location. May equal this company's own ID if it is the national top."
          },
          "National Headquarter Company Name": {
            "type": "string",
            "nullable": true,
            "description": "Name of the national-level parent. Empty if not linked."
          },
          "National Headquarter Street Address": {
            "type": "string",
            "nullable": true,
            "description": "Street address of the national-level parent. Empty if not linked."
          },
          "National Headquarter City Name": {
            "type": "string",
            "nullable": true,
            "description": "City of the national-level parent. Empty if not linked."
          },
          "National Headquarter State/Province Name": {
            "type": "string",
            "nullable": true,
            "description": "State/province of the national-level parent. Empty if not linked."
          },
          "Global Headquarter ID Number": {
            "type": "string",
            "nullable": true,
            "description": "ID of the ultimate worldwide parent of the corporate group. All companies in the group share this value. Pass this to the worldwideHeadquarterID filter to fetch all entities in the group."
          },
          "Global Headquarter Company Name": {
            "type": "string",
            "nullable": true,
            "description": "Name of the ultimate worldwide parent. Empty if not linked."
          },
          "Global Headquarter Street Address": {
            "type": "string",
            "nullable": true,
            "description": "Street address of the ultimate worldwide parent. Empty if not linked."
          },
          "Global Headquarter City Name": {
            "type": "string",
            "nullable": true,
            "description": "City of the ultimate worldwide parent. Empty if not linked."
          },
          "Global Headquarter State/Province": {
            "type": "string",
            "nullable": true,
            "description": "State/province of the ultimate worldwide parent. Empty if not linked."
          },
          "Global Headquarter Country Name": {
            "type": "string",
            "nullable": true,
            "description": "Country name of the ultimate worldwide parent. Empty if not linked."
          },
          "Number of Companies in Group": {
            "type": "string",
            "nullable": true,
            "description": "Total number of entities in the worldwide corporate group (HQ + all subsidiaries and branches). All group members share this count. Empty if not linked."
          },
          "Website": {
            "type": "string",
            "nullable": true,
            "description": "Company website URL. Filter: hasWebsite."
          },
          "Email": {
            "type": "string",
            "nullable": true,
            "description": "Company email address(es). May contain multiple addresses separated by commas. Filter: email, hasEmail."
          },
          "Executives": {
            "type": "array",
            "nullable": true,
            "description": "Array of executive/management personnel objects (BETA). Up to 11 executives per company. Null if executive data is not enabled or not available.",
            "items": {
              "$ref": "#/components/schemas/Executive"
            }
          }
        }
      },
      "ListMeta": {
        "type": "object",
        "description": "Pagination details of a standard (page + pageSize) response.",
        "required": [
          "totalCount",
          "currentPage",
          "totalPages",
          "pageSize"
        ],
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "Total number of records matching the query across all pages."
          },
          "currentPage": {
            "type": "integer",
            "description": "Page number that was returned (1-based)."
          },
          "totalPages": {
            "type": "integer",
            "description": "Total number of pages for this query at the given pageSize (ceil(totalCount / pageSize))."
          },
          "pageSize": {
            "type": "integer",
            "description": "Page size that was applied (the requested pageSize, capped by the endpoint maximum)."
          },
          "warnings": {
            "$ref": "#/components/schemas/RequestWarnings"
          }
        }
      },
      "RequestWarnings": {
        "type": "array",
        "description": "Present only when something about the request is worth knowing: a value was normalised before the lookup, a filter was not applied, or the name search found nothing and another field answered instead. Warnings never mean the request failed, and the rows in data are always real results.",
        "items": {
          "type": "object",
          "required": [
            "code",
            "parameter",
            "message"
          ],
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "UNKNOWN_PARAMETER",
                "PARAMETER_NOT_APPLIED",
                "COUNTRY_CODE_NORMALISED",
                "COUNTRY_CODE_UNRECOGNISED",
                "NATIONAL_ID_NORMALISED",
                "SEARCH_LOOKS_LIKE_DOMAIN",
                "SEARCH_LOOKS_LIKE_REGISTRATION_NUMBER",
                "SEARCH_NON_LATIN_SCRIPT",
                "SEARCH_MATCHED_ANY_ORDER",
                "SEARCH_MATCHED_CORE_NAME",
                "SEARCH_MATCHED_FUZZY",
                "SEARCH_MATCHED_OTHER_COUNTRY"
              ],
              "description": "UNKNOWN_PARAMETER: the parameter is not part of this endpoint and was ignored. PARAMETER_NOT_APPLIED: the parameter is accepted but does not filter anything on this index. COUNTRY_CODE_NORMALISED / NATIONAL_ID_NORMALISED: the value was rewritten to the stored form before the lookup. COUNTRY_CODE_UNRECOGNISED: the value is not a country code, so it matches nothing; it is kept rather than dropped, so the count stays honest. SEARCH_LOOKS_LIKE_DOMAIN / SEARCH_LOOKS_LIKE_REGISTRATION_NUMBER: no company carries that name, so website or nationalId was searched instead and those are the rows you received. SEARCH_NON_LATIN_SCRIPT: names are stored in the Latin alphabet. SEARCH_MATCHED_ANY_ORDER / SEARCH_MATCHED_CORE_NAME / SEARCH_MATCHED_FUZZY / SEARCH_MATCHED_OTHER_COUNTRY: the exact name search found nothing, so the rows you received come from a relaxed retry - all words in any order, the name without its legal form, the closest spelling, or (only with strictCountry=false) the same name in another country. Each is only used when it returns a small result set, and each one is worth verifying before you rely on it."
            },
            "parameter": {
              "type": "string",
              "description": "The request parameter the warning is about."
            },
            "message": {
              "type": "string",
              "description": "What happened, in one sentence."
            },
            "hint": {
              "type": "string",
              "description": "What to send instead, when there is a better way to ask."
            }
          }
        }
      },
      "StandardCompanyListResponse": {
        "type": "object",
        "description": "Standard paginated list of companies (search, and export without scroll). Pagination details live under meta; records under data.records.",
        "required": [
          "meta",
          "data"
        ],
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/ListMeta"
          },
          "data": {
            "type": "object",
            "description": "Wrapper containing the current page of records.",
            "required": [
              "records"
            ],
            "properties": {
              "records": {
                "type": "array",
                "description": "Company records for the requested page.",
                "items": {
                  "$ref": "#/components/schemas/CompanyRecord"
                }
              }
            }
          }
        }
      },
      "CompanySearchResponse": {
        "description": "Successful search response: the standard list envelope plus a visitor property that is always null for API-key requests.",
        "allOf": [
          {
            "$ref": "#/components/schemas/StandardCompanyListResponse"
          },
          {
            "type": "object",
            "properties": {
              "visitor": {
                "type": "object",
                "nullable": true,
                "additionalProperties": true,
                "description": "Guest-session bookkeeping used by the web application. Always null when the request carries an x-api-key header."
              }
            }
          }
        ]
      },
      "ScrollMeta": {
        "type": "object",
        "description": "Cursor details of a scroll (useScroll=true) export response. No total count is available in scroll mode.",
        "required": [
          "pageSize",
          "hasMoreRecords",
          "recordCount"
        ],
        "properties": {
          "pageSize": {
            "type": "integer",
            "description": "Page size that was applied to this scroll request."
          },
          "hasMoreRecords": {
            "type": "boolean",
            "description": "True if another page can be fetched with the latest scrollId."
          },
          "scrollId": {
            "type": "string",
            "nullable": true,
            "description": "Opaque cursor for the next request. Always use the latest scrollId from the most recent response."
          },
          "recordCount": {
            "type": "integer",
            "description": "Number of records in data.records of this response."
          }
        }
      },
      "ScrollCompanyExportResponse": {
        "type": "object",
        "description": "Scroll-based export page. Same envelope as standard pagination (records under data.records); meta carries the scroll cursor instead of page numbers.",
        "required": [
          "meta",
          "data"
        ],
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/ScrollMeta"
          },
          "data": {
            "type": "object",
            "required": [
              "records"
            ],
            "properties": {
              "records": {
                "type": "array",
                "description": "Company records for this scroll page.",
                "items": {
                  "$ref": "#/components/schemas/CompanyRecord"
                }
              }
            }
          }
        }
      },
      "EmptyQueryResponse": {
        "type": "object",
        "description": "Body of the 400 returned when a request carries no query parameters. Reuses the list envelope with meta.totalCount = -1 and an explanatory meta.message.",
        "required": [
          "meta",
          "data"
        ],
        "properties": {
          "meta": {
            "type": "object",
            "required": [
              "totalCount",
              "message"
            ],
            "properties": {
              "totalCount": {
                "type": "integer",
                "description": "Always -1 for this error."
              },
              "message": {
                "type": "string",
                "description": "Explanation of the error."
              }
            }
          },
          "data": {
            "type": "object",
            "required": [
              "records"
            ],
            "properties": {
              "records": {
                "type": "array",
                "description": "Always empty for this error.",
                "items": {
                  "$ref": "#/components/schemas/CompanyRecord"
                }
              }
            }
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "description": "Error body of every failure status except the empty-query 400 and export 500s. error is a human-readable reason; some failures add context fields (subscriptionStatus, searchesUsed / searchesLimit, requestsUsed / requestsLimit, paginationMessage, visitor).",
        "required": [
          "error"
        ],
        "additionalProperties": true,
        "properties": {
          "error": {
            "type": "string",
            "description": "Human-readable reason for the failure."
          },
          "subscriptionStatus": {
            "type": "string",
            "description": "Present on 403 when the subscription is inactive (PAYMENT_FAILED, CANCELED or EXPIRED)."
          },
          "searchesUsed": {
            "type": "integer",
            "description": "Present on 429 when the monthly search allowance is used up."
          },
          "searchesLimit": {
            "type": "integer",
            "description": "Present on 429 when the monthly search allowance is used up."
          },
          "requestsUsed": {
            "type": "integer",
            "description": "Present on 429 for manually invoiced keys."
          },
          "requestsLimit": {
            "type": "integer",
            "description": "Present on 429 for manually invoiced keys."
          },
          "paginationMessage": {
            "type": "string",
            "description": "Present on the browser-only PAGINATION_LIMIT 403."
          },
          "unknownParameters": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Present on the unknown-parameter 400: the parameter names this endpoint does not have."
          },
          "didYouMean": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Present on the unknown-parameter 400: each unknown name mapped to the parameter you probably meant."
          },
          "documentation": {
            "type": "string",
            "format": "uri",
            "description": "Present on the unknown-parameter 400: where the full parameter list lives."
          }
        }
      },
      "ExportErrorResponse": {
        "type": "object",
        "description": "Error body of export 500 responses; the reason is under message rather than error.",
        "required": [
          "message"
        ],
        "additionalProperties": true,
        "properties": {
          "message": {
            "type": "string",
            "description": "Human-readable reason for the failure."
          }
        }
      }
    }
  }
}