DocumentationExtended extraction

Extended extraction

Twenty printed fields, source observations, address components and deterministic checks.

On this page

POST /api/v3/ine with profile=extended returns twenty nullable printed fields, raw MRZ, source observations, address components and checks. The default standard profile returns eight scalar fields and MRZ.

The extended profile is beta. Supported fields define the schema; their presence and legibility depend on the document. Measured scope: evaluation.

Request parameters

profile and mode are multipart fields. mode=both requires both image parts:

curl --max-time 90 'https://ocr.ecostudios.dev/api/v3/ine' \
  -H "X-API-Key: $INE_API_KEY" \
  -H "Idempotency-Key: $INE_IDEMPOTENCY_KEY" \
  -F 'profile=extended' \
  -F 'mode=both' \
  -F "front=@${INE_FRONT_PATH}" \
  -F "back=@${INE_BACK_PATH}"

Transaction identity includes the idempotency key, image bytes, profile and mode. Changing an option creates a different payload; reuse of the original key yields a conflict.

Printed fields

GroupKeysPrinted source
Namefull_name, given_names, paternal_surname, maternal_surnameHolder's NOMBRE block. Separate components require an identifiable role in the printed layout.
Holdercurp, date_of_birth, sexCURP, FECHA DE NACIMIENTO, SEXO.
Addressaddress, street, neighborhood, municipality, state, postal_codeVisible DOMICILIO block.
Electoralelector_key, section, registration_yearCLAVE DE ELECTOR, SECCIÓN, AÑO DE REGISTRO.
Documentissue_year, validity, cic, ocrEMISIÓN, VIGENCIA, explicitly labelled CIC / OCR outside MRZ.

All twenty values are strings or null; leading zeros and printed spelling remain significant. data.mrz is a three-string array or null; its encoded contents do not fill missing printed fields. section is an electoral section, not an address block. issue_year is a year, not an issuance-count suffix.

The extraction instructions preserve visible text rather than deriving values from names, CURP, MRZ or geographic codes. When returned front/back scalar values disagree, the merged value is null with conflicting_values. Unreadable or absent fields are also null. Warnings and sources distinguish absence from conflict. Complete schema: field reference.

Response metadata

PropertyType and meaning
profileLiteral string extended.
sources.FIELDArray of observations shaped as { side, region }. side is front or back; printed-field regions are name_block, address_block or printed_label. An absent field has no observations; conflicting values may retain multiple observations.
sources.mrzArray of observations with region mrz.
sources.address_parts.PARTParsed source object or null; see source offsets.
checksLocal format, checksum, date and consistency results.
qualityfront and back observations; an omitted input side has null.
needs_reviewAlways true.

Model source regions are categorical observations, not measured bounding boxes or calibrated confidence. They describe the claimed origin of text; they do not establish that the transcription is correct.

Separated address components

New extended results include data.address_parts with twelve keys. A deterministic parser derives them from existing OCR strings. It does not make another model call, change the twenty printed fields or perform a postal lookup.

The synthetic street line CALLE EJEMPLO NO 012 EDIF B INT 04 can produce separate type, street, exterior number, building and interior values. Every populated part has exact text offsets into its original OCR field.

block means manzana and lot means lote within DOMICILIO. Neither comes from SECCIÓN. Definitions: address reference.

Checks and image observations

Check outcomes are pass, fail or not_checked, with a machine-readable reason. A check does not modify data or repair a checksum.

Check pathWhat it evaluates
checks.curp.formatSupported CURP structure.
checks.curp.check_digitWeighted check digit when the structure is supported.
checks.curp.birth_dateCalendar feasibility of encoded date components; no inferred complete birth date.
checks.elector_keyElector-key format only.
checks.date_of_birthSupported, unambiguous printed date; includes a separate normalized value or null.
checks.validityPrinted date/year format and comparison with the reading date.
checks.mrzSupported TD1 structure, individual check digits, composite check digit and parsed encoded values.
checks.pairAgreement of comparable printed fields or supported printed/MRZ birth dates.
checks.authenticityAlways not_checked.

checks.curp.registry and checks.validity.registry are not_checked: no official lookup is performed. A numeric date such as 03/04/2000 remains ambiguous. A year-only expiry does not create an exact expiry date; comparison during the printed end year is not_checked. An unsupported MRZ layout is not evidence of an invalid credential.

Each supplied side's quality object has assessment: "unvalidated_model_observation", blur, glare, cropped, rotation, observed_side and observed_document_type. The four image conditions use suspected, not_observed or unknown. They are not probabilities and do not independently reject an upload. File decoding and dimension checks run separately before quota reservation.

A passed check establishes only its local rule. Authentication of a credential or holder is outside the check contract.

Single-side reading

mode=front accepts front; mode=back accepts back. The default mode=both requires both files. One side still consumes one reading unit. Fields unavailable on that side stay unavailable; the API does not reconstruct them from encoded equivalents.

Address parts and checks are stored with a new result. GET and idempotent replay return the saved payload without another model call or parser run. Older stored extended results may omit address_parts; absence indicates unavailable derived data.