{
  "openapi": "3.0.1",
  "info": {
    "title": "Eurostat Statistics API — EU Inflation (HICP) & Trade Data",
    "description": "Get EU inflation (HICP/CPI, with computed YoY and 12-month moving average) and EU import/export trade statistics from Eurostat's public API as clean JSON. No key needed.",
    "version": "0.1",
    "x-build-id": "6g3hBrnaDjpwlzPFA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/westerly_breaker~eurostat-statistics/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-westerly_breaker-eurostat-statistics",
        "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/westerly_breaker~eurostat-statistics/runs": {
      "post": {
        "operationId": "runs-sync-westerly_breaker-eurostat-statistics",
        "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/westerly_breaker~eurostat-statistics/run-sync": {
      "post": {
        "operationId": "run-sync-westerly_breaker-eurostat-statistics",
        "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": {
          "dataset": {
            "title": "Dataset",
            "enum": [
              "hicp",
              "comext"
            ],
            "type": "string",
            "description": "Which Eurostat dataset to query. \"hicp\" = inflation / consumer prices (Harmonised Index of Consumer Prices), with computed 'yoy_pct' and 'ma12_pct' fields Eurostat doesn't provide directly. \"comext\" = EU international trade in goods (import/export value and quantity by product/country/period). Defaults to \"hicp\".",
            "default": "hicp"
          },
          "countries": {
            "title": "Countries (HICP)",
            "type": "array",
            "description": "hicp only. Eurostat geo codes to fetch inflation for, e.g. \"HU\", \"DE\", \"EA20\" (euro area), \"EU27_2020\". Note: Eurostat uses \"EL\" for Greece and \"UK\" for the United Kingdom, not \"GR\"/\"GB\". Defaults to [\"HU\", \"DE\"].",
            "items": {
              "type": "string"
            }
          },
          "coicop_codes": {
            "title": "COICOP codes (HICP)",
            "type": "array",
            "description": "hicp only. Which consumption category/categories to fetch, using Eurostat's COICOP classification. \"CP00\" = all-items HICP (headline inflation, the default). Other common codes: \"CP01\" (food & non-alcoholic beverages), \"NRG\" (energy), \"SERV\" (services), \"TOT_X_NRG_FOOD\" (core inflation, excl. energy & food). Defaults to [\"CP00\"].",
            "items": {
              "type": "string"
            }
          },
          "hs_codes": {
            "title": "Product / HS codes (Comext)",
            "type": "array",
            "description": "comext only. Product codes to fetch trade data for: 2-digit HS chapter (e.g. \"87\"), 4-digit HS heading (\"8703\"), 6-digit HS subheading (\"870323\"), or 8-digit full CN8 code. Defaults to [\"870323\"] (cars with 1.5-3.0L spark-ignition engines, a Comext worked example).",
            "items": {
              "type": "string"
            }
          },
          "reporter_countries": {
            "title": "Reporter countries (Comext)",
            "type": "array",
            "description": "comext only. The EU/EFTA country/ies reporting the trade flow (the \"declarant\"). Uses plain ISO codes, e.g. \"GB\"/\"GR\" for the UK/Greece (different from the HICP module's \"UK\"/\"EL\" convention — this is Eurostat's own inconsistency, not this actor's). Defaults to [\"HU\"].",
            "items": {
              "type": "string"
            }
          },
          "partner_countries": {
            "title": "Partner countries (Comext)",
            "type": "array",
            "description": "comext only. The trade partner country/ies (where goods came from/went to). ISO-3166-1 alpha-2 codes (e.g. \"DE\", \"US\", \"CN\"), or \"WORLD\" for all partners combined. Defaults to [\"DE\"].",
            "items": {
              "type": "string"
            }
          },
          "flow": {
            "title": "Trade flow (Comext)",
            "enum": [
              "import",
              "export"
            ],
            "type": "string",
            "description": "comext only. Whether to fetch imports into the reporter country, or exports from it. Defaults to \"import\".",
            "default": "import"
          },
          "period_from": {
            "title": "Period from",
            "type": "string",
            "description": "Start of the period to fetch, as \"YYYY-MM\" (e.g. \"2025-01\"). Used by both datasets. For hicp, Eurostat data 23 months before this is fetched automatically in the background to compute 'yoy_pct'/'ma12_pct' for every requested period — only rows within [period_from, period_to] are returned.",
            "default": "2025-01"
          },
          "period_to": {
            "title": "Period to",
            "type": "string",
            "description": "End of the period to fetch, as \"YYYY-MM\" (e.g. \"2025-12\"). Used by both datasets. Must not be before 'period_from'; the range is capped at 120 months (10 years) per run.",
            "default": "2025-12"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}