{
  "openapi": "3.1.0",
  "info": {
    "title": "inflacion.app API Pública",
    "version": "2026-06-12",
    "description": "API estatica con datos mensuales de IPC y cotizaciones de dólar de Argentina para planillas, apps, dashboards y agentes de IA."
  },
  "servers": [
    {
      "url": "https://inflacion.app"
    }
  ],
  "paths": {
    "/api/ipc-argentina.json": {
      "get": {
        "summary": "Serie mensual IPC Argentina en JSON",
        "responses": {
          "200": {
            "description": "Serie completa del IPC con metadatos",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fuente": {
                      "type": "string"
                    },
                    "base": {
                      "type": "string"
                    },
                    "ultima_actualizacion": {
                      "type": "string"
                    },
                    "ultimo_dato_real": {
                      "type": "string"
                    },
                    "serie": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/IpcRow"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/ipc-argentina.csv": {
      "get": {
        "summary": "Serie mensual IPC Argentina en CSV",
        "responses": {
          "200": {
            "description": "CSV importable en Google Sheets, Excel, PowerQuery y PowerBI",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/dolar-argentina.json": {
      "get": {
        "summary": "Serie mensual de cotizaciones de dólar en JSON",
        "responses": {
          "200": {
            "description": "Serie completa de dólar oficial, MEP y blue con metadatos",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fuente": {
                      "type": "string"
                    },
                    "ultima_actualizacion": {
                      "type": "string"
                    },
                    "ultimo_dato_real": {
                      "type": "string"
                    },
                    "serie": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DolarRow"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/dolar-argentina.csv": {
      "get": {
        "summary": "Serie mensual de dólar en CSV",
        "responses": {
          "200": {
            "description": "CSV importable en Google Sheets, Excel, PowerQuery y PowerBI con las cotizaciones de dólar",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "IpcRow": {
        "type": "object",
        "properties": {
          "fecha": {
            "type": "string",
            "examples": [
              "2026-04"
            ]
          },
          "anio": {
            "type": "integer",
            "examples": [
              2026
            ]
          },
          "mes": {
            "type": "integer",
            "examples": [
              4
            ]
          },
          "mes_nombre": {
            "type": "string",
            "examples": [
              "abril"
            ]
          },
          "indice": {
            "type": "number",
            "examples": [
              11318.36
            ]
          },
          "variacion_mensual": {
            "type": [
              "number",
              "null"
            ],
            "examples": [
              2.6
            ]
          },
          "tipo": {
            "type": "string",
            "examples": [
              "real"
            ]
          },
          "fuente": {
            "type": "string"
          }
        }
      },
      "DolarRow": {
        "type": "object",
        "properties": {
          "fecha": {
            "type": "string",
            "examples": [
              "2026-06"
            ]
          },
          "anio": {
            "type": "integer",
            "examples": [
              2026
            ]
          },
          "mes": {
            "type": "integer",
            "examples": [
              6
            ]
          },
          "mes_nombre": {
            "type": "string",
            "examples": [
              "junio"
            ]
          },
          "oficial": {
            "type": "number",
            "examples": [
              1460
            ]
          },
          "mep": {
            "type": [
              "number",
              "null"
            ],
            "examples": [
              1461.4
            ]
          },
          "blue": {
            "type": [
              "number",
              "null"
            ],
            "examples": [
              1435
            ]
          },
          "tipo": {
            "type": "string",
            "examples": [
              "real"
            ]
          },
          "fuente": {
            "type": "string"
          }
        }
      }
    }
  }
}
