The Docparser connector lets your AI agent act in each user's Docparser account. Each user connects their own Docparser API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 10 tools.
- Tools
- 10
- What they doRead · write · destructive
- 6 · 4 · 06 read4 write0 destructive
- Users sign in with
- API key
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the Docparser connection
In AgentKit > Connections, create a Docparser connection. The name you give it is the
connection_nameyour code passes. See Configure connections.
Tools
Pass the exact name toexecute_tooldocparser_document_result_getGet the parsed data of one document.Read-onlyGet Parsed Data For Document
Get the parsed data of one document. Returns an array with one object holding document_id, remote_id, file_name, media links, page_count, uploaded_at, processed_at and every field the parser extracted. Use docparser_document_result_get when you know the document_id. Use docparser_results_list to get the data of many documents in a parser. Limited to 60 calls per minute. Requires a parser_id and a document_id from an import tool or docparser_results_list.
Inputs
document_idstringrequired- ID of the document, as returned by docparser_document_fetch_url or docparser_document_upload_base64 (document_id or id) or by the document_id field of docparser_results_list. Example: 1d35639d4b53b59e77f737c93cd1d3d7
parser_idstringrequired- ID of the Document Parser, from docparser_parsers_list (the id field) or from Settings > API of the parser in the Docparser app. Example: mwekrupomwekrupo
formatstring- Shape of the parsed data. object (default) returns nested JSON objects; flat returns simple key/value pairs instead of nested objects. Example: flatone of
objectflat include_childrenboolean- Set true to also return the parsed data of child documents created during preprocessing, for example when a document was split. Example: true
docparser_document_status_getGet the processing state of one imported document.Read-onlyGet Document Status
Get the processing state of one imported document. Returns file name, page count, in-progress flags for importing, processing and webhook dispatch, Unix timestamps for each stage (uploaded_at, imported_at, processed_at, etc.) and a failed_jobs list. Use docparser_document_status_get to check whether a document has finished parsing. Use docparser_document_result_get to read the parsed data once it has. Requires a parser_id and a document_id from an import tool.
Inputs
document_idstringrequired- ID of the document, as returned by docparser_document_fetch_url or docparser_document_upload_base64 (document_id or id) or by the document_id field of docparser_results_list. Example: 1d35639d4b53b59e77f737c93cd1d3d7
parser_idstringrequired- ID of the Document Parser, from docparser_parsers_list (the id field) or from Settings > API of the parser in the Docparser app. Example: mwekrupomwekrupo
docparser_parser_models_listList the model layouts configured in one Document Parser.Read-onlyList Parser Model Layouts
List the model layouts configured in one Document Parser. Returns an array of layouts, each with id and label. Use docparser_parser_models_list to see which document layouts a parser recognises. Use docparser_parsers_list to list the parsers themselves. Requires a parser_id from docparser_parsers_list.
Inputs
parser_idstringrequired- ID of the Document Parser, from docparser_parsers_list (the id field) or from Settings > API of the parser in the Docparser app. Example: mwekrupomwekrupo
docparser_parsers_listList every Document Parser in the Docparser account.Read-onlyList Parsers
List every Document Parser in the Docparser account. Returns an array of parsers, each with id and label. Use docparser_parsers_list to find the parser_id that every other Docparser tool needs. Use docparser_parser_models_list for the layouts inside one parser.
Inputs
This tool takes no inputs.
docparser_pingCheck that the Docparser API key on this connection is valid.Read-onlyPing
Check that the Docparser API key on this connection is valid. Returns {"msg": "pong"} when authentication succeeds. Use docparser_ping to test the connection. Use docparser_parsers_list to see what the account contains.
Inputs
This tool takes no inputs.
docparser_results_listList the parsed data of documents in one Document Parser, newest upload first by default, with filters by date, remote_id and sort order.Read-onlyList Parsed Data
List the parsed data of documents in one Document Parser, newest upload first by default, with filters by date, remote_id and sort order. Returns an array of parsed-data objects, each with document_id, remote_id, file_name, media links, page_count, uploaded_at, processed_at and the extracted fields. Up to 100 documents by default. Use docparser_results_list to browse or filter results across a parser. Use docparser_document_result_get for a single known document. Limited to 30 calls per minute. Requires a parser_id from docparser_parsers_list.
Inputs
parser_idstringrequired- ID of the Document Parser, from docparser_parsers_list (the id field) or from Settings > API of the parser in the Docparser app. Example: mwekrupomwekrupo
datestring- Cut-off date, required when list is uploaded_after or processed_after. An ISO 8601 date-time or a Unix timestamp. Example: 2024-02-12T15:19:21+00:00
formatstring- Shape of the parsed data. object (default) returns nested JSON objects; flat returns simple key/value pairs instead of nested objects. Example: flatone of
objectflat include_processing_queueboolean- Set true to also include documents that are not fully processed yet (still importing, preprocessing or parsing). By default only fully processed documents are returned. Example: true
limitinteger- How many documents to return when list is last_uploaded. Defaults to 100; at most 10000. Example: 50
liststring- Which documents to return. last_uploaded (default) returns the most recent uploads, newest first, paged with limit and offset. uploaded_after returns documents imported after date; processed_after returns documents parsed after date (both need date). Example: uploaded_afterone of
last_uploadeduploaded_afterprocessed_after offsetinteger- Number of documents to skip, for paging together with limit. Defaults to 0. Example: an offset of 20 with a limit of 10 starts at the 21st document: 20
remote_idstring- Return only documents imported with this remote_id (the ID from your own system set at import). Example: invoice-2024-0042
sort_bystring- Field to sort by. By default results follow upload order. Example: processed_atone of
parsed_atprocessed_atuploaded_atfirst_processed_atimported_atintegrated_atdispatched_webhook_atpreprocessed_at sort_orderstring- Sort direction: DESC (default, newest first) or ASC. Example: ASCone of
ASCDESC
docparser_document_fetch_urlImport a document into a Document Parser by giving Docparser a publicly accessible URL to fetch it from.WriteImport Document From URL
Import a document into a Document Parser by giving Docparser a publicly accessible URL to fetch it from. Returns document_id, parser_id, remote_id and a message with the status URL; the document is fetched and parsed a few minutes later. Use docparser_document_fetch_url when the file is online. Use docparser_document_upload_base64 when you have the file content. Then poll docparser_document_status_get and read results with docparser_document_result_get. Requires a parser_id from docparser_parsers_list.
Inputs
parser_idstringrequired- ID of the Document Parser, from docparser_parsers_list (the id field) or from Settings > API of the parser in the Docparser app. Example: mwekrupomwekrupo
urlstringrequired- Publicly accessible URL of the document (PDF, image, Word, etc.) for Docparser to download. It must be reachable without login. Example: https://www.example.com/invoices/inv-0042.pdf
remote_idstring- Optional ID from your own system to store with the document. Docparser keeps it through processing and returns it as remote_id in the parsed data, so you can match results to your records. Example: invoice-2024-0042
docparser_document_upload_base64Import a document into a Document Parser by sending its content as a base64 string.WriteImport Document From Base64
Import a document into a Document Parser by sending its content as a base64 string. Returns the new document id, file_size and account quota usage (quota_used, quota_left, quota_refill). Use docparser_document_upload_base64 when you have the file bytes. Use docparser_document_fetch_url when the file is at a public URL. Then poll docparser_document_status_get and read results with docparser_document_result_get. Requires a parser_id from docparser_parsers_list.
Inputs
file_contentstringrequired- The whole file encoded as standard base64, without a data: URL prefix. Example: JVBERi0xLjQKJcfsj6IKNSAwIG9iago8PC9MZW5ndGggNiAwIFI+PgpzdHJlYW0K
parser_idstringrequired- ID of the Document Parser, from docparser_parsers_list (the id field) or from Settings > API of the parser in the Docparser app. Example: mwekrupomwekrupo
file_namestring- File name to store for the document, including its extension. If left empty, Docparser names the file after the upload time. Example: invoice-0042.pdf
remote_idstring- Optional ID from your own system to store with the document. Docparser keeps it through processing and returns it as remote_id in the parsed data, so you can match results to your records. Example: invoice-2024-0042
docparser_documents_reintegrateQueue documents in a Document Parser to send their parsed data to the parser's integrations (webhooks, cloud storage, etc.) again.WriteRe-Integrate Documents
Queue documents in a Document Parser to send their parsed data to the parser's integrations (webhooks, cloud storage, etc.) again. Returns total_reintegrate (how many documents were queued) and msg. Use docparser_documents_reintegrate to redeliver data an integration missed. Use docparser_documents_reparse to parse documents again first. Requires a parser_id and document IDs from docparser_results_list.
Inputs
document_idsarrayrequired- Non-empty list of document IDs to re-integrate. Take them from the document_id field of docparser_results_list or from the import response. Example: ["1d35639d4b53b59e77f737c93cd1d3d7", "b07b080b357334510e10f5b41567000c"]
parser_idstringrequired- ID of the Document Parser, from docparser_parsers_list (the id field) or from Settings > API of the parser in the Docparser app. Example: mwekrupomwekrupo
docparser_documents_reparseSchedule documents in a Document Parser to be parsed again with the parser's current rules.WriteRe-Parse Documents
Schedule documents in a Document Parser to be parsed again with the parser's current rules. Returns total_reparsed (how many documents were queued) and msg. Use docparser_documents_reparse after changing parsing rules. Use docparser_documents_reintegrate to resend existing parsed data to integrations without parsing again. Requires a parser_id and document IDs from docparser_results_list.
Inputs
document_idsarrayrequired- Non-empty list of document IDs to re-parse. Take them from the document_id field of docparser_results_list or from the import response. Example: ["1d35639d4b53b59e77f737c93cd1d3d7", "b07b080b357334510e10f5b41567000c"]
parser_idstringrequired- ID of the Document Parser, from docparser_parsers_list (the id field) or from Settings > API of the parser in the Docparser app. Example: mwekrupomwekrupo
No tools match.