{
  "info": {
    "name": "Eleições 2026: Dados Públicos do TSE — mcp.ai",
    "description": "REST API for the Eleições 2026: Dados Públicos do TSE MCP. Set {{apiKey}} to a workspace key (sk_live_…) created at https://new.mcp.ai/settings/api-keys.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.mcp.ai/api/eleicoes",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "sk_live_...",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "eleicoes_buscar_candidato",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/buscar/candidato",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "buscar",
            "candidato"
          ]
        },
        "description": "Candidates for every 2026 office (president, governor, senator, deputies) by ballot name or number: party, office, state, status and 1st round votes summed from the ballot box reports, with votes by city.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"ano\": 0,\n  \"termos\": \"\",\n  \"cargo\": \"\",\n  \"uf\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "eleicoes_cobertura",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/cobertura",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "cobertura"
          ]
        },
        "description": "How much data is available: sections with a ballot box report (BU) and with a voting machine log per state, out of the TSE total, and the time of the last sync. Use it before drawing conclusions from per-section data.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"ano\": 0,\n  \"turno\": 0\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "eleicoes_como_ler",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/como/ler",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "como",
            "ler"
          ]
        },
        "description": "Short, neutral glossary: ballot box report, voting machine log, load code, why some sections close after 5 pm, extension, time zones, aggregate biometrics, file versions and SHA-256. Also shows where each piece of data comes from.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"ano\": 0\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "eleicoes_comparar_turnos",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/comparar/turnos",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "comparar",
            "turnos"
          ]
        },
        "description": "1st and 2nd round side by side, numbers only: for Brazil, a state or a city (official totals) or a section (ballot box report), with the 2nd minus 1st difference in each field and a check that the changes add up.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"ano\": 0,\n  \"uf\": \"\",\n  \"municipio\": \"\",\n  \"zona\": \"\",\n  \"secao\": \"\",\n  \"cargo\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "eleicoes_conferir_bu_impresso",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/conferir/bu/impresso",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "conferir",
            "bu",
            "impresso"
          ]
        },
        "description": "Returns the official ballot box report of a section, field by field, to compare with a printed report. Find it by the load code printed on the paper or by state + city + zone + section. Does not read photos: the comparison is yours to make.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"ano\": 0,\n  \"codigo_carga\": \"\",\n  \"turno\": 0,\n  \"uf\": \"\",\n  \"municipio\": \"\",\n  \"zona\": \"\",\n  \"secao\": \"\",\n  \"itens\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "eleicoes_consulta_sql",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/consulta/sql",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "consulta",
            "sql"
          ]
        },
        "description": "Runs ONE read-only SELECT (or WITH … SELECT) on the public election tables (see eleicoes_esquema first). A pre-flight check on the query plan estimates the rows read and refuses above 5 million before running.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"ano\": 0,\n  \"sql\": \"\",\n  \"limite\": 0\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "eleicoes_consultar_secao",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/consultar/secao",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "consultar",
            "secao"
          ]
        },
        "description": "Official ballot box report (BU) of an electoral section in the 2026 elections: votes per candidate, blank, null, eligible voters, turnout, opening and closing time (local and Brasília), aggregate biometrics, load code, urn number and type, and from the log the urn model, versions, signature checks, power-on time and load computer, with the source file and SHA-256.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"ano\": 0,\n  \"turno\": 0,\n  \"uf\": \"\",\n  \"municipio\": \"\",\n  \"zona\": \"\",\n  \"secao\": \"\",\n  \"secoes\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "eleicoes_esquema",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/esquema",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "esquema"
          ]
        },
        "description": "Public tables and columns of this MCP's SQL database (secoes, municipios, totais_municipio, candidatos, votos_por_minuto, fontes), with the meaning of each column, 5 example queries and the source files.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"ano\": 0\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "eleicoes_estimar_sql",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/estimar/sql",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "estimar",
            "sql"
          ]
        },
        "description": "Only the pre-flight check of eleicoes_consulta_sql, without running it: validates the SELECT, shows the plan, the estimated rows per table and whether it would be refused (limit of 5 million rows read).",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"ano\": 0,\n  \"sql\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "eleicoes_exportar_csv",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/exportar/csv",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "exportar",
            "csv"
          ]
        },
        "description": "Same slice as filtrar_secoes, for one state (optionally one city), exported as a full CSV: returns a link that expires in 24 h, the CSV's sha256 and the row count. Up to 200 thousand rows per export.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"ano\": 0,\n  \"turno\": 0,\n  \"uf\": \"\",\n  \"municipio\": \"\",\n  \"filtros\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "eleicoes_filtrar_secoes",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/filtrar/secoes",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "filtrar",
            "secoes"
          ]
        },
        "description": "Filters and aggregates sections (president) without SQL, on the server: filters {field, op, value} (e.g.: closing > '18:00', votos_13, turnout, abstention %, without-biometrics %, log votes since 5 pm), aggregations and pagination.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"ano\": 0,\n  \"turno\": 0,\n  \"uf\": \"\",\n  \"municipio\": \"\",\n  \"filtros\": \"\",\n  \"agrupar_por\": \"\",\n  \"metricas\": \"\",\n  \"ordenar\": {},\n  \"limite\": 0,\n  \"cursor\": 0\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "eleicoes_timeline_divulgacao",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/timeline/divulgacao",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "timeline",
            "divulgacao"
          ]
        },
        "description": "Release timeline of the 2nd round in Brazil or a state: each version of the results file published by the TSE (or one row per hour, with the votes added in that hour), with % of sections counted and votes per candidate.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"ano\": 0,\n  \"uf\": \"\",\n  \"cargo\": \"\",\n  \"agrupar\": \"\",\n  \"max_pontos\": 0,\n  \"de\": \"\",\n  \"ate\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "eleicoes_totais",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/totais",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "totais"
          ]
        },
        "description": "Official totals per candidate (votes, % of valid votes, blank, null, turnout, abstentions, sections counted) for Brazil, a state or a city, from the latest collected version of the results file.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"ano\": 0,\n  \"turno\": 0,\n  \"nivel\": \"\",\n  \"codigo\": \"\",\n  \"uf\": \"\",\n  \"municipio\": \"\",\n  \"cargo\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "eleicoes_verificar_hash",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/verificar/hash",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "verificar",
            "hash"
          ]
        },
        "description": "Tells whether a SHA-256 matches an official TSE file available here and which file it is; or, given a file name (e.g.: o03221pr7691000660045-bu.dat, br-c0001-e006258-u.json), returns its recorded SHA-256 and official link.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"ano\": 0,\n  \"sha256\": \"\",\n  \"arquivo\": \"\",\n  \"itens\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "eleicoes_votos_por_horario",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/votos/por/horario",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "votos",
            "por",
            "horario"
          ]
        },
        "description": "Votes cast per time slot (Brasília) in the 2nd round, counted from the voting machine logs, by state, by city or with uf 'BR' for all states side by side. States how many sections have a log available in each case.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"ano\": 0,\n  \"turno\": 0,\n  \"uf\": \"\",\n  \"municipio\": \"\",\n  \"de\": \"\",\n  \"ate\": \"\",\n  \"intervalo_minutos\": 0\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    }
  ]
}