Query PDF Results
Search and list results from previous v3/pdf requests.
GET v3/pdf-results
GET api.mathpix.com/v3/pdf-results
The search request must contain a valid app_key header to identify the group owning the results.
Example
- cURL
- Python
- JavaScript / TypeScript
- Go
- Java
# Example: Query PDF processing results with pagination and date filter
curl -X GET -H 'app_key: APP_KEY' \
'https://api.mathpix.com/v3/pdf-results?per_page=100&from_date=2020-06-26T03%3A08%3A22.827Z'
# Example: Query PDF processing results with pagination and date filter
import requests
url = "https://api.mathpix.com/v3/pdf-results"
headers = {
"app_key": "APP_KEY",
}
params = {
"per_page": 100,
"from_date": "2020-06-26T03:08:22.827Z",
}
response = requests.get(url, headers=headers, params=params, timeout=30)
print(response.json())
// Example: Query PDF processing results with pagination and date filter
const params = new URLSearchParams({
per_page: "100",
from_date: "2020-06-26T03:08:22.827Z",
});
const response = await fetch(
`https://api.mathpix.com/v3/pdf-results?${params}`,
{
headers: {
app_key: "APP_KEY",
},
}
);
const result = await response.json();
console.log(JSON.stringify(result, null, 2));
// Example: Query PDF processing results with pagination and date filter
req, _ := http.NewRequest("GET",
"https://api.mathpix.com/v3/pdf-results?per_page=100&from_date=2020-06-26T03%3A08%3A22.827Z",
nil)
req.Header.Set("app_key", "APP_KEY")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
result, _ := io.ReadAll(resp.Body)
fmt.Println(string(result))
// Example: Query PDF processing results with pagination and date filter
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.mathpix.com/v3/pdf-results?per_page=100&from_date=2020-06-26T03%3A08%3A22.827Z"))
.header("app_key", "APP_KEY")
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Example response
{
"pdfs": [
{
"id": "113cee229ab27b715b7cc24cfdbb2c33",
"input_file": "https://s3.amazonaws.com/mathpix-ocr-examples/authors_0.pdf",
"status": "completed",
"created_at": "2020-06-26T03:08:23.827Z",
"modified_at": "2020-06-26T03:08:27.827Z",
"num_pages": 1,
"num_pages_completed": 1,
"request_args": {}
}
]
}
Request parameters
page First page of results to return
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
Response body
pdfs List of PdfResult objects
Type definitions
PdfResult object
id ID of the processed PDF
input_file The URL or the filename of the processed PDF
status | Value | Meaning |
|---|---|
received | Request accepted |
loaded | PDF downloaded onto our servers |
split | Pages split and sent for processing |
completed | Processing finished successfully |
error | A problem occurred during processing |
created_at ISO timestamp of when the PDF was received
modified_at ISO timestamp of when the PDF finished processing
num_pages Number of pages in the request PDF
num_pages_completed Number of pages of the PDF that were processed
request_args Request body arguments