Run a custom extractor on a document to extract specific information. Each extractor is designed to identify and extract particular types of data from documents.
After you run an extractor the status will be PENDING. Call Get Document periodically using the returned id until status changes to COMPLETED or FAILED. The output_file_url field will then be available for download.
Copy
# Poll every 5 s until status==COMPLETED or status==FAILEDDOC_ID="123e4567-e89b-12d3-a456-426614174000"while true; do STATUS=$(curl -s https://api.doctly.ai/api/v1/documents/$DOC_ID \ -H "Authorization: Bearer YOUR_API_KEY" | jq -r '.status') echo "Status: $STATUS" if [ "$STATUS" = "COMPLETED" ] || [ "$STATUS" = "FAILED" ]; then break fi sleep 5done