New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

dot-pages-document-parser

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dot-pages-document-parser

Simple Apple Pages document parser powered by LlamaParse v2

latest
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

dot-pages-document-parser

Parse Apple Pages files to markdown or text. Powered by LlamaParse v2. Zero dependencies, Node 18+.

Handles .pages files out of the box — plus PDF, DOCX, PPTX, XLSX, and other common formats.

Install

npm install dot-pages-document-parser

Quick Start

Set your API key:

export LLAMA_CLOUD_API_KEY=llx-...

Parse a Pages file:

import { parse } from "dot-pages-document-parser";

const result = await parse("./document.pages");
console.log(result.markdown);

Advanced Usage

import { dot-pages-document-parser } from "dot-pages-document-parser";

const parser = new dot-pages-document-parser({ apiKey: "llx-..." });

// Parse a Pages file with options
const result = await parser.parse("./report.pages", {
  tier: "agentic",
  processing_options: { language: "fr" },
});

// Parse a buffer (e.g. from an upload)
const buffer = fs.readFileSync("./presentation.pages");
const result = await parser.parse(buffer, {
  fileName: "presentation.pages",
});

Supported Formats

ExtensionFormat
.pagesApple Pages
.pdfPDF
.docx / .docMicrosoft Word
.pptx / .pptMicrosoft PowerPoint
.xlsx / .xlsMicrosoft Excel
.htmlHTML
.csvCSV
.txtPlain text
.png / .jpg / .tiff / .bmp / .webp / .gifImages (OCR)

API

parse(input, options?)

Uploads a document, waits for parsing to complete, and returns the result.

Input: file path (string) or file contents (Buffer | Uint8Array)

Options:

OptionTypeDefaultDescription
tierstring"fast"Parsing tier: fast, cost_effective, agentic, agentic_plus
versionstring"latest"API version
apiKeystringenv varOverride API key
expandstring[]["markdown_full", "text_full"]Fields to expand
pollIntervalMsnumber1000Polling interval in ms
timeoutMsnumber300000Max wait time in ms
fileNamestring"document.pages"Filename hint for buffer input
mimeTypestringauto-detectedMIME type for buffer input
signalAbortSignalCancellation signal
processing_optionsobjectLlamaParse processing options (language, disable_ocr, etc.)
agentic_optionsobjectAgentic options (custom_prompt)
page_rangesobjectPage range options (max_pages, target_pages)
disable_cachebooleanDisable document caching

Returns: ParseResult

interface ParseResult {
  markdown: string;     // Full markdown output
  text: string;         // Full text output
  job: JobResponse;     // Job metadata (id, status, etc.)
  _raw: object;         // Raw API response
}

new dot-pages-document-parser(config?)

Create an instance with explicit configuration.

OptionTypeDefaultDescription
apiKeystringLLAMA_CLOUD_API_KEYAPI key
baseUrlstringhttps://api.cloud.llamaindex.aiAPI base URL

License

MIT

Keywords

pages

FAQs

Package last updated on 11 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts