墨西哥 — INE OCR
从墨西哥 INE(Credencial para Votar)正面(以及可选背面)图像提取字段。发送包含以下内容的 JSON:
front(必填)— 正面公开 URL 或 base64 图像/PDFback(可选)— 背面公开 URL 或 base64;提高 CIC、OCR、MRZ 准确度
提取成功时返回姓名、CURP、clave de elector、CIC、OCR、地址、有效期及相关元数据。
按标识符验证选举状态请使用 墨西哥 — INE 验证(v2/mx/ine)。CURP 请使用 墨西哥公民(CURP)(v2/mx/curp)。
API reference
Endpoint
https://api.verifik.co/v2/mx/ine/ocr
Submit front (and optional back) images. Verifik runs Gemini OCR, then Nexcar number validation, and returns nested ocr + validation + validateParamsUsed.
Headers
| Name | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
Parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
front | string | Yes | Front image as a public URL or base64 string (with or without data: prefix). Supported: JPG, JPEG, PNG, GIF, PDF. | https://example.com/ine-front.jpg |
back | string | No | Back image as a public URL or base64 string. Improves OCR accuracy. | https://example.com/ine-back.jpg |
Request
- Node.js
- Python
import axios from "axios";
const { data } = await axios.post(
"https://api.verifik.co/v2/mx/ine/ocr",
{
front: "https://example.com/ine-front.jpg",
back: "https://example.com/ine-back.jpg",
},
{
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_TOKEN}`,
},
}
);
console.log(data);
import os, requests
url = "https://api.verifik.co/v2/mx/ine/ocr"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {os.getenv('VERIFIK_TOKEN')}",
}
payload = {
"front": "https://example.com/ine-front.jpg",
"back": "https://example.com/ine-back.jpg",
}
r = requests.post(url, headers=headers, json=payload)
print(r.json())
Response
- 200
- 404
- 409
{
"data": {
"ocr": {
"cic": "187639699",
"citizenIdentifier": "031206745",
"curp": "MAFC760611MYNRLR03",
"documentType": "INE",
"electorKey": "CSFTGV76061131H400",
"fullName": "CARLA ISABEL MARTINEZ FERNANDEZ",
"ocr": "0276031206745",
"subType": "E",
"type": "INE"
},
"validation": {
"cic": "187639699",
"documentNumber": "187639699",
"documentType": "INE",
"status": "OK",
"validity": "31 de diciembre de 2030"
},
"validateParamsUsed": {
"documentType": "INE",
"documentNumber": "187639699",
"ocr": "0276031206745",
"citizenIdentifier": "031206745",
"model": "E"
}
},
"signature": {
"dateTime": "July 14, 2026 10:00 AM",
"message": "Certified by Verifik.co"
}
}
{
"code": "NotFound",
"message": "Record not found."
}
{
"code": "MissingParameter",
"message": "front is required"
}
Notes
frontis required;backis optional but recommended for CIC, OCR, citizen identifier, and MRZ fields.- Images may be public URLs or base64 (with or without
data:prefix). Supported formats: JPG, JPEG, PNG, GIF, PDF. - Allow client timeouts of at least 60 seconds; upstream OCR jobs typically finish in 5–30 seconds.
- Sandbox: any valid
frontstring returns a fixture; afrontvalue containing404returns 404. - Related: Mexico — INE Validation, Mexican Citizen (CURP).