{
  "openapi": "3.0.1",
  "info": {
    "title": "Finland Company Register - PRH YTJ Y-tunnus Business Search",
    "description": "Search and export Finnish companies from the official PRH / YTJ Business Information System. Filter by name, Business ID, town, postal code, legal form, line of business and registration date. Returns 26 fields per company and, by default, only companies still on the register.",
    "version": "0.1",
    "x-build-id": "8WFgY9z9zeUkyVUxs"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/publicdata~finland-prh-ytj-company-register/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-publicdata-finland-prh-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/publicdata~finland-prh-ytj-company-register/runs": {
      "post": {
        "operationId": "runs-sync-publicdata-finland-prh-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/publicdata~finland-prh-ytj-company-register/run-sync": {
      "post": {
        "operationId": "run-sync-publicdata-finland-prh-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": {
          "query": {
            "title": "Company name contains",
            "type": "string",
            "description": "Matches current, previous, parallel and auxiliary company names. A row matched through an old name carries it in previousNames. Example: Nokia"
          },
          "businessId": {
            "title": "Business ID",
            "pattern": "^$|^\\d{7}-\\d$",
            "type": "string",
            "description": "Finnish Business ID (Y-tunnus), including the check digit. Example: 0205709-4"
          },
          "location": {
            "title": "Town or city",
            "type": "string",
            "description": "Registered town or city, as held by the register. Example: HELSINKI"
          },
          "postCode": {
            "title": "Postal code",
            "pattern": "^$|^\\d{5}$",
            "type": "string",
            "description": "Five-digit Finnish postal code, matched against the street or the postal address. Example: 00100"
          },
          "companyForms": {
            "title": "Legal forms",
            "type": "array",
            "description": "Letter codes only. OY limited company, OYJ public limited, KY limited partnership, AY partnership, OK co-operative, AOY housing company, SL branch of a foreign trader, SÄÄ foundation. Full list: AOY, ASH, ASY, AY, AYH, ETS, ETY, HY, KOY, KVJ, KVY, KY, OK, OP, OY, OYJ, SCE, SCP, SE, SL, SP, SÄÄ, TYH, VALTLL, VOJ, VOY, VY. The numeric type stored inside the data (16 for a limited company) is NOT accepted by the register, which silently returns every company instead - this Actor refuses unknown codes rather than run up that bill.",
            "items": {
              "type": "string",
              "pattern": "^[A-ZÄÖÅa-zäöå]{2,6}$"
            }
          },
          "businessLine": {
            "title": "Line of business",
            "type": "string",
            "description": "Statistics Finland industry code, or free text. IMPORTANT: Finland re-registered every company under a new classification on 2026-01-01 and the numbers changed - computer programming is 62100 now and was 62010 before. An old code mostly returns companies that have already ceased, so this Actor warns in the log when your code looks retired."
          },
          "registeredAfter": {
            "title": "Registered on or after",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only companies entered in the register on or after this date (YYYY-MM-DD). Leave empty for no lower bound."
          },
          "registeredBefore": {
            "title": "Registered on or before",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only companies entered in the register on or before this date (YYYY-MM-DD). Leave empty for no upper bound."
          },
          "status": {
            "title": "Status",
            "enum": [
              "active",
              "ceased",
              "any"
            ],
            "type": "string",
            "description": "About half of the register is companies that have ceased. The register has no status filter of its own, so this is applied here - rows dropped by it are never charged.",
            "default": "active"
          },
          "maxItems": {
            "title": "Maximum companies",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many exported companies. 0 means no limit. Results are ordered by Business ID, which is roughly oldest first."
          },
          "includeRaw": {
            "title": "Include raw API record",
            "type": "boolean",
            "description": "Add the untouched PRH JSON for each company in a raw field.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}