US Mail OCR
Mindee’s US Mail OCR API uses deep learning to automatically, accurately, and instantaneously parse your documents details. In a few seconds, the API extracts a set of data from your PDFs or photos of US mails, including:
Sender Name
Sender Address
Recipient Names
Recipient Addresses
The US Mail OCR API supports documents from the US. The documents from other nationalities and states are not supported with this model.
Set up the API
To test your API, you can use the sample document provided below.

Access your US Mail OCR by clicking on the corresponding product 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 your document 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 document > inference > prediction for document-level predictions: it contains the different fields extracted at the document level, meaning that for multi-pages PDFs, we reconstruct a single object using all the pages.
Detailed Field Information
Using the above document example the following are the basic fields that can be extracted.
Sender Name
sender_name: The name of the sender.
Sender Address
sender_address: The address of the sender.
complete: The complete address of the sender.
street: The street of the sender's address.
city: The city of the sender's address.
state: Second part of the ISO 3166-2 code, consisting of two letters indicating the US State.
postal_code: The postal code of the sender's address.
Recipient Names
recipient_names: The names of the recipients.
Recipient Addresses
recipient_address: The address of the recipients.
complete: The complete address of the recipient.
street: The street of the recipient’s address.
city: The city of the recipient’s address.
state: Second part of the ISO 3166-2 code, consisting of two letters indicating the US State.
postal_code: The postal code of the recipient’s address.
Last updated
Was this helpful?

