{
  "openapi": "3.0.1",
  "info": {
    "title": "LatAm Official Gazette Monitor: Diário Oficial, DOF, Boletín",
    "description": "Keyword search & daily alerts in Latin American official gazettes: Brazil municipal Diários Oficiais, Mexico DOF, Buenos Aires Boletín Oficial. Tenders, regulations, concessions. Official open-data APIs. $2 per 1,000 publications.",
    "version": "0.1",
    "x-build-id": "iaCWYixcw4VDTNuft"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/frankely84~latam-official-gazette-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-frankely84-latam-official-gazette-monitor",
        "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/frankely84~latam-official-gazette-monitor/runs": {
      "post": {
        "operationId": "runs-sync-frankely84-latam-official-gazette-monitor",
        "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/frankely84~latam-official-gazette-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-frankely84-latam-official-gazette-monitor",
        "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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words or phrases to look for. A publication matches if it contains ANY item (OR between items); words inside one item must all appear (AND). Wrap an item in quotes for an exact phrase, e.g. \"pregão eletrônico\". Accent- and case-insensitive. Tip: add both Portuguese and Spanish terms when you search several countries. Leave empty to get every publication in the date range (capped by Max items).",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "title": "Gazettes",
            "type": "array",
            "description": "Which gazettes to search. BR_MUNICIPAL: Brazil municipal Diários Oficiais indexed by Querido Diário (hundreds of cities). MX_DOF: Mexico's federal Diario Oficial de la Federación. AR_CABA: Boletín Oficial de la Ciudad de Buenos Aires. AR_BORA: Argentina's national Boletín Oficial de la República Argentina (decrees, resolutions, official notices and national public procurement calls; full-text keyword search). Leave empty to search BR_MUNICIPAL, MX_DOF and AR_CABA (AR_BORA must be selected explicitly).",
            "items": {
              "type": "string",
              "enum": [
                "BR_MUNICIPAL",
                "MX_DOF",
                "AR_CABA",
                "AR_BORA"
              ],
              "enumTitles": [
                "Brazil – municipal Diários Oficiais",
                "Mexico – Diario Oficial de la Federación",
                "Argentina – Boletín Oficial Ciudad de Buenos Aires",
                "Argentina – Boletín Oficial de la República Argentina (national, BORA)"
              ]
            },
            "default": [
              "BR_MUNICIPAL",
              "MX_DOF",
              "AR_CABA"
            ]
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "First day to search (YYYY-MM-DD). Leave empty to use 'Last N days' instead. The range is capped at 366 days; if Date from is after Date to they are swapped."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Last day to search (YYYY-MM-DD). Leave empty for today."
          },
          "lastDays": {
            "title": "Last N days",
            "minimum": 1,
            "maximum": 366,
            "type": "integer",
            "description": "Only used when Date from is empty. 1 = today only, 3 = today and the two previous days. For a daily alert, 2 or 3 gives a safety margin for late publications (Alert mode removes duplicates).",
            "default": 3
          },
          "onlyNew": {
            "title": "Alert mode: only new publications",
            "type": "boolean",
            "description": "Remembers which publications this monitor already returned and outputs (and charges) only new ones. Schedule the Actor daily or hourly to get alerts by email, Slack or webhook through Apify integrations.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of this alert. Each name keeps its own memory of seen publications, so use a different name for each keyword set or client (e.g. 'sp-licitacoes', 'mx-concesiones'). Only used in Alert mode.",
            "default": "default"
          },
          "brazilStates": {
            "title": "Brazil: states (UF)",
            "type": "array",
            "description": "Optional, Brazil only. Two-letter state codes (UF) such as SP, RJ, MG. Leave empty for all states. Ignored by Mexico and Buenos Aires.",
            "items": {
              "type": "string"
            }
          },
          "brazilTerritoryIds": {
            "title": "Brazil: municipality IBGE codes",
            "type": "array",
            "description": "Optional, Brazil only. 7-digit IBGE municipality codes, e.g. 3550308 (São Paulo), 3509502 (Campinas), 3304557 (Rio de Janeiro). Narrows the search to those cities. Ignored by Mexico and Buenos Aires.",
            "items": {
              "type": "string"
            }
          },
          "argentinaSections": {
            "title": "Argentina national gazette (AR_BORA) sections",
            "type": "array",
            "description": "Only used with AR_BORA. 'primera' = Legislación y avisos oficiales (decrees, resolutions, edictos, official notices); 'tercera' = Contrataciones (national public tenders: licitaciones, concursos, adjudicaciones, dictámenes). Leave empty for both. Segunda sección (companies) is not included.",
            "items": {
              "type": "string",
              "enum": [
                "primera",
                "tercera"
              ],
              "enumTitles": [
                "Primera – Legislación y avisos oficiales",
                "Tercera – Contrataciones (licitaciones)"
              ]
            }
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of publications to return per run. You are charged only for publications returned, so this is also your cost cap.",
            "default": 1000
          },
          "maxRunSeconds": {
            "title": "Max run time (seconds)",
            "minimum": 0,
            "maximum": 86400,
            "type": "integer",
            "description": "Optional safety cap: the Actor stops fetching shortly before this many seconds and finishes with SUCCEEDED, keeping all results found so far. 0 or empty = no extra cap (only the run timeout applies). Raise it or set 0 for big searches."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}