Papers
A paper is the fundamental unit of content in Paperful.
When you upload a document, Paperful creates a paper and processes its contents into a structured, searchable representation that can be accessed through the API, SDKs, and MCP.
A paper isn't just the original file. It represents the document and everything Paperful learns about it.
Creating a paper
A paper is created by uploading a document.
const paper = await paperful.papers.upload(); Paperful returns the paper as soon as the upload is accepted. Processing continues asynchronously.
You don't need to keep the connection open while a paper is processing. You can retrieve its status later or use streaming when you need real-time processing updates.
Processing
After a paper is uploaded, Paperful runs it through the processing pipeline.
Depending on the document, this may include:
- Validating the file
- Converting to other formats
- Extracting digital text
- OCR
- Layout recognition
- Extracting and understanding tables, images, charts, and other regions
- Building the Paper Graph
- Generating searchable content
- Indexing the paper for semantic and full-text search
The result is a representation of the document that preserves both its content and structure.
You don't need to orchestrate these operations individually. They are part of the Paperful processing pipeline.
Paper status
A paper moves through a small set of states during its lifecycle.
| Status | Description |
|---|---|
pending | The paper has been accepted and is waiting for processing. |
processing | Paperful is processing the document. |
ready | Processing completed and the paper is ready to use. |
failed | Processing couldn't be completed. |
You can retrieve the current state at any time:
const paper = await paperful.papers.get("paper_...");
console.log(paper.status);Applications that need to react to processing progress can also listen to the upload stream.
Paper content
Once processing completes, the document is available as structured content.
Instead of treating a document as one large block of text, Paperful represents its contents as individual elements such as:
These elements become Paper Nodes and together form the Paper Graph.
This structure makes it possible to navigate a document, retrieve specific parts, build context for AI applications, and understand relationships between its contents.
Searching papers
Processed papers are automatically prepared for search.
Paperful can make document content available through:
- Hybrid search
- Full-text only search
- Semantic only search
For example:
const results = await paperful.search({
query: "quarterly revenue growth",
});Search results point back to the relevant parts of a paper, allowing your application to move from a search result into the document structure.
Retrieving a paper
You can retrieve a paper using its ID:
const paper = await paperful.papers.get("paper_...");The paper object contains document-level information such as its name, status, page count, timestamps, and other metadata.
For the document's actual contents, use the content or graph APIs.
Paper IDs
Every paper receives a unique ID when it is created.
paper_...Use this ID when retrieving, searching, downloading, or deleting the paper.
Paper IDs are stable for the lifetime of the paper and should be stored by applications that need to reference the document later.
Deleting a paper
Deleting a paper removes the paper and the resources associated with it.
await paperful.papers.delete("paper_...");This includes its processed content and search indexes.
Deleting a paper is permanent and can't be undone.