{"slug":"ocr","domain":"documents","title":"The words in an image or a PDF","summary":"Optical character recognition over a file on a drive or a url. The whole document, or each line with where it sits.","help":"ocr: read an image or PDF, as JSON.\n\nWHICH ONE\n  `text` returns the document. `lines` returns each line WITH its position on\n  the page, which is what you want when position carries meaning: a form, a\n  table, a stamped invoice.\n\nA PATH OR A URL\n  An absolute path is read from this session — `/dropbox/ap/pod-4471.pdf` is\n  sent as the bytes it is. Anything with a scheme is fetched by the endpoint.\n  This is what reads a SCANNED document: `pdftext` on one reports that the\n  pages are images and extracts nothing, and that is the point to come here.\n\nStudies:\n  text  \u003curl\u003e\n      the text of an image or PDF, from a drive or a url\n  lines \u003curl\u003e\n      the text as lines with their positions on the page\n\nJSON to stdout, so it composes: pipe to `jq` to pick a field, or `\u003e /tmp/…` to keep it.\nRun a study with no arguments — `ocr text` — to see what it takes.\n","example_command":"ocr lines /dropbox/ap/pod-4471.pdf","example_output":"","cost_class":"upstream-fetch","tier":"metered","billing_items":["ocr"],"price_per_1k_calls":9,"price_is_from":false,"status":"available","commands":["ocr"],"studies":[{"call":"text","about":"the text of an image or PDF, from a drive or a url","args":[{"name":"url","positional":true,"list":false,"hint":""},{"name":"langs","positional":false,"list":false,"hint":"comma-separated language codes"},{"name":"output_format","positional":false,"list":false,"hint":"markdown | json | html"}]},{"call":"lines","about":"the text as lines with their positions on the page","args":[{"name":"url","positional":true,"list":false,"hint":""},{"name":"langs","positional":false,"list":false,"hint":"comma-separated language codes"}]}],"default_enabled":false,"first_seen":"2026-09-09T04:30:35.160951Z","enabled":false}
