Query Image Results
GET api.mathpix.com/v3/ocr-results
Mathpix allows customers to search their results from posts to /v3/text, /v3/pdf, /v3/strokes, and /v3/latex with a GET request on /v3/ocr-results?search-parameters.
The search request must also be authenticated the same way OCR requests are, in order to return relevant search results. See Authorization
Requests with the metadata improve_mathpix field set to false will not appear in the search results.
This endpoint will only work with API keys created after July 5th, 2020.
Request Parameters
curl -X GET -H 'app_key: APP_KEY' \
'https://api.mathpix.com/v3/ocr-results?from_date=2021-07-02T18%3A48%3A25.769285%2B00%3A00&page=1&per_page=10&tags=test_tag2&tags=test_tag3&is_handwritten=True'
{
"ocr_results": [
{
"timestamp": "2021-07-02T18:48:46.080Z",
"duration": 0.132,
"endpoint": "/v3/text",
"request_args": {
"tags": ["test_tag2", "test_tag3"],
"formats": ["text"]
},
"result": {
"text": "\\( 12+5 x-8=12 x-10 \\)",
"confidence": 1,
"is_printed": false,
"request_id": "a4301400-f66b-9821-d35c-babea8a26992",
"is_handwritten": true,
"confidence_rate": 1,
"auto_rotate_degrees": 0,
"auto_rotate_confidence": 0.0027393347044402105,
"version": "SuperNet-109p4"
},
"detections": {
"contains_algorithm": false,
"contains_chemistry": false,
"contains_diagram": false,
"is_handwritten": true,
"is_printed": false,
"contains_table": false,
"contains_triangle": false
}
},
{
"timestamp": "2021-07-02T18:48:45.903Z",
"duration": 0.15,
"endpoint": "/v3/text",
"request_args": {
"tags": ["test_tag", "test_tag2", "test_tag3"],
"formats": ["text"]
},
"result": {
"text": "\\( 12+5 x-8=12 x-10 \\)",
"confidence": 1,
"is_printed": false,
"request_id": "7fe48fb1-cd61-f8a0-0ba4-e71381740efb",
"is_handwritten": true,
"confidence_rate": 1,
"auto_rotate_degrees": 0,
"auto_rotate_confidence": 0.0027393347044402105,
"version": "SuperNet-109p4"
},
"detections": {
"contains_algorithm": false,
"contains_chemistry": false,
"contains_diagram": false,
"is_handwritten": true,
"is_printed": false,
"contains_table": false,
"contains_triangle": false
}
}
]
}
page First page of results to return (max page 10000)
per_page Number of results to return
from_date starting (included) ISO datetime
to_date ending (excluded) ISO datetime
app_id results for the given app_id
text result.text contains the given string
text_display result.text_display contains the given string
latex_styled result.latex_styled contains the given string
tags an array of tag strings
is_printed All results that contain printed text/math are included
is_handwritten All results that contain handwritten text/math are included
contains_table All results that contain a table are included
contains_chemistry All results that contain chemistry diagrams are included
contains_diagram All results that contain diagrams are included
contains_triangle All results that contain triangles are included
contains_algorithm All results that contain algorithms are included
Result Object
timestamp ISO timestamp of recorded result information
endpoint API endpoint used for upload (eg /v3/text, /v3/strokes, ...)
duration Difference between timestamp and when request was received
request_args Request body arguments
result Result body for request
detections An object of detections for each request