{
  "openapi": "3.0.1",
  "info": {
    "title": "Inflation API - CPI & Economic Indicators by Country",
    "description": "Inflation and CPI data by country as JSON, no API key: yearly inflation, CPI index, GDP, GDP growth, GDP per capita, unemployment, population and lending rate for 217 countries (World Bank, CC BY 4.0), plus monthly HICP inflation (yoy, mom, index) for 37 European countries from Eurostat, including t",
    "version": "0.1",
    "x-build-id": "YJvBeKxGdCdjJoXUL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/martin10291~inflation-cpi-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-martin10291-inflation-cpi-api",
        "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/martin10291~inflation-cpi-api/runs": {
      "post": {
        "operationId": "runs-sync-martin10291-inflation-cpi-api",
        "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/martin10291~inflation-cpi-api/run-sync": {
      "post": {
        "operationId": "run-sync-martin10291-inflation-cpi-api",
        "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": [
              "latest",
              "history",
              "monthly",
              "adjust",
              "indicators",
              "countries"
            ],
            "type": "string",
            "description": "latest = newest yearly value per country and indicator (EU countries also get the newest monthly HICP); history = one row per country and year; monthly = Eurostat HICP per month (EU/EEA/candidate countries); adjust = what an amount from one year (or month) is worth in another, using the official CPI index; indicators / countries = lists of what is covered.",
            "default": "latest"
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "ISO2 (US, DE, BG), ISO3 (USA, BGR) or English names (Germany). Up to 50. Empty = US, DE, GB, JP, BG.",
            "items": {
              "type": "string"
            }
          },
          "indicators": {
            "title": "Indicators",
            "type": "array",
            "description": "For latest: inflation, cpi, gdp, gdpGrowth, gdpPerCapita, unemployment, population, interestRate (or the raw World Bank code, e.g. FP.CPI.TOTL.ZG). Empty = inflation.",
            "items": {
              "type": "string"
            }
          },
          "indicator": {
            "title": "Indicator (history)",
            "type": "string",
            "description": "For history: one indicator key, e.g. inflation or gdpGrowth. Default inflation."
          },
          "startYear": {
            "title": "Start year",
            "type": "integer",
            "description": "For history: first year (1960 or later). Default 10 years ago."
          },
          "endYear": {
            "title": "End year",
            "type": "integer",
            "description": "For history: last year. Default the latest year with data."
          },
          "startMonth": {
            "title": "Start month",
            "type": "string",
            "description": "For monthly: first month YYYY-MM. Default 24 months back."
          },
          "endMonth": {
            "title": "End month",
            "type": "string",
            "description": "For monthly: last month YYYY-MM. Default the newest month."
          },
          "amount": {
            "title": "Amount",
            "type": "number",
            "description": "For adjust: the money amount to convert, e.g. 100. Default 100."
          },
          "country": {
            "title": "Country (adjust)",
            "type": "string",
            "description": "For adjust: one country, e.g. US or Germany. Default US."
          },
          "fromYear": {
            "title": "From year",
            "type": "integer",
            "description": "For adjust: the year of the original amount. Default 10 years before To year."
          },
          "toYear": {
            "title": "To year",
            "type": "integer",
            "description": "For adjust: the target year. Default the latest year with CPI data."
          },
          "fromMonth": {
            "title": "From month",
            "type": "string",
            "description": "For adjust with monthly precision (EU countries, HICP index): YYYY-MM."
          },
          "toMonth": {
            "title": "To month",
            "type": "string",
            "description": "For adjust with monthly precision (EU countries, HICP index): YYYY-MM."
          },
          "limit": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum rows returned. Between 1 and 20000.",
            "default": 1000
          },
          "onlyNew": {
            "title": "Only new periods (monitor)",
            "type": "boolean",
            "description": "Return only country/indicator/period rows not returned before for this Monitor ID. Schedule monthly to get each new HICP month or new World Bank year once.",
            "default": false
          },
          "monitorId": {
            "title": "Monitor ID",
            "type": "string",
            "description": "Name of the watch for only-new mode, e.g. my-dashboard. Each Monitor ID keeps its own memory.",
            "default": "default"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}