https://github.com/docling-project/docling-java
A Java API for Docling
https://github.com/docling-project/docling-java
ai docling java rag
Last synced: 30 days ago
JSON representation
A Java API for Docling
- Host: GitHub
- URL: https://github.com/docling-project/docling-java
- Owner: docling-project
- License: mit
- Created: 2025-10-10T12:57:05.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-01-22T19:47:04.000Z (about 1 month ago)
- Last Synced: 2026-01-23T12:20:20.591Z (about 1 month ago)
- Topics: ai, docling, java, rag
- Language: Java
- Homepage: https://docling-project.github.io/docling-java/
- Size: 5.12 MB
- Stars: 70
- Watchers: 2
- Forks: 4
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
- Dco: dco.txt
Awesome Lists containing this project
- awesome-java - Docling Java
README
# Welcome to the Docling Java Project!

This is the repository for Docling Java, a Java API for using [Docling](https://github.com/docling-project).
[](https://docling-project.github.io/docling-java/)
[](https://docling-project.github.io/docling-java/dev/core)
[](https://docling-project.github.io/docling-java/dev/docling-serve/serve-api/)
[](https://docling-project.github.io/docling-java/dev/docling-serve/serve-client/)
[](https://docling-project.github.io/docling-java/dev/testcontainers/)
[](https://opensource.org/licenses/MIT)
[](https://docling.ai/discord)
[](https://www.bestpractices.dev/projects/11397)
[Docling](https://github.com/docling-project) simplifies document processing, parsing diverse formats, including advanced PDF understanding, and providing seamless integrations with the Generative AI ecosystem.
## Features
* ποΈ Parsing of [multiple document formats][supported_formats] incl. PDF, DOCX, PPTX, XLSX, HTML, WAV, MP3, VTT, images (PNG, TIFF, JPEG, ...), and more
* π Advanced PDF understanding incl. page layout, reading order, table structure, code, formulas, image classification, and more
* 𧬠Unified, expressive [DoclingDocument][docling_document] representation format
* βͺοΈ Various [export formats][supported_formats] and options, including Markdown, HTML, [DocTags](https://arxiv.org/abs/2503.11576) and lossless JSON
* π Local execution capabilities for sensitive data and air-gapped environments
* π€ Plug-and-play [integrations][integrations] including [LangChain4j](https://docs.langchain4j.dev/)
* π Extensive OCR support for scanned PDFs and images
* π Support of several Visual Language Models ([GraniteDocling](https://huggingface.co/ibm-granite/granite-docling-258M))
* ποΈ Audio support with Automatic Speech Recognition (ASR) models
## Documentation
[See the documentation](https://docling-project.github.io/docling-java/) for complete information on the [various artifacts](#artifacts) that are provided by this project.
## Artifacts
This project provides the following artifacts:
- [`docling-core`](docling-core): Java API for working with the data types used by Docling for document representation (see [Docling Core](https://github.com/docling-project/docling-core)).
- [`docling-serve-api`](docling-serve/docling-serve-api): Java API for interacting with a [Docling Serve](https://github.com/docling-project/docling-serve) backend. It's frameworkβagnostic.
* [`docling-serve-client`](docling-serve/docling-serve-client): A reference implementation of the [`docling-serve-api`](docling-serve/docling-serve-api) using Java's [`HttpClient`](https://openjdk.org/groups/net/httpclient/intro.html) and [Jackson](https://github.com/FasterXML/jackson) to connect to a [Docling Serve](https://github.com/docling-project/docling-serve) endpoint.
* [`docling-testing`](docling-testing): Utilities for testing Docling integration.
* [`docling-testcontainers`](docling-testcontainers): A [Testcontainers module](https://testcontainers.com/) for running Docling in a Docker container.
## Getting started
Use `DoclingServeApi.convertSource()` to convert individual documents (make sure both `docling-serve-api` and `docling-serve-client` are on your classpath).
For example:
```java
import ai.docling.serve.api.DoclingServeApi;
import ai.docling.serve.api.convert.request.ConvertDocumentRequest;
import ai.docling.serve.api.convert.request.source.HttpSource;
import ai.docling.serve.api.convert.response.ConvertDocumentResponse;
DoclingServeApi doclingServeApi = DoclingServeApi.builder()
.baseUrl("")
.build();
ConvertDocumentRequest request = ConvertDocumentRequest.builder()
.source(
HttpSource.builder()
.url(URI.create("https://arxiv.org/pdf/2408.09869"))
.build()
)
.build();
ConvertDocumentResponse response = doclingServeApi.convertSource(request);
System.out.println(response.getDocument().getMarkdownContent());
```
More [usage information](https://docling-project.github.io/docling-java) is available in the docs.
## Get help and support
Please feel free to connect with us using the [discussion section](https://github.com/docling-project/docling-java/discussions).
## Contributing
Please read [Contributing to Docling Java](CONTRIBUTING.md) for details.
## License
The Docling codebase is under MIT license.
For individual model usage, please refer to the model licenses found in the original packages.
### IBM β€οΈ Open Source AI
The project was started by the AI for knowledge team at IBM Research Zurich.
[supported_formats]: https://docling-project.github.io/docling/usage/supported_formats/
[docling_document]: https://docling-project.github.io/docling/concepts/docling_document/
[integrations]: https://docling-project.github.io/docling/integrations/
## Contributors β¨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

Eric Deandrea
π» π π π€ π π§ π β οΈ π

Thomas Vitale
π» π π π€ π π§ π β οΈ π

Alex Soto
π€ π

Cesar Berrospi Ramis
π€

Michele Dolfi
π¨ π€ π π¬

Andrea Cosentino
π¨ π£ π€ π» π

jmb-streamsets
π€ π¨

insectengine
π π¨

Maxim Lysak
π π¨

warnulf
π
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind are welcome!