{
  "openapi": "3.0.1",
  "info": {
    "title": "Diário Oficial Monitor: DOU, Estados e Municípios",
    "description": "Search and monitor Brazil's official gazettes: federal DOU, São Paulo state DOE-SP and ~380 municipal gazettes (Querido Diário). Tenders, contracts and any keyword, with excerpt, agency and links. Monitor mode returns only new hits. No login or API key.",
    "version": "0.1",
    "x-build-id": "iy2gH1KeecwuZgfui"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/allanmxr~brazil-official-gazettes/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-allanmxr-brazil-official-gazettes",
        "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/allanmxr~brazil-official-gazettes/runs": {
      "post": {
        "operationId": "runs-sync-allanmxr-brazil-official-gazettes",
        "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/allanmxr~brazil-official-gazettes/run-sync": {
      "post": {
        "operationId": "run-sync-allanmxr-brazil-official-gazettes",
        "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": [
          "keywords"
        ],
        "properties": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words or phrases to look for in the gazettes. One search per keyword; the same gazette never appears twice.",
            "items": {
              "type": "string"
            }
          },
          "exactPhrase": {
            "title": "Exact phrase",
            "type": "boolean",
            "description": "Match each keyword as a whole phrase. DOE-SP has no phrase syntax and always receives the keyword as typed.",
            "default": true
          },
          "sources": {
            "title": "Sources",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "Gazettes to search. The item budget (Max items) is shared equally between them.",
            "items": {
              "type": "string",
              "enum": [
                "dou",
                "querido_diario",
                "doe_sp"
              ],
              "enumTitles": [
                "DOU: Diário Oficial da União (federal)",
                "Querido Diário (municipal gazettes, ~380 cities)",
                "DOE-SP: Diário Oficial do Estado de São Paulo (state)"
              ]
            },
            "default": [
              "dou",
              "querido_diario",
              "doe_sp"
            ]
          },
          "dateFrom": {
            "title": "Published from",
            "type": "string",
            "description": "First publication date, as yyyy-mm-dd or a relative value such as 7 days. Leave empty for today and the 7 days before it (the first-run period in monitor mode). In monitor mode it only applies until the first complete read."
          },
          "dateTo": {
            "title": "Published until",
            "type": "string",
            "description": "Last publication date. Leave empty for today. Ignored in monitor mode."
          },
          "states": {
            "title": "States",
            "uniqueItems": true,
            "type": "array",
            "description": "Restricts Querido Diário to the cities of these states. DOE-SP only runs when this is empty or includes SP. It does not filter the DOU.",
            "items": {
              "type": "string",
              "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"
              ],
              "enumTitles": [
                "AC - Acre",
                "AL - Alagoas",
                "AP - Amapá",
                "AM - Amazonas",
                "BA - Bahia",
                "CE - Ceará",
                "DF - Distrito Federal",
                "ES - Espírito Santo",
                "GO - Goiás",
                "MA - Maranhão",
                "MT - Mato Grosso",
                "MS - Mato Grosso do Sul",
                "MG - Minas Gerais",
                "PA - Pará",
                "PB - Paraíba",
                "PR - Paraná",
                "PE - Pernambuco",
                "PI - Piauí",
                "RJ - Rio de Janeiro",
                "RN - Rio Grande do Norte",
                "RS - Rio Grande do Sul",
                "RO - Rondônia",
                "RR - Roraima",
                "SC - Santa Catarina",
                "SP - São Paulo",
                "SE - Sergipe",
                "TO - Tocantins"
              ]
            }
          },
          "municipalities": {
            "title": "Municipalities",
            "type": "array",
            "description": "Querido Diário only. Use Name/UF (for example Barueri/SP) or the 7-digit IBGE code. When set, the states filter is ignored there.",
            "items": {
              "type": "string"
            }
          },
          "douSections": {
            "title": "DOU sections",
            "uniqueItems": true,
            "type": "array",
            "description": "Empty means every section.",
            "items": {
              "type": "string",
              "enum": [
                "do1",
                "do2",
                "do3",
                "doe"
              ],
              "enumTitles": [
                "Section 1 (laws, decrees, regulations)",
                "Section 2 (personnel acts)",
                "Section 3 (tenders, contracts, notices)",
                "Extra editions"
              ]
            }
          },
          "douAgency": {
            "title": "DOU agency",
            "type": "string",
            "description": "Main agency exactly as the DOU lists it, for example Ministério da Educação."
          },
          "excerptsPerGazette": {
            "title": "Excerpts per gazette",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Querido Diário only: how many text excerpts around the keyword to return for each gazette.",
            "default": 3
          },
          "monitorMode": {
            "title": "Monitor mode",
            "type": "boolean",
            "description": "Returns only gazettes not seen in earlier runs with the same monitor. Schedule the Actor daily and every run pays only for what is new.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Names the saved state. Leave empty to derive it from the search settings."
          },
          "monitorFirstRunDays": {
            "title": "First run period (days)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many days back the first monitor run looks. Ignored when Published from is set.",
            "default": 3
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Total gazette hits across all sources. This is also the most you can be charged for.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. By default the Actor starts without a proxy and climbs to Apify datacenter, then Brazilian residential proxies, only when a portal blocks it."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}