{
  "openapi": "3.0.1",
  "info": {
    "title": "Brazil Congress Budget Amendments: emendas parlamentares",
    "description": "Emendas parlamentares, convênios e favorecidos pessoa jurídica dos dados abertos do Portal da Transparência (CGU), por autor, UF, tipo, função ou ano. JSON, CSV ou Excel, sem chave de API.",
    "version": "0.0",
    "x-build-id": "TqQEyyF0yKmDeZoHe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/soleene~brazil-congress-budget-amendments-emendas-parlamentares/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-soleene-brazil-congress-budget-amendments-emendas-parlamentares",
        "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/soleene~brazil-congress-budget-amendments-emendas-parlamentares/runs": {
      "post": {
        "operationId": "runs-sync-soleene-brazil-congress-budget-amendments-emendas-parlamentares",
        "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/soleene~brazil-congress-budget-amendments-emendas-parlamentares/run-sync": {
      "post": {
        "operationId": "run-sync-soleene-brazil-congress-budget-amendments-emendas-parlamentares",
        "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",
        "required": [
          "tipo"
        ],
        "properties": {
          "tipo": {
            "title": "O que devolver",
            "enum": [
              "emendas",
              "convenios",
              "favorecidos"
            ],
            "type": "string",
            "description": "emendas: uma linha por emenda e localidade, com valores empenhado, liquidado e pago. convenios: convênios ligados a emendas. favorecidos: quem recebeu o dinheiro, só pessoa jurídica (o arquivo de favorecidos tem 183 MB e a leitura leva mais tempo).",
            "default": "emendas"
          },
          "ano": {
            "title": "Ano (opcional)",
            "minimum": 2014,
            "type": "integer",
            "description": "Em emendas, o ano da emenda. Em convênios, o ano de publicação. Em favorecidos, o ano do pagamento. O arquivo cobre de 2014 até o ano corrente.",
            "default": 2024
          },
          "uf": {
            "title": "Estado (opcional)",
            "enum": [
              "AC",
              "AL",
              "AP",
              "AM",
              "BA",
              "CE",
              "DF",
              "ES",
              "GO",
              "MA",
              "MT",
              "MS",
              "MG",
              "PA",
              "PB",
              "PR",
              "PE",
              "PI",
              "RJ",
              "RN",
              "RS",
              "RO",
              "RR",
              "SC",
              "SP",
              "SE",
              "TO"
            ],
            "type": "string",
            "description": "Sigla do estado. Em emendas e convênios, é o estado de aplicação do recurso. Em favorecidos, é o estado do favorecido.",
            "default": "AP"
          },
          "autor": {
            "title": "Autor da emenda (opcional)",
            "type": "string",
            "description": "Parte do nome do parlamentar, bancada ou comissão. Não existe em convênios."
          },
          "municipio": {
            "title": "Município (opcional)",
            "type": "string",
            "description": "Parte do nome do município. Em emendas, o do recurso; em favorecidos, o do favorecido. Não existe em convênios."
          },
          "tipoEmenda": {
            "title": "Tipo de emenda (opcional)",
            "type": "string",
            "description": "Parte do tipo. Exemplos: individual, bancada, comissão, relator, transferências especiais."
          },
          "funcao": {
            "title": "Função (opcional)",
            "type": "string",
            "description": "Parte do nome da função orçamentária. Exemplos: saúde, educação, urbanismo. Não existe em favorecidos."
          },
          "favorecido": {
            "title": "Favorecido (opcional, só para favorecidos)",
            "type": "string",
            "description": "Parte da razão social ou um CNPJ (com ou sem pontuação)."
          },
          "valorMinimo": {
            "title": "Valor mínimo em reais (opcional)",
            "minimum": 0,
            "type": "number",
            "description": "Em emendas, vale para o valor pago. Em convênios, para o valor do convênio. Em favorecidos, para o valor recebido."
          },
          "mascararCpf": {
            "title": "Mascarar CPF se aparecer no texto",
            "type": "boolean",
            "description": "Ligado por padrão. CPF que aparecer em nome ou objeto sai como ***.456.789-**. Desligue para manter o texto como a fonte publica.",
            "default": true
          },
          "limite": {
            "title": "Limite de registros",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Máximo de registros nesta execução. O padrão é pequeno para teste. O teto é 10.000.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}