# Verificador RFC Mexico - SAT + Lista 69-B (`leongael/verificador-rfc-mexico`) Actor

Verify Mexican RFC tax IDs against SAT and check Lista 69-B (EFOS) blacklist. Batch support up to 100 RFCs. Returns status, taxpayer name, and blacklist flags. Essential for CFDI compliance and supplier verification.

- **URL**: https://apify.com/leongael/verificador-rfc-mexico.md
- **Developed by:** [Jacob Prudot](https://apify.com/leongael) (community)
- **Categories:** Automation, Integrations, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.21 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

## Verificador RFC Mexico — SAT + Lista 69-B

Verify Mexican RFC tax IDs against the official SAT portal and check Lista 69-B (EFOS) and Lista 69 blacklists. Automate RFC verification for due diligence, CFDI 4.0 compliance, and supplier onboarding. Process up to 100 RFCs per run with structured, machine-readable JSON results directly from Mexico's tax authority systems.

### Features

- **RFC format validation** — validates structure for personas morales (12 chars) and personas fisicas (13 chars), including optional check digit verification via modulo-11 algorithm
- **Generic RFC detection** — automatically identifies official SAT generic RFCs: XAXX010101000 (ventas a publico en general) and XEXX010101000 (ventas a extranjeros)
- **Lista 69-B (EFOS) blacklist** — cross-references against SAT's list of ~14,000 taxpayers suspected of issuing simulated invoices. Correctly distinguishes between Presunto/Definitivo (actively blacklisted) and Desvirtuado/Sentencia Favorable (exonerated)
- **Lista 69 non-compliant taxpayer check** — checks against ~255,000 taxpayers with outstanding tax obligations (creditos firmes, no localizados, sentencia condenatoria, etc.)
- **Live SAT portal verification** — queries the official SAT taxpayer registry with automatic CAPTCHA solving (optional, can be skipped for faster results)
- **Batch verification** — process up to 100 RFCs in a single run
- **Smart PPE billing** — you are only charged for RFCs that pass format validation. Invalid formats are returned for free
- **Special character support** — handles & (ampersand) in company names and normalizes &amp; from XML/HTML sources

### Use Cases

- **Supplier due diligence** — verify new suppliers have valid, active RFCs before onboarding
- **CFDI 4.0 compliance** — since April 2023, every invoice receptor RFC must be on SAT's "inscritos no cancelados" list (error CFDI40143)
- **Accounts payable risk** — check invoices against Lista 69-B before processing payments. Invoices from Definitivo EFOS taxpayers are non-deductible
- **Periodic partner monitoring** — schedule regular runs to detect status changes in your supplier base
- **ERP integration** — feed results into SAP Business One, Contpaqi, Aspel, or any system via Apify API

### Input

| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| `rfcs` | array of strings | Yes | — | Mexican RFC codes to verify (max 100 per run) |
| `skipSatPortal` | boolean | No | `true` | Skip live SAT portal check. When true, only format + blacklist checks run (faster, no CAPTCHA) |
| `omitVerificationDigit` | boolean | No | `true` | Skip check digit math. Recommended: some SAT-registered RFCs have non-standard check digits |

### Input Example

```json
{
  "rfcs": ["ABC010101XY3", "XAXX010101000", "INVALID123"],
  "skipSatPortal": true,
  "omitVerificationDigit": true
}
````

### Output

Each RFC produces one result object in the dataset:

```json
{
  "rfc": "ABC010101XY3",
  "valid": false,
  "formatValid": true,
  "type": "moral",
  "isGeneric": false,
  "checkDigitValid": null,
  "status": "not_checked",
  "nombre": null,
  "satPortalResult": null,
  "blacklisted": false,
  "blacklistType": null,
  "blacklistStatus": null,
  "blacklistDetail": null,
  "checkedAt": "2026-04-05T12:00:00.000Z",
  "errors": []
}
```

### Output Fields

| Field | Type | Description |
|-------|------|-------------|
| `rfc` | string | The RFC that was verified (uppercased, trimmed) |
| `valid` | boolean | Overall result — `true` only if format valid AND SAT confirms active AND not blacklisted |
| `formatValid` | boolean | RFC matches expected format for persona moral or fisica |
| `type` | string | `"moral"`, `"fisica"`, `"generic_national"`, `"generic_foreign"`, or `null` |
| `isGeneric` | boolean | `true` for official SAT generic RFCs (XAXX, XEXX) |
| `checkDigitValid` | boolean or null | Check digit mathematically correct, or `null` if skipped |
| `status` | string | SAT status: `"active"`, `"inactive"`, `"not_found"`, `"suspended"`, `"error"`, `"format_invalid"`, `"not_checked"` |
| `nombre` | string or null | Taxpayer name from SAT or blacklist |
| `blacklisted` | boolean | `true` only if RFC is Presunto or Definitivo on Lista 69-B, or on Lista 69 |
| `blacklistType` | string or null | `"69-B"` (EFOS) or `"69"` (incumplidos) |
| `blacklistStatus` | string or null | `"presunto"`, `"definitivo"`, `"desvirtuado"`, `"sentencia_favorable"` |
| `blacklistDetail` | string or null | Human-readable explanation of blacklist finding |
| `checkedAt` | string | ISO 8601 timestamp of verification |
| `errors` | array | Error codes: `INVALID_FORMAT`, `INVALID_VERIFICATION_DIGIT` |

### Pricing

Pay-per-event (PPE) pricing: ~$0.30 per 1,000 RFCs verified. Format-invalid RFCs are not charged. The actor stops gracefully when budget is exhausted and returns partial results.

### Important Notes

**Blacklist status matters.** An RFC on Lista 69-B is NOT always dangerous. Only `Presunto` (under investigation) and `Definitivo` (confirmed EFOS) are actively blacklisted. `Desvirtuado` (cleared) and `Sentencia Favorable` (court ruling in favor) mean the taxpayer was exonerated. The actor sets `blacklisted: false` for exonerated RFCs but still reports the history via `blacklistDetail`.

**Check digit exceptions exist.** The SAT has registered RFCs with mathematically incorrect check digits (legacy issue). By default, check digit validation is skipped (`omitVerificationDigit: true`). Set to `false` for strict validation, but be aware of false negatives.

**SAT forbidden words.** The SAT replaces the second letter with "X" in ~75 offensive word combinations (e.g., BUEI→BUEX, CACA→CACX). This is expected behavior, not a data error.

**Lista 69-B/69 data freshness.** CSVs are downloaded fresh from SAT servers on every run. The SAT updates 69-B quarterly and Lista 69 continuously. Data may lag 1-2 days behind DOF (Diario Oficial de la Federacion) publications.

### FAQ

**What is Lista 69-B (EFOS)?**
SAT's list of taxpayers suspected of issuing invoices for simulated operations (facturas fantasma). Doing business with a Definitivo EFOS taxpayer means those invoices are non-deductible under Mexican tax law.

**What is Lista 69?**
SAT's list of non-compliant taxpayers: those with outstanding debts (creditos firmes), unreachable at their fiscal address (no localizados), criminal convictions, and pardoned debts.

**Can I use this without SAT portal access?**
Yes. The default mode (`skipSatPortal: true`) gives you format validation + both blacklist checks without any CAPTCHA or portal dependency. Fast and reliable.

**What are generic RFCs?**
XAXX010101000 is used for invoices to the general public (without RFC). XEXX010101000 is for foreign residents. Both are valid for invoicing but are flagged as `isGeneric: true` and skip blacklist checks.

# Actor input Schema

## `rfcs` (type: `array`):

One or more Mexican RFC codes to verify. Max 100 per run.

## `skipSatPortal` (type: `boolean`):

If true, only validates format and checks blacklists (faster, no CAPTCHA needed)

## `omitVerificationDigit` (type: `boolean`):

If true, does not validate the RFC check digit (some SAT-registered RFCs have non-standard check digits)

## Actor input object example

```json
{
  "rfcs": [
    "XAXX010101000",
    "AAA010101AAA"
  ],
  "skipSatPortal": true,
  "omitVerificationDigit": false
}
```

# Actor output Schema

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

Dataset containing one row per verified RFC with status, blacklist flags, and taxpayer name.

# 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 = {
    "rfcs": [
        "XAXX010101000",
        "AAA010101AAA"
    ],
    "skipSatPortal": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("leongael/verificador-rfc-mexico").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 = {
    "rfcs": [
        "XAXX010101000",
        "AAA010101AAA",
    ],
    "skipSatPortal": True,
}

# Run the Actor and wait for it to finish
run = client.actor("leongael/verificador-rfc-mexico").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 '{
  "rfcs": [
    "XAXX010101000",
    "AAA010101AAA"
  ],
  "skipSatPortal": true
}' |
apify call leongael/verificador-rfc-mexico --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Verificador RFC Mexico - SAT + Lista 69-B",
        "description": "Verify Mexican RFC tax IDs against SAT and check Lista 69-B (EFOS) blacklist. Batch support up to 100 RFCs. Returns status, taxpayer name, and blacklist flags. Essential for CFDI compliance and supplier verification.",
        "version": "1.0",
        "x-build-id": "NlhAMDt64XSDxLcKf"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/leongael~verificador-rfc-mexico/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-leongael-verificador-rfc-mexico",
                "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/leongael~verificador-rfc-mexico/runs": {
            "post": {
                "operationId": "runs-sync-leongael-verificador-rfc-mexico",
                "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/leongael~verificador-rfc-mexico/run-sync": {
            "post": {
                "operationId": "run-sync-leongael-verificador-rfc-mexico",
                "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": [
                    "rfcs"
                ],
                "properties": {
                    "rfcs": {
                        "title": "RFC(s) to verify",
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "description": "One or more Mexican RFC codes to verify. Max 100 per run.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "skipSatPortal": {
                        "title": "Skip SAT Portal Check",
                        "type": "boolean",
                        "description": "If true, only validates format and checks blacklists (faster, no CAPTCHA needed)",
                        "default": true
                    },
                    "omitVerificationDigit": {
                        "title": "Skip Check Digit Validation",
                        "type": "boolean",
                        "description": "If true, does not validate the RFC check digit (some SAT-registered RFCs have non-standard check digits)",
                        "default": false
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
