{
  "openapi": "3.0.1",
  "info": {
    "title": "Eurostat Data Fetcher – EU Statistics to CSV/Excel",
    "description": "Fetch any Eurostat table (GDP, unemployment, inflation/HICP, population, energy, trade …) via the official Eurostat API as flat rows: one row per observation with dimension codes, labels, value and status flag. Filter by country, time and unit; search the catalogue.",
    "version": "0.1",
    "x-build-id": "GXQTPRm0xq5SDRBDz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/adamplaenitz~eurostat-dataset-fetcher/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-adamplaenitz-eurostat-dataset-fetcher",
        "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/adamplaenitz~eurostat-dataset-fetcher/runs": {
      "post": {
        "operationId": "runs-sync-adamplaenitz-eurostat-dataset-fetcher",
        "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/adamplaenitz~eurostat-dataset-fetcher/run-sync": {
      "post": {
        "operationId": "run-sync-adamplaenitz-eurostat-dataset-fetcher",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "data",
              "search"
            ],
            "type": "string",
            "description": "data = download observations of the given datasets. search = find dataset codes in the Eurostat catalogue by keyword.",
            "default": "data"
          },
          "datasets": {
            "title": "Dataset codes",
            "type": "array",
            "description": "Eurostat dataset codes, e.g. une_rt_m (unemployment, monthly), nama_10_gdp (GDP), prc_hicp_manr (HICP inflation), demo_pjan (population). A Data Browser link (…/databrowser/view/une_rt_m/…) works too. Filters apply to all datasets; filters for dimensions a dataset does not have are ignored for that dataset.",
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "Countries / regions (geo)",
            "type": "array",
            "description": "Geo codes, e.g. DE, FR, IT, ES, EL (Greece), EU27_2020, EA20, or NUTS regions like DE21. Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "sinceTimePeriod": {
            "title": "Since time period",
            "type": "string",
            "description": "First period to include, in the format of the dataset: 2020 (annual), 2020-Q1 (quarterly), 2020-01 (monthly)."
          },
          "untilTimePeriod": {
            "title": "Until time period",
            "type": "string",
            "description": "Last period to include (same format as above). Empty = up to the latest."
          },
          "lastTimePeriod": {
            "title": "Last N periods",
            "minimum": 1,
            "type": "integer",
            "description": "Only the latest N time periods (e.g. 1 = most recent value per series). Do not combine with since/until."
          },
          "filters": {
            "title": "Dimension filters",
            "type": "object",
            "description": "Further dimension filters as JSON: dimension code → value or list of values, e.g. {\"unit\": \"PC_ACT\", \"sex\": \"T\", \"age\": \"TOTAL\", \"s_adj\": \"SA\"} or {\"na_item\": \"B1GQ\", \"unit\": [\"CP_MEUR\", \"CLV10_MEUR\"]}. Codes are shown in the Eurostat Data Browser and in the output (columns with _label). You can also put time here, e.g. {\"time\": [\"2023\", \"2024\"]}."
          },
          "language": {
            "title": "Label language",
            "enum": [
              "EN",
              "DE",
              "FR"
            ],
            "type": "string",
            "description": "Language of the dataset title and the dimension labels.",
            "default": "EN"
          },
          "includeLabels": {
            "title": "Include labels",
            "type": "boolean",
            "description": "Add a <dimension>_label column with the readable label next to every dimension code (e.g. geo = DE, geo_label = Germany).",
            "default": true
          },
          "includeMissing": {
            "title": "Include missing / confidential cells",
            "type": "boolean",
            "description": "Also output cells without a value that carry only a status flag (e.g. confidential). They have value null and are charged like observations.",
            "default": false
          },
          "maxRowsPerDataset": {
            "title": "Max observations per dataset",
            "minimum": 1,
            "maximum": 10000000,
            "type": "integer",
            "description": "Upper limit of observations per dataset (protects against accidentally huge downloads).",
            "default": 500000
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 10000000,
            "type": "integer",
            "description": "Upper limit of charged items per run (observations or catalogue entries) across all datasets.",
            "default": 1000000
          },
          "searchQuery": {
            "title": "Search term",
            "type": "string",
            "description": "Search mode: words that must appear in the dataset title, code or theme, e.g. \"unemployment monthly\", \"GDP regional\", \"HICP\" or a code prefix like \"nama_10\". English works best (the catalogue is searched in the label language)."
          },
          "searchTypes": {
            "title": "Search in",
            "type": "array",
            "description": "Search mode: dataset = full multi-dimensional datasets, table = Eurostat's predefined tables (tps…, tec…, tin…). Empty = both.",
            "items": {
              "type": "string",
              "enum": [
                "dataset",
                "table"
              ],
              "enumTitles": [
                "Datasets",
                "Predefined tables"
              ]
            }
          },
          "maxSearchResults": {
            "title": "Max search results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Search mode: maximum number of catalogue entries returned (best matches first).",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}