The Image Content Retrieval API allows you to convert images containing text into structured data that can be digitally processed and analyzed. Its main function is to automatically identify words, lines, and blocks of text within an image, providing not only the textual content, but also information about the exact location of each element within the image using bounding box coordinates. This facilitates tasks such as extracting data from documents, passports, invoices, forms, or any image containing text.
Each word recognized by the API includes a confidence value that indicates the probability that the recognition is correct, allowing you to filter or review the results based on their accuracy. The API organizes information hierarchically: texts are grouped into blocks, blocks contain paragraphs, and paragraphs contain lines and individual words. This structure makes it easy to analyze complex documents and maintain the context of the extracted text.
In addition to textual transcription, the API can capture formatting information such as punctuation, capitalization, and word separations, and can provide metadata useful for document processing, search, and automated analysis applications. The output includes normalized coordinates (values between 0 and 1) representing the position of the text in the image, enabling visual reconstruction of the content or integration with marking and annotation systems.
The API is particularly useful in scenarios where physical or scanned documents need to be digitized, data entry processes need to be automated, or document reading systems need to be built for auditing, identity control, or document management. Its modular and detailed approach allows for both rapid text extraction and deeper analysis, including the validation of sensitive data such as names, identification numbers, and dates, as seen in an example of Haitian passport recognition, where names, dates, and codes are extracted in a hierarchical and detailed manner.
In summary, this API combines optical character recognition, precision in the location of each word, and hierarchical structure to convert images into reliable and actionable textual data.
Converts images into text, detects words, lines, and blocks, providing coordinates, confidence, and hierarchical structure of visual content.
Text extraction - Endpoint Features
| Object | Description |
|---|---|
image_url |
[Required] Enter a image URL |
{"status":true,"text":": AYITI: am PASPO re Py asia Etat oa ta PASSEPORT Aalto! Type ne f : BEB aon HTL 920000018 CHERUBIN Nea! Priam Kote 1 it! Lieu ce reetcceras NIRKA PORT~AU-PRINCE Moun bs reve‘ Rabongate HAITIENNE Oat H M41! Date ds calecance 6 MAI 1962 Fi catyer green! Seer FEMININ Gat peeps » set Dots Senissinn SIVAT) MET PASPO 4 17 DECEMBRE 1992 MSIGNGTURE Ou TITULAIRE amt parno 3 tn Dots Pespirotca 16 DECEMBRE 1997 920000018 SPECIMEN","boxCoordinates":[0.1197110423116615,0.05071315372424723,0.8421052631578947,0.8557844690966719],"blocks":[{"paragraphs":[{"lines":[{"text":"","words":[],"boxCoordinates":[0,0,0,0]}],"boxCoordinates":[0,0,0,0]}],"boxCoordinates":[0,0,0,0]},{"paragraphs":[{"lines":[{"text":"","words":[],"boxCoordinates":[0,0,0,0]}],"boxCoordinates":[0,0,0,0]},{"lines":[{"text":"","words":[],"boxCoordinates":[0,0,0,0]},{"text":": AYITI: am","words":[{"text":":","boxCoordinates":[0.20227038183694532,0.08240887480190175,0.0030959752321981426,0.003169572107765452],"confidence":0.0},{"text":"AYITI:","boxCoordinates":[0.6945304437564499,0.05071315372424723,0.0608875128998968,0.06497622820919176],"confidence":0.0},{"text":"am","boxCoordinates":[0.762641898864809,0.06656101426307448,0.048503611971104234,0.07131537242472266],"confidence":46.0}],"boxCoordinates":[0.20227038183694532,0.05071315372424723,0.608875128998968,0.08716323296354993]},{"text":"PASPO re Py asia Etat","words":[{"text":"PASPO","boxCoordinates":[0.15067079463364294,0.08557844690966719,0.06398348813209494,0.05705229793977813],"confidence":87.0},{"text":"re","boxCoordinates":[0.5479876160990712,0.11727416798732171,0.022703818369453045,0.017432646592709985],"confidence":21.0},{"text":"Py","boxCoordinates":[0.5851393188854489,0.12519809825673534,0.009287925696594427,0.030110935023771792],"confidence":46.0},{"text":"asia","boxCoordinates":[0.608875128998968,0.10935023771790808,0.04953560371517028,0.05229793977812995],"confidence":32.0},{"text":"Etat","boxCoordinates":[0.6656346749226006,0.10935023771790808,0.034055727554179564,0.039619651347068144],"confidence":13.0}],"boxCoordinates":[0.15067079463364294,0.08557844690966719,0.5490196078431373,0.07606973058637084]},{"text":"oa ta","words":[{"text":"oa","boxCoordinates":[0.5954592363261094,0.11410459587955626,0.02476780185758514,0.06497622820919176],"confidence":25.0},{"text":"ta","boxCoordinates":[0.6336429308565531,0.14580031695721077,0.02476780185758514,0.01901743264659271],"confidence":29.0}],"boxCoordinates":[0.5954592363261094,0.11410459587955626,0.0629514963880289,0.06497622820919176]}],"boxCoordinates":[0.15067079463364294,0.05071315372424723,0.6604747162022704,0.12836767036450078]}],"boxCoordinates":[0.15067079463364294,0.05071315372424723,0.6604747162022704,0.12836767036450078]},{"paragraphs":[{"lines":[{"text":"","words":[],"boxCoordinates":[0,0,0,0]}],"boxCoordinates":[0,0,0,0]},{"lines":[{"text":"","words":[],"boxCoordinates":[0,0,0,0]},{"text":"PASSEPORT Aalto! Type ne f :","words":[{"text":"PASSEPORT","boxCoordinates":[0.1197110423116615,0.12678288431061807,0.11661506707946337,0.05229793977812995],"confidence":91.0},{"text":"Aalto!","boxCoordinates":[0.3632610939112487,0.14580031695721077,0.04231166150670795,0.01901743264659271],"confidence":0.0},{"text":"Type","boxCoordinates":[0.41382868937048506,0.14580031695721077,0.03199174406604747,0.022187004754358162],"confidence":88.0},{"text":"ne","boxCoordinates":[0.5108359133126935,0.11568938193343899,0.029927760577915376,0.0491283676703645],"confidence":47.0},{"text":"f","boxCoordinates":[0.5500515995872033,0.14580031695721077,0.0030959752321981426,0.01901743264659271],"confidence":18.0},{"text":":","boxCoordinates":[0.8224974200206399,0.1648177496038035,0.0030959752321981426,0.003169572107765452],"confidence":10.0}],"boxCoordinates":[0.1197110423116615,0.11568938193343899,0.7058823529411765,0.06339144215530904]},{"text":"BEB aon HTL 920000018","words":[{"text":"BEB","boxCoordinates":[0.3622291021671827,0.1901743264659271,0.04231166150670795,0.05388272583201268],"confidence":54.0},{"text":"aon","boxCoordinates":[0.4169246646026832,0.1838351822503962,0.02786377708978328,0.08399366085578447],"confidence":27.0},{"text":"HTL","boxCoordinates":[0.5696594427244582,0.19334389857369255,0.04437564499484004,0.03169572107765452],"confidence":40.0},{"text":"920000018","boxCoordinates":[0.7275541795665634,0.19175911251980982,0.14138286893704852,0.03645007923930269],"confidence":95.0}],"boxCoordinates":[0.3622291021671827,0.1838351822503962,0.5067079463364293,0.08399366085578447]}],"boxCoordinates":[0.1197110423116615,0.11568938193343899,0.7492260061919505,0.15213946117274169]}],"boxCoordinates":[0.1197110423116615,0.11568938193343899,0.7492260061919505,0.15213946117274169]},{"paragraphs":[{"lines":[{"text":"","words":[],"boxCoordinates":[0,0,0,0]}],"boxCoordinates":[0,0,0,0]},{"lines":[{"text":"","words":[],"boxCoordinates":[0,0,0,0]},{"text":"CHERUBIN","words":[{"text":"CHERUBIN","boxCoordinates":[0.3622291021671827,0.24722662440570523,0.1259029927760578,0.03486529318541997],"confidence":90.0}],"boxCoordinates":[0.3622291021671827,0.24722662440570523,0.1259029927760578,0.03486529318541997]}],"boxCoordinates":[0.3622291021671827,0.24722662440570523,0.1259029927760578,0.03486529318541997]},{"lines":[{"text":"","words":[],"boxCoordinates":[0,0,0,0]},{"text":"Nea! Priam Kote 1 it! Lieu ce reetcceras","words":[{"text":"Nea!","boxCoordinates":[0.36119711042311664,0.29635499207606975,0.03508771929824561,0.022187004754358162],"confidence":32.0},{"text":"Priam","boxCoordinates":[0.40350877192982454,0.29160063391442154,0.048503611971104234,0.02377179080824089],"confidence":28.0},{"text":"Kote","boxCoordinates":[0.7481940144478845,0.29952456418383516,0.043343653250773995,0.01901743264659271],"confidence":60.0},{"text":"1","boxCoordinates":[0.7884416924664602,0.2884310618066561,0.006191950464396285,0.04595879556259905],"confidence":39.0},{"text":"it!","boxCoordinates":[0.803921568627451,0.29952456418383516,0.02063983488132095,0.01901743264659271],"confidence":0.0},{"text":"Lieu","boxCoordinates":[0.8297213622291022,0.3011093502377179,0.026831785345717233,0.017432646592709985],"confidence":0.0},{"text":"ce","boxCoordinates":[0.8637770897832817,0.3058637083993661,0.015479876160990712,0.012678288431061807],"confidence":48.0},{"text":"reetcceras","boxCoordinates":[0.8885448916408669,0.3074484944532488,0.06604747162022703,0.011093502377179081],"confidence":0.0}],"boxCoordinates":[0.36119711042311664,0.2884310618066561,0.5933952528379773,0.04595879556259905]},{"text":"NIRKA PORT~AU-PRINCE","words":[{"text":"NIRKA","boxCoordinates":[0.36119711042311664,0.3248811410459588,0.07946336429308566,0.03169572107765452],"confidence":91.0},{"text":"PORT~AU-PRINCE","boxCoordinates":[0.7430340557275542,0.329635499207607,0.21878224974200206,0.03486529318541997],"confidence":0.0}],"boxCoordinates":[0.36119711042311664,0.3248811410459588,0.6006191950464397,0.039619651347068144]},{"text":"Moun bs reve‘ Rabongate","words":[{"text":"Moun","boxCoordinates":[0.36119711042311664,0.37083993660855785,0.038183694530443756,0.020602218700475437],"confidence":68.0},{"text":"bs","boxCoordinates":[0.4086687306501548,0.37400950871632327,0.010319917440660475,0.01584786053882726],"confidence":53.0},{"text":"reve‘","boxCoordinates":[0.4262125902992776,0.36450079239302696,0.038183694530443756,0.04120443740095087],"confidence":17.0},{"text":"Rabongate","boxCoordinates":[0.46852425180598556,0.36450079239302696,0.07223942208462332,0.04120443740095087],"confidence":0.0}],"boxCoordinates":[0.36119711042311664,0.36450079239302696,0.17956656346749225,0.04120443740095087]}],"boxCoordinates":[0.36119711042311664,0.2884310618066561,0.6006191950464397,0.11727416798732171]},{"lines":[{"text":"","words":[],"boxCoordinates":[0,0,0,0]},{"text":"HAITIENNE","words":[{"text":"HAITIENNE","boxCoordinates":[0.36119711042311664,0.40253565768621236,0.14138286893704852,0.03486529318541997],"confidence":91.0}],"boxCoordinates":[0.36119711042311664,0.40253565768621236,0.14138286893704852,0.03486529318541997]}],"boxCoordinates":[0.36119711042311664,0.40253565768621236,0.14138286893704852,0.03486529318541997]},{"lines":[{"text":"","words":[],"boxCoordinates":[0,0,0,0]},{"text":"Oat H M41! Date ds calecance","words":[{"text":"Oat","boxCoordinates":[0.36119711042311664,0.4469096671949287,0.023735810113519093,0.017432646592709985],"confidence":72.0},{"text":"H","boxCoordinates":[0.3931888544891641,0.4500792393026941,0.008255933952528379,0.014263074484944533],"confidence":0.0},{"text":"M41!","boxCoordinates":[0.40970072239422084,0.44532488114104596,0.02476780185758514,0.020602218700475437],"confidence":0.0},{"text":"Date","boxCoordinates":[0.43962848297213625,0.4500792393026941,0.033023735810113516,0.017432646592709985],"confidence":70.0},{"text":"ds","boxCoordinates":[0.478844169246646,0.44849445324881143,0.015479876160990712,0.020602218700475437],"confidence":68.0},{"text":"calecance","boxCoordinates":[0.5025799793601651,0.4532488114104596,0.06501547987616099,0.01584786053882726],"confidence":0.0}],"boxCoordinates":[0.36119711042311664,0.44532488114104596,0.20639834881320948,0.02377179080824089]}],"boxCoordinates":[0.36119711042311664,0.44532488114104596,0.20639834881320948,0.02377179080824089]},{"lines":[{"text":"","words":[],"boxCoordinates":[0,0,0,0]},{"text":"6 MAI 1962","words":[{"text":"6","boxCoordinates":[0.36119711042311664,0.48019017432646594,0.015479876160990712,0.03328050713153724],"confidence":94.0},{"text":"MAI","boxCoordinates":[0.3931888544891641,0.48019017432646594,0.04540763673890609,0.03328050713153724],"confidence":94.0},{"text":"1962","boxCoordinates":[0.45717234262125905,0.4786053882725832,0.06191950464396285,0.03645007923930269],"confidence":95.0}],"boxCoordinates":[0.36119711042311664,0.4786053882725832,0.15789473684210525,0.03645007923930269]}],"boxCoordinates":[0.36119711042311664,0.4786053882725832,0.15789473684210525,0.03645007923930269]}]}],"_note":"Response truncated for documentation purposes"}
curl --location --request POST 'https://zylalabs.com/api/11264/image+content+retrieval+api/21264/text+extraction?image_url=https://static-content.regulaforensics.com/Hardware-products/knowledge_hub/glossary_documents/PASSPORT/2l.webp' --header 'Authorization: Bearer YOUR_API_KEY'
| Header | Description |
|---|---|
Authorization
|
[Required] Should be Bearer access_key. See "Your API Access Key" above when you are subscribed. |
No long-term commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.
The Text extraction endpoint returns structured data that includes recognized text, bounding box coordinates for each word, line, and block, confidence scores indicating recognition accuracy, and a hierarchical organization of the text (blocks, paragraphs, lines, words).
Key fields in the response data include "text" (the recognized content), "coordinates" (bounding box positions), "confidence" (accuracy score), and "hierarchy" (structure indicating blocks, paragraphs, lines, and words).
The response data is organized hierarchically, with blocks containing paragraphs, paragraphs containing lines, and lines containing individual words. This structure allows for easy navigation and analysis of the extracted text.
The endpoint provides information such as recognized text, its location within the image, confidence levels for each recognition, and formatting details like punctuation and capitalization, making it suitable for various document types.
Users can customize their requests by specifying parameters such as image format, language settings, and desired output structure, allowing for tailored extraction based on specific document types or requirements.
Data accuracy is maintained through advanced optical character recognition algorithms that include confidence scoring for each recognized element, enabling users to filter results based on their reliability.
Typical use cases include digitizing scanned documents, automating data entry from forms or invoices, and building document reading systems for identity verification or auditing purposes.
Users should check the confidence scores in the response; low scores may indicate partial or inaccurate results. Implementing a review process for low-confidence entries can help ensure data quality and completeness.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund
To obtain your API key, you first need to sign in to your account and subscribe to the API you want to use. Once subscribed, go to your Profile, open the Subscription section, and select the specific API. Your API key will be available there and can be used to authenticate your requests.
You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.
If you don’t cancel before the 7th day, your free trial will end automatically and your subscription will switch to a paid plan under the same plan you originally subscribed to, meaning you will be charged and gain access to the API calls included in that plan.
The free trial ends when you reach 50 API requests or after 7 days, whichever comes first.
No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.
Yes, we offer a 7-day free trial that allows you to make up to 50 API calls at no cost, so you can test our APIs without any commitment.
Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.
Service Level:
100%
Response Time:
1,657ms
Service Level:
100%
Response Time:
11,959ms
Service Level:
100%
Response Time:
697ms
Service Level:
100%
Response Time:
4,681ms
Service Level:
100%
Response Time:
810ms
Service Level:
100%
Response Time:
55ms
Service Level:
100%
Response Time:
30ms
Service Level:
100%
Response Time:
21ms
Service Level:
100%
Response Time:
7,748ms
Service Level:
100%
Response Time:
973ms