# DOF Mexico Official Gazette & Sanctions Scraper (`scrapers_lat/dof-scraper`) Actor

Scrape Mexico's Diario Oficial de la Federacion (DOF), the official federal gazette, by keyword or date. Extract title, publication date, issuing body, agency, gazette ID, URL and full text for sanctions, insolvency and appointment notices. Export to JSON, CSV or Excel.

- **URL**: https://apify.com/scrapers\_lat/dof-scraper.md
- **Developed by:** [Scrapers Lat](https://apify.com/scrapers_lat) (community)
- **Categories:** Business, News, Automation
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $9.23 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

[![DOF Mexico Official Gazette & Sanctions Scraper](https://scrapers.lat/banners/dof-scraper.png)](https://console.apify.com/actors/42VqM3vAEebILKhpr/input)

## DOF Mexico Official Gazette & Sanctions Scraper

> Extract entries from Mexico's Diario Oficial de la Federacion, the official federal gazette with sanctions, insolvency and appointment notices going back decades

**📥 [Input](https://apify.com/scrapers_lat/dof-scraper/input-schema) · 📤 [Output](https://apify.com/scrapers_lat/dof-scraper/output-schema) · 💰 [Pricing](https://apify.com/scrapers_lat/dof-scraper/pricing) · ▶️ [Examples](https://apify.com/scrapers_lat/dof-scraper/examples)**

![Apify](https://img.shields.io/badge/Platform-Apify-1CE1CE?logo=apify\&logoColor=white)
![Coverage](https://img.shields.io/badge/Coverage-Mexico-blue)
![Maintained](https://img.shields.io/badge/Maintained-Yes-brightgreen)
![Output](https://img.shields.io/badge/Output-JSON%20%7C%20CSV%20%7C%20Excel-orange)

<table><tr>
<td align="center"><strong>13 fields</strong><br>per record</td>
<td align="center"><strong>Mexico</strong><br>federal gazette</td>
<td align="center"><strong>JSON / CSV / Excel</strong><br>output formats</td>
</tr></table>

<br>

### Who is it for

| Use case | Who benefits |
|---|---|
| Screen company sanctions and inhabilitaciones | KYC, AML and compliance teams |
| Track concursos mercantiles (insolvency) filings | Risk analysts and credit teams |
| Monitor public-official appointments and removals | Due diligence and adverse-media researchers |
| Watch tenders and convocatorias by date | Government-contract bidders |
| Build an adverse-media feed of official acts | Legal and investigative analysts |

### Frequently Asked Questions

**What does this scraper cover and how far back does it go?**
It searches the entire public archive of the Diario Oficial de la Federacion, Mexico's official federal gazette. Keyword searches return matching entries across all available years, and date searches let you target a specific publication window.

**How many entries can I collect in one run?**
You set the limit with Max Items. A keyword like inhabilitacion or concurso returns hundreds to thousands of matching entries, and the scraper pages through them until it reaches your limit.

**Can I filter by date or by issuing body?**
Yes. Set Date From and Date To (DD-MM-YYYY) to restrict a keyword search to a publication window, and pick an Issuing Body to narrow date searches to a single branch such as the Judicial Branch or Autonomous Bodies. A search term is always required.

**How do I get the full text of an entry?**
Turn on Fetch Full Content. The scraper then fetches the complete plain-text body of every matching entry and adds it to the content field. Full-content runs also enrich each entry with citation-grade metadata: the edition (morning or afternoon), the section, the starting page number, and a direct link to the official gazette document for that day, so you can cite and download the primary source.

**What happens when a field is not available?**
Convocatorias and similar notices have no secondary agency, so the agency field is empty for those entries. When a request fails, the scraper writes a record with an error message instead of dropping it silently.

### Example use cases

Ready-to-run example tasks, each preconfigured for a common scenario. Open one and press run, or use it as a template:

- [Mexico Bankruptcy Filings (Concurso Mercantil) Monitor - DOF](https://apify.com/scrapers_lat/dof-scraper/examples/mexico-bankruptcy-filings-concurso-mercantil-dof): Track Mexico bankruptcy and insolvency filings (concurso mercantil) published in the Diario Oficial de la Federacion. Fresh gazette entries daily.
- [Mexico Daily Exchange Rate (Tipo de Cambio) Tracker - DOF](https://apify.com/scrapers_lat/dof-scraper/examples/mexico-daily-exchange-rate-tipo-de-cambio-dof): Track the official Mexico peso to US dollar exchange rate (tipo de cambio) published daily in the Diario Oficial de la Federacion by Banxico.
- [Mexico Import Tariff (Arancel) Changes Monitor - DOF](https://apify.com/scrapers_lat/dof-scraper/examples/mexico-import-tariff-arancel-dof): Track Mexico import and export tariff changes (arancel) published in the Diario Oficial de la Federacion for trade and customs compliance.
- [Mexico Minimum Wage (Salario Minimo) Monitor - DOF](https://apify.com/scrapers_lat/dof-scraper/examples/mexico-minimum-wage-salario-minimo-dof): Monitor official Mexico minimum wage updates (salario minimo) published in the Diario Oficial de la Federacion for payroll and HR compliance.
- [Mexico Official Standards (NOM) Monitor - DOF](https://apify.com/scrapers_lat/dof-scraper/examples/mexico-official-standards-nom-dof): Track new and updated Mexican Official Standards (Normas Oficiales Mexicanas) published in the Diario Oficial de la Federacion for regulatory compliance.
- [Mexico Public Sector Appointments (Nombramiento) Tracker - DOF](https://apify.com/scrapers_lat/dof-scraper/examples/mexico-public-appointments-nombramiento-dof): Monitor Mexico public sector appointments (nombramiento) published in the Diario Oficial de la Federacion to track officials and government changes.
- [Mexico Sanctioned Contractors (Inhabilitacion) Tracker - DOF](https://apify.com/scrapers_lat/dof-scraper/examples/mexico-sanctioned-contractors-inhabilitacion-dof): Monitor Mexico debarred suppliers and sanctioned officials (inhabilitacion) published in the Diario Oficial de la Federacion for compliance screening.
- [Mexico Decree Monitoring in the Diario Oficial Federal Gazette](https://apify.com/scrapers_lat/dof-scraper/examples/mexico-decree-monitoring-diario-oficial): Mexico Decree Monitoring in the Diario Oficial Federal Gazette
- [Mexico Government Agreement Tracking in the DOF Gazette](https://apify.com/scrapers_lat/dof-scraper/examples/mexico-government-agreement-tracking-dof): Mexico Government Agreement Tracking in the DOF Gazette
- [Mexico Public Tender and Bid Monitoring in the DOF Gazette](https://apify.com/scrapers_lat/dof-scraper/examples/mexico-public-tender-monitoring-dof): Mexico Public Tender and Bid Monitoring in the DOF Gazette

### Export, API and AI agents (x402 + MCP)

Export the scraped data to **JSON, CSV or Excel**, pull it as a **dataset** through the Apify **API**, or wire it into your app with **no code**. This web scraper and data extractor also works for bulk data extraction and scheduled runs.

For AI agents: this Actor is available on **x402**, Apify's agentic payment standard built with Coinbase. An AI agent can discover, pay for and run it on its own with a funded wallet and a single HTTP request: no account, no subscription, no API key and no human in the loop. It also runs as an **MCP** tool inside Claude, Cursor and other AI clients out of the box. Learn more about [x402 agentic payments on Apify](https://docs.apify.com/platform/integrations/x402).

### Related scrapers

Need data from the same space? Here are other scrapers we build and maintain:

- [Google News Article Scraper](https://apify.com/scrapers_lat/google-news-scraper): Scrape Google News by search, topic or top headlines. Extract article titles, publisher names...
- [Instagram Profile & Posts Scraper](https://apify.com/scrapers_lat/instagram-scraper): Extract public Instagram profiles and recent posts by username without login.
- [YouTube Scraper](https://apify.com/scrapers_lat/youtube-scraper): Scrape YouTube videos and channels by search query, video URL or channel URL.
- [X (Twitter) Profiles & Tweets Scraper](https://apify.com/scrapers_lat/x-twitter-scraper): Extract public X (Twitter) tweets by tweet ID: text, author, likes, replies, media and timestamps.
- [Reddit Posts & Comments Scraper](https://apify.com/scrapers_lat/reddit-scraper): Extract Reddit posts and comments from subreddits and search results using the public Reddit feeds.
- [TikTok Creative Center Top Ads Scraper](https://apify.com/scrapers_lat/tiktok-creative-center-scraper): Scrape top-performing TikTok ads from the public Creative Center by country, time period and...

### More scrapers at scrapers.lat

This actor is built and maintained by [scrapers.lat](https://scrapers.lat), where we publish scrapers for Latin American and US public platforms: real estate, jobs, e-commerce, company registries and government data. Browse the full catalog, see live sample output for each one, or ask us for a custom scraper at [scrapers.lat](https://scrapers.lat).

***

> This actor is an independent tool and has no affiliation with the Diario Oficial de la Federacion or the Government of Mexico. It only accesses data that is publicly available on the platform. Use it in accordance with the site's terms of service.

# Actor input Schema

## `maxPublications` (type: `integer`):

Maximum number of Diario Oficial gazette publications (notas) to collect. Optional.

## `searchTerm` (type: `string`):

Keyword or phrase to search the Diario Oficial de la Federacion (Mexico's official federal gazette). Examples: concurso mercantil (insolvency), inhabilitacion (sanctions), nombramiento (appointments), or any company/person name. Required.

## `searchIn` (type: `string`):

Where to match the search term: the title/index of each entry, or the full content of the gazette entry.

## `matchType` (type: `string`):

How multi-word terms are matched: all words, an exact phrase, or any of the words.

## `dateFrom` (type: `string`):

Start of the publication date range, format DD-MM-YYYY (e.g. 01-01-2026). When both Date From and Date To are set, the actor runs a date-filtered search; leave both empty to search the whole archive by keyword.

## `dateTo` (type: `string`):

End of the publication date range, format DD-MM-YYYY (e.g. 20-06-2026).

## `organism` (type: `string`):

Restrict date-filtered searches to one issuing body. Leave as All to include every body. Only applies when a date range is set.

## `withContent` (type: `boolean`):

When enabled, the actor fetches the full text content of each gazette entry (one extra request per entry) and adds it to the output.

## Actor input object example

```json
{
  "maxPublications": 10,
  "searchTerm": "concurso mercantil",
  "searchIn": "title",
  "matchType": "all",
  "dateFrom": "",
  "dateTo": "",
  "organism": "all",
  "withContent": false
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxPublications": 10,
    "searchTerm": "concurso mercantil"
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapers_lat/dof-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "maxPublications": 10,
    "searchTerm": "concurso mercantil",
}

# Run the Actor and wait for it to finish
run = client.actor("scrapers_lat/dof-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxPublications": 10,
  "searchTerm": "concurso mercantil"
}' |
apify call scrapers_lat/dof-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapers_lat/dof-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/42VqM3vAEebILKhpr/builds/0VXPNbHDVRbXCcjGl/openapi.json
