{
  "openapi": "3.0.1",
  "info": {
    "title": "Finland Company Register (PRH YTJ)",
    "description": "Look up Finnish companies by Business ID (Y-tunnus) or search by name, city, company form or business line. Official PRH YTJ open data: names and name history, status, form, TOL line, register entries, addresses.",
    "version": "0.1",
    "x-build-id": "HWvdv0UQ1TxDADqPF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cliqtomedia~finland-ytj-company-register/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cliqtomedia-finland-ytj-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/cliqtomedia~finland-ytj-company-register/runs": {
      "post": {
        "operationId": "runs-sync-cliqtomedia-finland-ytj-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/cliqtomedia~finland-ytj-company-register/run-sync": {
      "post": {
        "operationId": "run-sync-cliqtomedia-finland-ytj-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": {
          "businessIds": {
            "title": "Business IDs (Y-tunnus)",
            "maxItems": 100,
            "type": "array",
            "description": "Exact lookup of up to 100 Finnish Business IDs, e.g. 0112038-9. Also accepts 01120389, the old six-digit form and FI VAT numbers (FI01120389). Wrong check digits are reported as invalid_input (free). Duplicates are looked up once. Leave empty to run a search instead.",
            "items": {
              "type": "string"
            }
          },
          "name": {
            "title": "Company name",
            "maxLength": 200,
            "type": "string",
            "description": "Search filter, not combinable with Business IDs. Matches current and earlier names, at least 2 characters, e.g. nokia."
          },
          "location": {
            "title": "Town or city",
            "maxLength": 100,
            "type": "string",
            "description": "Search filter: town/city of the registered address, e.g. Helsinki, Espoo or Tampere."
          },
          "companyForm": {
            "title": "Company form",
            "enum": [
              "",
              "AOY",
              "ASH",
              "ASY",
              "AY",
              "AYH",
              "ETS",
              "ETY",
              "SCE",
              "SCP",
              "HY",
              "KOY",
              "KVJ",
              "KVY",
              "KY",
              "OK",
              "OP",
              "OY",
              "OYJ",
              "SE",
              "SL",
              "SP",
              "SÄÄ",
              "TYH",
              "VOJ",
              "VOY",
              "VY",
              "VALTLL"
            ],
            "type": "string",
            "description": "Search filter: company form, e.g. OY (limited company) or OYJ (public limited company).",
            "default": ""
          },
          "mainBusinessLine": {
            "title": "Main business line",
            "maxLength": 200,
            "type": "string",
            "description": "Search filter: TOL 2008 code (e.g. 62010) or text from its description (e.g. software)."
          },
          "postCode": {
            "title": "Postcode",
            "maxLength": 5,
            "type": "string",
            "description": "Search filter: 5-digit Finnish postcode, e.g. 00100."
          },
          "registrationDateFrom": {
            "title": "Registered from",
            "type": "string",
            "description": "Search filter: company registration date from (inclusive), YYYY-MM-DD."
          },
          "registrationDateTo": {
            "title": "Registered to",
            "type": "string",
            "description": "Search filter: company registration date to (inclusive), YYYY-MM-DD."
          },
          "maxResults": {
            "title": "Max companies (search)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Search mode only. Maximum companies returned, 1–5000. Default 100. Each company row is charged.",
            "default": 100
          },
          "language": {
            "title": "Label language",
            "enum": [
              "en",
              "fi",
              "sv"
            ],
            "type": "string",
            "description": "Language of labels (company form, statuses, business line, city). Values the source has only in Finnish fall back to Finnish.",
            "default": "en"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}