{
  "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": "ayXE3CZ2yPmHwLKno"
  },
  "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 entities whose registered name contains this text (case-insensitive), as the register writes it: the name part sits in quotation marks there (SIA \"RIMI LATVIA\"), so type \"Rimi\" rather than \"SIA Rimi\". Example: \"transport\". Leave empty to browse by the other filters."
          },
          "registrationNumbers": {
            "title": "Registration numbers",
            "type": "array",
            "description": "Exact Latvian registration numbers (9 or 11 digits) for precise lookup (e.g. [\"40003053029\"] = SIA \"RIMI LATVIA\", [\"40003286799\"] = SIA \"Mikrotīkls\" / MikroTik). One entry may hold several numbers separated by commas. While the list holds a number, the name search is not used — empty the list to search by name; the other filters still apply. A number that returns no row, and an entry that is not a registration number, are named in the run's status message; with more numbers than Max results (or than a maximum charge on the run covers) only the first ones are looked up. A list that holds entries but no registration number returns nothing — it is never run as a search.",
            "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. Each label gives the active entities of that form and all of them, counted in the register's files on 2026-10-08 (489,090 entities, 221,388 active). A search returns active entities unless Status says otherwise — a form with 0 active returns rows only with Status = Terminated or All.",
            "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 and political parties share the same database, and a broad name search mixes them in (on 2026-10-08, 94 of the 762 active entities with \"transport\" in their name were outside the Commercial Register). The Commercial Register holds today's company forms (SIA, AS, sole traders, partnerships, branches). Farms, individual undertakings and co-operative societies sit in the Enterprise Register journal, which holds 34,641 active entities: for every business of a place pick \"Commercial Register + journal\". Each label gives active entities and all, counted on 2026-10-08.",
            "default": ""
          },
          "status": {
            "title": "Status",
            "enum": [
              "",
              "active",
              "terminated",
              "all"
            ],
            "type": "string",
            "description": "Automatic = active entities for a search, any status for a lookup by registration number (the row's status field then says which it is). Active = no termination date in the register; it does not mean the entity is trading. Terminated = struck off / liquidated.",
            "default": ""
          },
          "location": {
            "title": "Location contains",
            "type": "string",
            "description": "Keep only entities whose address contains this text — a city, district or street (e.g. \"Rīga\", \"Liepāja\", \"Jūrmala\"). The text is looked for anywhere in the address, so a town name also returns addresses elsewhere on a street named after it (\"Liepājas iela\"); the register writes a municipality as \"Saldus nov.\". Leave empty for all of Latvia."
          },
          "activityQuery": {
            "title": "Activity contains",
            "type": "string",
            "description": "Keep only entities whose declared area of activity contains this text — anywhere, also inside a longer word, so use a whole word or a stem (\"transport\", \"būvniecīb\"); two letters such as \"IT\" match inside other words. Few companies state an activity (about 4 in 100 active entities of the Commercial Register, most of them registered in the 1990s); most associations, foundations and farms do. 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 figures of the entity's own latest annual report — employees, total assets, equity, net turnover and net income (a group's consolidated report is not used). 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 entities to return (1–500000); rows come in order of registration number. A list of registration numbers is cut the same way: only the first numbers up to this count are looked up. A run with a maximum charge stops at the number of rows that charge covers.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}