{
  "openapi": "3.0.1",
  "info": {
    "title": "Mexico DOF Scraper: Diario Oficial de la Federación API",
    "description": "DOF Mexico scraper: every publication of the Diario Oficial de la Federación (DOF hoy) as JSON. Decretos, acuerdos, NOM, aranceles, SAT rules, plus tipo de cambio FIX, UDIS and TIIE. Daily alerts, keyword filters. No login.",
    "version": "1.0",
    "x-build-id": "xKLYsPEHbWRqwbBAe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/daperk~dof-mexico-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-daperk-dof-mexico-scraper",
        "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/daperk~dof-mexico-scraper/runs": {
      "post": {
        "operationId": "runs-sync-daperk-dof-mexico-scraper",
        "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/daperk~dof-mexico-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-daperk-dof-mexico-scraper",
        "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": {
          "dateFrom": {
            "title": "From date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "First day to check (YYYY-MM-DD) or a relative value like \"7 days\". Leave empty to use 'Days back'. Max range per run is 366 days."
          },
          "dateTo": {
            "title": "To date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "Last day to check (YYYY-MM-DD). Leave empty for today (Mexico City time)."
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "Used only when 'From date' is empty. 0 = only the 'To date' day. 7 = the last 8 days.",
            "default": 7
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Only return notes whose title or agency contains these words. Accents and case are ignored (\"energia\" matches \"Energía\"). Leave empty to get everything.",
            "items": {
              "type": "string"
            }
          },
          "keywordMode": {
            "title": "Keyword match",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "'any' = at least one keyword. 'all' = every keyword must appear.",
            "default": "any"
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop notes whose title or agency contains any of these words.",
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Only these issuing agencies (partial match). Examples: SECRETARIA DE ECONOMIA, SECRETARIA DE HACIENDA, BANCO DE MEXICO, SECRETARIA DE SALUD.",
            "items": {
              "type": "string"
            }
          },
          "powers": {
            "title": "Branch of government",
            "type": "array",
            "description": "Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "PE",
                "PL",
                "PJ",
                "OA"
              ],
              "enumTitles": [
                "Poder Ejecutivo",
                "Poder Legislativo",
                "Poder Judicial",
                "Organismos Autonomos"
              ]
            }
          },
          "docTypes": {
            "title": "Document types",
            "type": "array",
            "description": "Only these types (detected from the title). Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "DECRETO",
                "ACUERDO",
                "NOM",
                "PROYECTO_NOM",
                "NORMA_MEXICANA",
                "RESOLUCION",
                "CONVOCATORIA",
                "LINEAMIENTOS",
                "REGLAS",
                "CIRCULAR",
                "LEY",
                "REGLAMENTO",
                "SENTENCIA",
                "CONVENIO",
                "CONCESION",
                "TARIFAS",
                "EXTRACTO",
                "AVISO",
                "OFICIO",
                "ESTATUTO",
                "MANUAL",
                "TIPO_DE_CAMBIO_O_TASAS",
                "OTRO"
              ],
              "enumTitles": [
                "Decreto",
                "Acuerdo",
                "Norma Oficial Mexicana (NOM)",
                "Proyecto de NOM",
                "Norma Mexicana (NMX)",
                "Resolucion",
                "Convocatoria",
                "Lineamientos",
                "Reglas",
                "Circular",
                "Ley",
                "Reglamento",
                "Sentencia",
                "Convenio",
                "Concesion",
                "Tarifas",
                "Extracto",
                "Aviso",
                "Oficio",
                "Estatuto",
                "Manual",
                "Tipo de cambio / tasas",
                "Otro"
              ]
            }
          },
          "editions": {
            "title": "Editions",
            "type": "array",
            "description": "Morning, evening and extraordinary editions. Leave empty for all three.",
            "items": {
              "type": "string",
              "enum": [
                "MAT",
                "VES",
                "EXT"
              ],
              "enumTitles": [
                "Matutina (morning)",
                "Vespertina (evening)",
                "Extraordinaria"
              ]
            }
          },
          "includeAvisos": {
            "title": "Include 'Avisos judiciales y generales'",
            "type": "boolean",
            "description": "Adds the paid notices section (titles look like 'Aviso REF:581469'). Off by default because it is mostly court edicts. Full text is never fetched for these.",
            "default": false
          },
          "includeFullText": {
            "title": "Include full text",
            "type": "boolean",
            "description": "Download the full plain text of each note. Costs more per note and is slower (one extra request per note).",
            "default": false
          },
          "maxTextChars": {
            "title": "Max text length",
            "minimum": 500,
            "maximum": 500000,
            "type": "integer",
            "description": "Cut the full text after this many characters.",
            "default": 20000
          },
          "includeIndicators": {
            "title": "Include financial indicators",
            "type": "boolean",
            "description": "Also save the daily official values: DOLAR (tipo de cambio FIX), UDIS, TIIE 28/91/182 days and TIIE de fondeo.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new notes (alerts mode)",
            "type": "boolean",
            "description": "Skip notes this Actor already returned in earlier runs with the same 'State name'. Turn this on for a daily schedule so you only get (and pay for) new items.",
            "default": false
          },
          "stateKey": {
            "title": "State name",
            "type": "string",
            "description": "Name for the 'already seen' list used by 'Only new notes'. Use a different name for each saved task.",
            "default": "default"
          },
          "maxItems": {
            "title": "Max notes",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many notes. Newest days are processed first.",
            "default": 500
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 100,
            "maximum": 10000,
            "type": "integer",
            "description": "Polite pause between calls to the government server.",
            "default": 400
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}