Work with this as data
Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/tlaloc-sh:tlaloc-sh-cep-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
OpenAPI Specification
openapi: 3.2.0
info:
title: Mexico CEP API
description: 'Mexican data services — ZIP codes, phone numbers, CURP/RFC validation, Banxico CEP payment proofs, CFDI (status/query/issue/cancel), and search over the Diario Oficial de la Federación (DOF).
Authenticate every `/v1` call with `Authorization: Bearer `. Usage is billed per operation, only on success — see the pricing page for rates.'
version: 1.0.0
servers:
- url: /mx
tags:
- name: CEP
description: Banxico SPEI payment proofs (CEP).
paths:
/v1/cep:
get:
tags:
- CEP
summary: Download CEP (payment proof)
description: 'Download a Comprobante Electronico de Pago (CEP) as XML from Banco de Mexico. Requires cuenta (CLABE) and monto.
Error semantics:
- **404** — Banxico''s `valida.do` explicitly confirmed the operation does not exist. Re-check the parameters; usually the issuing bank has not yet reported the payment to SPEI (can take up to a few hours).
- **409** — The criteria match more than one payment, so Banxico refuses to pick one and asks for the clave de rastreo. Re-query with `tipo_criterio=T`; retrying the same parameters cannot succeed.
- **502** — Banxico is reachable but cannot deliver the CEP (e.g. `descarga.do` returned 5xx). Safe to retry after a few minutes.
- **504** — Network timeout to Banxico. Safe to retry.'
operationId: download_cep_v1_cep_get
security:
- HTTPBearer: []
parameters:
- name: fecha
in: query
required: true
schema:
type: string
description: Payment date (YYYY-MM-DD)
title: Fecha
description: Payment date (YYYY-MM-DD)
example: '2024-01-15'
- name: tipo_criterio
in: query
required: true
schema:
type: string
description: 'Criteria type: T (tracking key) or R (numeric reference)'
title: Tipo Criterio
description: 'Criteria type: T (tracking key) or R (numeric reference)'
example: T
- name: criterio
in: query
required: true
schema:
type: string
description: Search criterion value
title: Criterio
description: Search criterion value
- name: emisor
in: query
required: true
schema:
type: string
description: Issuing institution code
title: Emisor
description: Issuing institution code
example: '40002'
- name: receptor
in: query
required: true
schema:
type: string
description: Receiving institution code
title: Receptor
description: Receiving institution code
example: '40012'
- name: cuenta
in: query
required: true
schema:
type: string
description: 18-digit CLABE account number
title: Cuenta
description: 18-digit CLABE account number
example: 012345678901234567
- name: monto
in: query
required: true
schema:
type: string
description: Payment amount
title: Monto
description: Payment amount
example: '1500.00'
- name: receptor_participante
in: query
required: false
schema:
type: string
description: Receiver participant type (default 0)
default: '0'
title: Receptor Participante
description: Receiver participant type (default 0)
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/CEPDownloadResponse'
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorResponse'
description: Bad Request
'404':
description: Banxico explicitly reports operation not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: Criteria match more than one payment; Banxico requires the clave de rastreo (tipo_criterio=T). Never retry as-is.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: Internal Server Error
'502':
description: Banxico CEP unavailable (5xx, non-XML body, etc.)
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'504':
description: Banxico timed out
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/cep_query:
get:
tags:
- CEP
summary: Query CEP payment status
description: 'Quick status check of a payment via Banco de Mexico CEP system. Does not require cuenta or monto.
Same error semantics as `/v1/cep`: **404** = confirmed not-found, **409** = the criteria match several payments and Banxico wants the clave de rastreo instead, **502** = Banxico unavailable, **504** = timeout.'
operationId: query_cep_v1_cep_query_get
security:
- HTTPBearer: []
parameters:
- name: fecha
in: query
required: true
schema:
type: string
description: Payment date (YYYY-MM-DD)
title: Fecha
description: Payment date (YYYY-MM-DD)
example: '2024-01-15'
- name: tipo_criterio
in: query
required: true
schema:
type: string
description: 'Criteria type: T (tracking key) or R (numeric reference)'
title: Tipo Criterio
description: 'Criteria type: T (tracking key) or R (numeric reference)'
example: T
- name: criterio
in: query
required: true
schema:
type: string
description: Search criterion value
title: Criterio
description: Search criterion value
- name: emisor
in: query
required: true
schema:
type: string
description: Issuing institution code
title: Emisor
description: Issuing institution code
example: '40002'
- name: receptor
in: query
required: true
schema:
type: string
description: Receiving institution code
title: Receptor
description: Receiving institution code
example: '40012'
- name: receptor_participante
in: query
required: false
schema:
type: string
description: Receiver participant type (default 0)
default: '0'
title: Receptor Participante
description: Receiver participant type (default 0)
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/CEPQueryResponse'
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorResponse'
description: Bad Request
'404':
description: Banxico explicitly reports operation not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: Criteria match more than one payment; Banxico requires the clave de rastreo (tipo_criterio=T). Never retry as-is.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: Internal Server Error
'502':
description: Banxico CEP unavailable
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'504':
description: Banxico timed out
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/cep/instituciones:
get:
tags:
- CEP
summary: List financial institutions
description: Retrieve the list of financial institutions valid for CEP queries on a given date.
operationId: get_instituciones_v1_cep_instituciones_get
security:
- HTTPBearer: []
parameters:
- name: fecha
in: query
required: true
schema:
type: string
description: Date (YYYY-MM-DD)
title: Fecha
description: Date (YYYY-MM-DD)
example: '2024-01-15'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/InstitutionResponse'
title: Response Get Instituciones V1 Cep Instituciones Get
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorResponse'
description: Bad Request
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: Internal Server Error
'503':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: Service Unavailable
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
CEPDownloadResponse:
properties:
found:
type: boolean
title: Found
description: Whether the CEP was found
xml_content:
anyOf:
- type: string
- type: 'null'
title: Xml Content
description: Raw XML content
beneficiario:
anyOf:
- type: string
- type: 'null'
title: Beneficiario
description: Beneficiario
ordenante:
anyOf:
- type: string
- type: 'null'
title: Ordenante
description: Ordenante
monto:
anyOf:
- type: string
- type: 'null'
title: Monto
description: Monto
fecha_operacion:
anyOf:
- type: string
- type: 'null'
title: Fecha Operacion
description: Fecha de operacion
clave_rastreo:
anyOf:
- type: string
- type: 'null'
title: Clave Rastreo
description: Clave de rastreo
referencia_numerica:
anyOf:
- type: string
- type: 'null'
title: Referencia Numerica
description: Referencia numerica
estado:
anyOf:
- type: string
- type: 'null'
title: Estado
description: Estado del pago
leyenda:
anyOf:
- type: string
- type: 'null'
title: Leyenda
description: Leyenda
institucion_emisora:
anyOf:
- type: string
- type: 'null'
title: Institucion Emisora
description: Institucion emisora
institucion_receptora:
anyOf:
- type: string
- type: 'null'
title: Institucion Receptora
description: Institucion receptora
type: object
required:
- found
title: CEPDownloadResponse
description: CEP download response with parsed XML fields.
ErrorResponse:
properties:
error:
type: string
title: Error
description: Error type
message:
type: string
title: Message
description: Error message
details:
anyOf:
- type: string
- type: 'null'
title: Details
description: Additional error details
type: object
required:
- error
- message
title: ErrorResponse
description: Error response schema.
CEPQueryResponse:
properties:
found:
type: boolean
title: Found
description: Whether the payment was found
estado:
anyOf:
- type: string
- type: 'null'
title: Estado
description: Payment status
detalle:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Detalle
description: Parsed payment details
type: object
required:
- found
title: CEPQueryResponse
description: CEP query response with payment status.
ValidationErrorResponse:
properties:
error:
type: string
title: Error
description: Error type
default: validation_error
message:
type: string
title: Message
description: Validation error message
field:
anyOf:
- type: string
- type: 'null'
title: Field
description: Field that failed validation
type: object
required:
- message
title: ValidationErrorResponse
description: Validation error response schema.
InstitutionResponse:
properties:
codigo:
type: string
title: Codigo
description: Institution code
nombre:
type: string
title: Nombre
description: Institution name
type: object
required:
- codigo
- nombre
title: InstitutionResponse
description: Financial institution entry.
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
type: object
required:
- loc
- msg
- type
title: ValidationError
securitySchemes:
HTTPBearer:
type: http
scheme: bearer