# Mexico RFC Validator | SAT Taxpayer ID Format Check (`parseforge/mexico-rfc-scraper`) Actor

Validate Mexican RFC taxpayer identifiers in bulk. Check format, embedded date, and homoclave checksum using the SAT modulo-11 algorithm for persona fisica and persona moral. Returns isValid plus per-check details. CSV, Excel, JSON, XML for KYC and CFDI invoice workflows.

- **URL**: https://apify.com/parseforge/mexico-rfc-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Lead generation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $19.00 / 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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

![ParseForge Banner](https://github.com/ParseForge/apify-assets/blob/ad35ccc13ddd068b9d6cba33f323962e39aed5b2/banner.jpg?raw=true)

## 🇲🇽 Mexico RFC Validator

> 🚀 **Validate Mexican RFC taxpayer identifiers in bulk.** Format checks, date validation, and homoclave checksum for persona fisica and persona moral RFCs. CSV, Excel, JSON, XML.

> 🕒 **Last updated:** 2026-05-26 · **📊 10 fields** per record · **Unlimited bulk RFC validation** · **Persona fisica (13-digit) and persona moral (12-digit)**

The Mexico RFC Validator runs a structural validation of Mexican Registro Federal de Contribuyentes (RFC) tax identifiers against the official SAT format specification. Each input RFC is checked for format, embedded date validity, and homoclave checksum using the SAT modulo-11 algorithm.

Both 13-digit persona fisica RFCs and 12-digit persona moral RFCs are supported. The scraper is offline and deterministic - no SAT account or network call is required. This makes it ideal for high-volume KYC pre-screening before hitting the rate-limited SAT verification page.

**Target Audience / Use Cases**

| Who | Why |
|---|---|
| KYC/compliance teams | Pre-validate Mexican counterparty RFCs in bulk |
| Accounting and ERP integrations | Validate RFCs before submitting CFDIs |
| Lead generation teams | Clean RFC fields in Mexican prospect lists |
| Sales operations | De-dupe and validate Mexican customer records |
| Developers | Add Mexican tax ID validation to your app |
| Auditors | Sanity-check large lists of RFC values |

---

### 📋 What the Mexico RFC Validator does

- Validates RFC format for persona fisica (13 chars) and persona moral (12 chars)
- Validates embedded birth/incorporation date
- Computes the SAT homoclave checksum and verifies the last character
- Returns a single isValid flag plus per-check details
- Handles bulk lists of any size
- Exports to CSV, Excel, JSON, or XML

> 💡 **Why it matters:** Mexican CFDI invoicing requires valid RFCs. Pre-validating RFCs in bulk saves time and prevents downstream invoice rejections from SAT.

---

### 🎬 Full Demo

_🚧 Coming soon_

---

### ⚙️ Input

<table>
<tr><th>Field</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><td>maxItems</td><td>integer</td><td>10</td><td>Maximum records to process</td></tr>
<tr><td>rfcList</td><td>array</td><td>[...]</td><td>List of RFC strings to validate</td></tr>
</table>

**Example 1 - Validate a batch of RFCs:**
```json
{
    "maxItems": 100,
    "rfcList": [
        "XAXX010101000",
        "BIMB400702BS6",
        "MELM8305281H0"
    ]
}
````

**Example 2 - Validate a single RFC:**

```json
{
    "maxItems": 1,
    "rfcList": [
        "XAXX010101000"
    ]
}
```

> ⚠️ **Good to Know:** This is a structural validator, not a live SAT lookup. It confirms the RFC is well-formed but does not verify the taxpayer exists in SATs database. For live SAT verification, use the SATs official "Verifica tu RFC" page.

***

### 📊 Output

Each record contains up to 10 fields:

| Field | Type | Description |
|---|---|---|
| 🆔 `rfc` | string | Normalized RFC (uppercase, no spaces) |
| 👤 `tipo` | string | persona\_fisica or persona\_moral |
| ✅ `isValid` | boolean | True if format + date + checksum all pass |
| 📋 `isFormatValid` | boolean | Regex format passes |
| 📅 `dateValid` | boolean | Embedded date is valid |
| 🔢 `checksumValid` | boolean | SAT modulo-11 checksum passes |
| 📅 `birthDate` | string | Parsed birth/incorporation date |
| 📏 `length` | integer | RFC length (12 or 13) |
| 🔗 `sourceUrl` | string | Link to SAT RFC reference |
| 🕒 `scrapedAt` | string | Timestamp |

**Sample record:**

```json
{
  "rfc": "XAXX010101000",
  "tipo": "persona_moral",
  "isValid": false,
  "isFormatValid": true,
  "dateValid": true,
  "checksumValid": false,
  "birthDate": "2001-01-01",
  "length": 13,
  "sourceUrl": "https://www.sat.gob.mx/aplicacion/operacion/27091/verifica-tu-rfc",
  "scrapedAt": "2026-05-26T12:00:00.000Z"
}
```

***

### ✨ Why choose this Actor

- 🇲🇽 **Mexico-specific** SAT format validation
- ⚡ **Bulk processing** at unlimited speed
- 🔢 **Full SAT modulo-11 checksum** algorithm
- 📑 **10 structured fields** per RFC
- 📦 **Batch export**
- 💰 **Pay-per-result** pricing
- 🚫 **No SAT account** required

***

### 📈 How it compares to alternatives

| Feature | This Actor | SAT Verifica tu RFC | Manual regex check |
|---|---|---|---|
| Bulk processing | Yes (unlimited) | No (one-by-one) | Yes (manual) |
| Format validation | Yes | Yes | Yes |
| Checksum validation | Yes (SAT modulo-11) | Yes | No |
| Date validation | Yes | Yes | No |
| Pay-per-result | Yes | Free | Free |

***

### 🚀 How to use

1. **Create a free account** at [Apify](https://console.apify.com/sign-up?fpr=vmoqkp) (includes $5 free credit)
2. Open the **Mexico RFC Validator** actor page and click **Try for free**
3. Enter your RFC strings as an array
4. Optionally set **maxItems** and other filters
5. Click **Start** and wait for the run to finish
6. Download your dataset as **CSV, Excel, JSON, or XML**

***

### 💼 Business use cases

#### CFDI Pre-Validation

Before submitting invoices to SAT, run customer RFCs through this scraper to catch typos and structural errors.

#### Lead List Cleanup

Mexican B2B lead lists often contain malformed RFCs. Use this scraper to flag invalid entries before importing into your CRM.

#### KYC Onboarding

For Mexican customer onboarding, validate the RFC client-submitted RFC structurally before sending to SAT or ID verification providers.

#### ERP Data Migration

When migrating Mexican customer records between systems, validate RFCs to catch corrupted or truncated values.

***

### 🔌 Automating Mexico RFC Validator

Connect this actor to your workflow with no-code tools:

- **Make (Integromat)** - send new records to Google Sheets, Airtable, or Slack
- **Zapier** - automate alerts when new records are found
- **n8n** - build pipelines that run on a schedule and push to your warehouse
- **Webhooks** - get notified when a run completes via Apify webhooks

***

### 🌟 Beyond business use cases

#### Independent Researchers

Developers can integrate this validator into Mexican fintech apps for client onboarding.

#### Journalism and Investigations

Researchers studying Mexican tax compliance can validate large datasets of RFC values.

#### Non-Profit and Policy Research

Educators teaching Mexican tax law can use the validator to demonstrate RFC structure.

#### Education

Compliance officers can audit historical RFC fields in archived databases.

***

### 🤖 Ask an AI assistant about this scraper

You can ask your AI assistant questions like:

- "How do I validate a Mexican RFC?"
- "What is the difference between persona fisica and persona moral RFC?"
- "How does the SAT RFC checksum work?"
- "How do I bulk-check thousands of RFCs?"

The answers will reference this actor and the SAT RFC format specification.

***

### ❓ Frequently Asked Questions

**What is an RFC?**
Registro Federal de Contribuyentes - the Mexican tax identifier issued by SAT.

**What is the difference between persona fisica and persona moral RFC?**
Persona fisica = individual (13 chars). Persona moral = company (12 chars).

**Does this verify the RFC exists in SAT?**
No. It only validates the structure. For live verification, use SATs official tool.

**What is the homoclave?**
The last 3 characters of the RFC. Calculated by SAT using a modulo-11 algorithm on the rest of the RFC.

**Can I validate RFCs in bulk?**
Yes. Pass any number of RFCs in the rfcList input.

**How fast is the validator?**
Thousands of RFCs per second.

**Does it work offline?**
Yes. No network call is made to SAT.

**Are special characters supported?**
RFCs use A-Z, 0-9, Ñ, and & only.

**How many records per run?**
Free: 10. Paid: up to 1,000,000.

**Can I export to Excel?**
Yes.

**Why might a valid RFC return checksumValid=false?**
SATs checksum uses a non-standard character table. Make sure the RFC is uppercase and contains no extra characters.

***

### 🔌 Integrate with any app

Connect your dataset to 1,500+ apps via Apify integrations:

**Analytics:** Google Sheets, Airtable, Microsoft Excel, Tableau, Power BI
**Databases:** PostgreSQL, MySQL, MongoDB, BigQuery, Snowflake
**Communication:** Slack, Microsoft Teams, email notifications
**Storage:** Google Drive, Dropbox, Amazon S3, Azure Blob
**Automation:** Make, Zapier, n8n, Pipedream

***

### 🔗 Recommended Actors

| Actor | What it does |
|---|---|
| [Argentina AFIP Scraper](https://apify.com/parseforge/argentina-afip-scraper) | Argentine CUIT lookups |
| [France SIRENE Scraper](https://apify.com/parseforge/france-sirene-scraper) | French company registry |
| [Peru SUNAT RUC Scraper](https://apify.com/parseforge/peru-sunat-ruc-scraper) | Peruvian RUC validation |

> 💡 **Pro Tip:** Browse the complete [ParseForge collection](https://apify.com/parseforge) for more government data, business intelligence, and research scrapers.

***

**Disclaimer:** This tool implements the public SAT RFC structural format. ParseForge is not affiliated with SAT or the Mexican government. Users are responsible for compliance with applicable laws and SAT terms of use. For live RFC verification, use the official SAT website.

# Actor input Schema

## `maxItems` (type: `integer`):

Free users: 10. Paid: up to 1,000,000

## `rfcList` (type: `array`):

List of RFC strings to validate

## Actor input object example

```json
{
  "maxItems": 10,
  "rfcList": [
    "XAXX010101000",
    "BIMB400702BS6",
    "XEXX010101000"
  ]
}
```

# Actor output Schema

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

Scraped records

# 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 = {
    "maxItems": 10,
    "rfcList": [
        "XAXX010101000",
        "BIMB400702BS6",
        "XEXX010101000"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/mexico-rfc-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 = {
    "maxItems": 10,
    "rfcList": [
        "XAXX010101000",
        "BIMB400702BS6",
        "XEXX010101000",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/mexico-rfc-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 '{
  "maxItems": 10,
  "rfcList": [
    "XAXX010101000",
    "BIMB400702BS6",
    "XEXX010101000"
  ]
}' |
apify call parseforge/mexico-rfc-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Mexico RFC Validator | SAT Taxpayer ID Format Check",
        "description": "Validate Mexican RFC taxpayer identifiers in bulk. Check format, embedded date, and homoclave checksum using the SAT modulo-11 algorithm for persona fisica and persona moral. Returns isValid plus per-check details. CSV, Excel, JSON, XML for KYC and CFDI invoice workflows.",
        "version": "0.1",
        "x-build-id": "Mgt7Nxp4pdc2QhaSv"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/parseforge~mexico-rfc-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-parseforge-mexico-rfc-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/parseforge~mexico-rfc-scraper/runs": {
            "post": {
                "operationId": "runs-sync-parseforge-mexico-rfc-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/parseforge~mexico-rfc-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-parseforge-mexico-rfc-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": {
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Free users: 10. Paid: up to 1,000,000"
                    },
                    "rfcList": {
                        "title": "RFC List",
                        "type": "array",
                        "description": "List of RFC strings to validate",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            },
                            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
