{
  "openapi": "3.0.1",
  "info": {
    "title": "Latvia Company Data — Officers, Owners (UBO) & Financials",
    "description": "Search Latvian companies from the official Register of Enterprises open data — identity, legal form, address, activity and capital, plus optional officers, shareholders, beneficial owners (UBO) and annual-report financials. Resale-open data, no key.",
    "version": "0.1",
    "x-build-id": "0JU5IxUZPUzuRdFQl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/foxlabs~latvia-company-data/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-foxlabs-latvia-company-data",
        "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/foxlabs~latvia-company-data/runs": {
      "post": {
        "operationId": "runs-sync-foxlabs-latvia-company-data",
        "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/foxlabs~latvia-company-data/run-sync": {
      "post": {
        "operationId": "run-sync-foxlabs-latvia-company-data",
        "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": {
          "searchQuery": {
            "title": "Company name contains",
            "type": "string",
            "description": "Keep only companies whose registered name contains this text (case-insensitive). Example: \"transport\", \"SIA Rimi\". Leave empty to browse by the other filters."
          },
          "registrationNumbers": {
            "title": "Registration numbers",
            "type": "array",
            "description": "Exact 11-digit Latvian registration numbers for precise lookup (e.g. [\"40003053029\"] = SIA \"RIMI LATVIA\", [\"40003286799\"] = SIA \"Mikrotīkls\" / MikroTik). Overrides the name search when set.",
            "items": {
              "type": "string"
            }
          },
          "legalForm": {
            "title": "Legal form",
            "enum": [
              "",
              "SIA",
              "ZEM",
              "BDR",
              "IK",
              "IND",
              "MIL",
              "KB",
              "PAR",
              "AS",
              "SAB",
              "FIL",
              "NOD",
              "AKF",
              "VU",
              "PS",
              "PSV",
              "DRZ",
              "PAJ",
              "KS",
              "KAT",
              "ARB",
              "SKT"
            ],
            "type": "string",
            "description": "Filter to a single legal form, using the Latvian register's own entity-type codes. Select \"All\" to include every legal form. Counts are the whole register (485,846 entities, 2026-07-28).",
            "default": ""
          },
          "registerType": {
            "title": "Register",
            "enum": [
              "",
              "K",
              "KU",
              "U",
              "B",
              "M",
              "S",
              "C",
              "R",
              "P",
              "T",
              "O",
              "A",
              "E"
            ],
            "type": "string",
            "description": "The Latvian Register of Enterprises holds more than companies — press titles, associations, political parties and pre-2005 journal entries share the same database. Pick \"Commercial Register only\" for company data; a broad name search otherwise mixes them in (measured: 21 of 100 rows for \"transport\").",
            "default": ""
          },
          "status": {
            "title": "Status",
            "enum": [
              "active",
              "terminated",
              "all"
            ],
            "type": "string",
            "description": "Filter by registration status. Active = still on the register; Terminated = struck off / liquidated.",
            "default": "active"
          },
          "location": {
            "title": "Location contains",
            "type": "string",
            "description": "Keep only companies whose address contains this text — a city, district or street (e.g. \"Rīga\", \"Liepāja\", \"Jūrmala\"). Leave empty for all of Latvia."
          },
          "activityQuery": {
            "title": "Activity contains",
            "type": "string",
            "description": "Keep only companies whose declared area of activity contains this text (e.g. \"transport\", \"būvniecība\", \"IT\"). Leave empty for all activities."
          },
          "includeOwnership": {
            "title": "Include officers & ownership",
            "type": "boolean",
            "description": "Attach each company's officers (board / representatives), shareholders (SIA members + AS stockholders) and beneficial owners (UBO). Off by default — adds ~85 MB of reference downloads at the start of the run.",
            "default": false
          },
          "includeFinancials": {
            "title": "Include financials (annual report)",
            "type": "boolean",
            "description": "Attach the latest annual-report figures — employees, total assets, equity, net turnover and net income. Off by default — adds ~500 MB of reference downloads at the start of the run, so it is the slowest option.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 500000,
            "type": "integer",
            "description": "Maximum number of companies to return (1–500000).",
            "default": 1000
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}