ID Card FR OCR
Mindee’s ID Card France OCR API uses deep learning to automatically, accurately, and instantaneously parse your ID card details. In under a second, the API extracts a set of data from your PDFs or photos of ID cards, including:
Nationality
Card Access Number
Document Number
Given Names
Surname
Alternate Name
Date of Birth
Place of Birth
Gender
Expiry Date
Image Orientation
MRZ Line 1
MRZ Line 2
MRZ Line 3
Date of Issue
Issuing Authority
Document Type
Document Sides
The ID Card France OCR API supports the new and old format for all people in France. The ID cards of other nationalities and states are not supported with this model.
Set up the API
You'll need a French ID card. You can use one of the sample documents provided below.

Access your Identity Card API by clicking on the Carte nationale d'Identité card in the Document Catalog

From the left navigation, go to documentation > API Reference, you'll find sample code in popular languages and command line.
Replace my-api-key-here with your new API key, or use the select an API key feature and it will be filled automatically.
Copy and paste the sample code of your desired choice in your application, code environment, terminal etc.
Replace
/path/to/the/file.extwith the path to your input document.
Remember to replace with your V1 API key.
Run your code. You will receive a JSON response with the ID Card details.
API Response
Here is the full JSON response you get when you call the API:
You can find the prediction within the prediction key found in two locations:
In
document > inference > predictionfor document-level predictions: it contains the different fields extracted at the document level, meaning that for multi-pages PDFs, we reconstruct a single IdD Card object using all the pages.In
document > inference > pages[ ] > predictionfor page-level predictions: it gives the prediction for each page independently. With images, there is only one element on this array, but with PDFs, you can find the extracted data for each PDF page.
Each predicted field may contain one or several values:
a
confidencescorea
polygonhighlighting the information locationa
page_idwhere the information was found (document level only)
Detailed Field Information
Depending on the field type specified, additional attributes can be extracted from the ID card object. Using the above ID card example the following are the basic fields that can be extracted.
Nationality
nationality: The nationality is classified, issued in a three-letter code following the ISO 3166-1 format.
Card Access Number
card_access_number: Unique CAN of the document. There is no associated field name for this number on the card itself.
Document Number
document_number: The unique ID number of the document which is likewise titled.
Given Names
given_names: The given Name(s) of the card holder. If there are several names, they are all output as in the following example:
Surname
surname: The last name of the document holder. f there are several surnames, all surnames are output together.
Alternate Name
alternate_name: The alternate name of the document holder. The same rules apply as for the other names.
Date Of Birth
date_of_birth: The ISO formatted date of birth of the document holder in the ISO 8601 format.
Place Of Birth
place_of_birth: The Place of Birth of the Document holder.
Gender
gender: Output in a code consisting of one letter representing the gender of the document owner.
Expiry Date
expiry_date: The ISO formatted date of expiry of the document in the ISO 8601 format.
Image Orientation
image_orientation: Classification indicating the possible rotation of the image. Possible values are:
0
90
270 Images with a rotation of 180 degrees are not supported.
MRZ Line 1
mrz_line_1: The extraction of the Machine Readable Zone, first line.
MRZ Line 2
mrz_line_2: The extraction of the Machine Readable Zone, second line.
MRZ Line 3
mrz_line_3: The extraction of the Machine Readable Zone, third line.
Date Of Issue
date_of_issue: The ISO formatted date of issue of the document in the ISO 8601 format.
Issuing Authority
issuing_authority: The responsible authority for issuing the document.
Document Type
document_type: Classification indicating which version of the ID card it is.
NEW - the issued version from 2021
OLD - the issued version from 1988 - 2021
Document Sides
document_sides: Classification indicating which version of the ID card it is.
RECTO - the front side
VERSO - the back side
Last updated
Was this helpful?

