{
  "openapi": "3.0.1",
  "info": {
    "title": "Finnish Company Data & Financials (PRH / YTJ)",
    "description": "Finnish company lookup by Y-tunnus (Business ID), name or filters (city, TOL industry, company form, registration date): status, address, VAT, LEI plus revenue, profit, equity from PRH open data and ESEF reports. No scraping.",
    "version": "0.1",
    "x-build-id": "oHYPLaNDlXLOclhYP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/stimulating_stilbite~finnish-company-data-financials/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-stimulating_stilbite-finnish-company-data-financials",
        "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/stimulating_stilbite~finnish-company-data-financials/runs": {
      "post": {
        "operationId": "runs-sync-stimulating_stilbite-finnish-company-data-financials",
        "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/stimulating_stilbite~finnish-company-data-financials/run-sync": {
      "post": {
        "operationId": "run-sync-stimulating_stilbite-finnish-company-data-financials",
        "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)",
            "type": "array",
            "description": "Finnish Business IDs in the form 1234567-8 (FI12345678 and IDs without the leading zero are accepted). Invalid IDs return an error item and are not charged.",
            "items": {
              "type": "string"
            }
          },
          "companyNames": {
            "title": "Company names",
            "type": "array",
            "description": "Free-text names, e.g. \"KONE\" or \"Marimekko\". Searches current and previous names in YTJ plus the GLEIF LEI register, ranks exact matches first and returns up to maxResultsPerName per name.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerName": {
            "title": "Max results per name",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum matches per company name (1-50). Default 3.",
            "default": 3
          },
          "city": {
            "title": "City / town",
            "type": "string",
            "description": "Filter by town or city of the company address, e.g. Helsinki, Espoo, Tampere, Oulu."
          },
          "postCode": {
            "title": "Postal code",
            "type": "string",
            "description": "Filter by 5-digit postal code, e.g. 00100."
          },
          "industryCode": {
            "title": "Industry code (TOL 2008)",
            "type": "string",
            "description": "Main line of business code from Statistics Finland TOL 2008, e.g. 62 (computer programming), 62010, 43220 (plumbing), 56101 (restaurants). Numeric codes match as prefix."
          },
          "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": "Filter by company form code, e.g. OY (limited company) or OYJ (public limited company)."
          },
          "registeredFrom": {
            "title": "Registered on or after",
            "type": "string",
            "description": "Company registration date on or after (YYYY-MM-DD)."
          },
          "registeredTo": {
            "title": "Registered on or before",
            "type": "string",
            "description": "Company registration date on or before (YYYY-MM-DD)."
          },
          "onlyActive": {
            "title": "Only active companies in searches",
            "type": "boolean",
            "description": "Skip ceased or removed companies in name and filter searches. Direct Business ID lookups always return the company.",
            "default": true
          },
          "maxResults": {
            "title": "Max results for filter search",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum companies returned when listing by filters (1-5000). Default 100.",
            "default": 100
          },
          "includeFinancials": {
            "title": "Include annual-report financials",
            "type": "boolean",
            "description": "Add revenue, operating profit, profit before appropriations and taxes, net profit, total assets, equity, liabilities and equity ratio from the latest digital financial statement filed to PRH (iXBRL, with prior-year comparatives), or from the ESEF annual report for listed companies.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}