{
  "openapi": "3.0.1",
  "info": {
    "title": "Estonian Company Register with Financials",
    "description": "Every Estonian company from the official e-Business Register open data, with the latest annual report figures: revenue, profit, assets, equity, employees, and main EMTAK industry. Filter by name, legal form, county, industry, revenue, employees, or registration date.",
    "version": "0.1",
    "x-build-id": "5YzImKg4ao3AzZDtA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tapedawn~estonia-company-register/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tapedawn-estonia-company-register",
        "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/tapedawn~estonia-company-register/runs": {
      "post": {
        "operationId": "runs-sync-tapedawn-estonia-company-register",
        "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/tapedawn~estonia-company-register/run-sync": {
      "post": {
        "operationId": "run-sync-tapedawn-estonia-company-register",
        "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",
        "properties": {
          "maxItems": {
            "title": "Maximum companies",
            "minimum": 1,
            "maximum": 500000,
            "type": "integer",
            "description": "Stop after this many companies have been saved.",
            "default": 1000
          },
          "registryCodes": {
            "title": "Registry codes",
            "type": "array",
            "description": "Look up specific companies by their 8-digit registry code (registrikood). Leave empty to search the whole register.",
            "items": {
              "type": "string"
            }
          },
          "nameContains": {
            "title": "Name contains",
            "type": "string",
            "description": "Keep companies whose name contains this text (case-insensitive)."
          },
          "legalForms": {
            "title": "Legal forms",
            "type": "array",
            "description": "Keep only these legal forms. Empty keeps all. Sole proprietors are never included.",
            "items": {
              "type": "string",
              "enum": [
                "Osaühing",
                "Aktsiaselts",
                "Usaldusühing",
                "Täisühing",
                "Tulundusühistu",
                "Mittetulundusühing",
                "Sihtasutus",
                "Korteriühistu",
                "Välismaa äriühingu filiaal",
                "Kohaliku omavalitsuse asutus",
                "Täidesaatva riigivõimu asutus või riigi muu institutsioon",
                "Ametiühing"
              ],
              "enumTitles": [
                "Osaühing - private limited company (OÜ)",
                "Aktsiaselts - public limited company (AS)",
                "Usaldusühing - limited partnership (UÜ)",
                "Täisühing - general partnership (TÜ)",
                "Tulundusühistu - commercial association",
                "Mittetulundusühing - non-profit association (MTÜ)",
                "Sihtasutus - foundation (SA)",
                "Korteriühistu - apartment association (KÜ)",
                "Välismaa äriühingu filiaal - branch of a foreign company",
                "Kohaliku omavalitsuse asutus",
                "Täidesaatva riigivõimu asutus või riigi muu institutsioon",
                "Ametiühing"
              ]
            }
          },
          "statuses": {
            "title": "Statuses",
            "type": "array",
            "description": "Register statuses to include. Default: registered only.",
            "items": {
              "type": "string",
              "enum": [
                "R",
                "L",
                "N"
              ],
              "enumTitles": [
                "Registered",
                "In liquidation",
                "In bankruptcy"
              ]
            },
            "default": [
              "R"
            ]
          },
          "counties": {
            "title": "Counties",
            "type": "array",
            "description": "Keep companies located in these counties, for example Harju, Tartu, or Pärnu (matches 'Harju maakond').",
            "items": {
              "type": "string"
            }
          },
          "settlementContains": {
            "title": "City or municipality contains",
            "type": "string",
            "description": "Keep companies whose settlement or municipality contains this text, for example Tallinn or Viimsi."
          },
          "postcodePrefix": {
            "title": "Postcode prefix",
            "type": "string",
            "description": "Keep companies whose postcode starts with this."
          },
          "registeredAfter": {
            "title": "Registered on or after",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "YYYY-MM-DD. Handy for daily runs that only want new companies."
          },
          "registeredBefore": {
            "title": "Registered on or before",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "YYYY-MM-DD."
          },
          "vatRegisteredOnly": {
            "title": "VAT registered only",
            "type": "boolean",
            "description": "Keep only companies with an Estonian VAT number.",
            "default": false
          },
          "includeFinancials": {
            "title": "Add latest annual report",
            "type": "boolean",
            "description": "Join the latest annual report: year, size category, audit flag, revenue, profit, assets, equity, cash, liabilities, labour expense, employees, and main EMTAK activity code.",
            "default": true
          },
          "emtakPrefixes": {
            "title": "EMTAK activity codes",
            "type": "array",
            "description": "Keep companies whose main activity code in the latest annual report starts with any of these, for example 62 (IT), 4120 (construction), 5610 (restaurants).",
            "items": {
              "type": "string"
            }
          },
          "minRevenue": {
            "title": "Minimum revenue (EUR)",
            "type": "integer",
            "description": "Keep companies whose latest annual revenue is at least this."
          },
          "maxRevenue": {
            "title": "Maximum revenue (EUR)",
            "type": "integer",
            "description": "Keep companies whose latest annual revenue is at most this."
          },
          "minEmployees": {
            "title": "Minimum employees",
            "type": "integer",
            "description": "Keep companies with at least this many full-time-equivalent employees in the latest annual report."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}