Official Docparser API JS Client
Documentation | Installation | Configuration | Usage | Contributing | License | Changelog
For a generic description of the Docparser API, please see our developer documentation here. Our developer documentation lists all available API methods with their parameters and expected responses.
This library is available from npm.
npm install docparser-node
var docparser = ;var client = "validAPIKey";
Test Your Authentication
You can call our
ping() method to test your API key. The method retuns a promise.
List All Document Parsers Returns a list of the document parsers created in your account.
All import methods allow you to pass an optional
remote_id with your document. The remote ID can be any arbitrary string with a maximum length of 255 characters. The submitted value will be kept throughout the processing and will be available later once you obtain the parsed data with our API or through Webhooks. The
remote_id can be passed in the
options object to our upload methods.
The upload methods (
uploadByStream) allow you to override the filename by specifying the
filename parameter in
Upload Document From Local File System
Reads a file from your local filesystem and uploads it to your document parser.
Upload Document From A Readable Stream
This method creates a new document in your document parser based on the raw file content or a file pointer. Additionally, a
filename and a
remote_id can be provided in the options object.
Fetch Document From An URL
Imports a document from a publicly available HTTP(S) URL.
The Docparser API allows you to retrieve the extracted document data. You can either list the data of multiple documents or get the data of a specific document.
Both methods used for retrieving parsed data allow you to specify the "format" parameter - this allows you to choose between a flat structure and a nested array structure. For most implementations, leaving it as "object" will serve you fine.
Please note: Polling the API for new results is not the recommended way of obtaining your data. A much better way than polling our API for parsed data is to use Webhooks. By using webhooks, parsed data will be pushed to your API immediately after parsing.
Get Data Of One Document
Fetches the parsed data for a specific document by providing a
parserId and the
documentId is the Docparser Document ID which is returned when importing a document through the API.
Get Data Of Multiple Documents
Fetches the results of multiple documents parsed by a specific document parser. This function allows you granular filtering and ordering of the results. Please see our documentation for the list of available parameters.
Bug reports and pull requests are welcome on GitHub.
Please follow Standard Code Style with your contributions. You can check for code style by running
npm test when developing this library.
The library is available as open source under the terms of the MIT License.
The MIT License (MIT)
Copyright (c) 2016 DAUSINGER DIGITAL EURL.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- 11/16/2017 initial release