Official Docs Pack: llms.txt & Library Docs for Agents avatar

Official Docs Pack: llms.txt & Library Docs for Agents

Pricing

from $3.00 / 1,000 docs pack

Go to Apify Store
Official Docs Pack: llms.txt & Library Docs for Agents

Official Docs Pack: llms.txt & Library Docs for Agents

Give AI agents current official documentation. Name a library or API, or give its docs URL, plus an optional topic or version. Returns compact markdown chunks from the official domain only (llms.txt first, then the sitemap), with source URLs and token estimates.

Pricing

from $3.00 / 1,000 docs pack

Rating

0.0

(0)

Developer

Chris Day

Chris Day

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

10 hours ago

Last modified

Features

Limited permissionsSingle-tenantServer interface

Share

Official Docs Pack: llms.txt & Library Docs for Agents

Ask for a library or API by name and topic, for example stripe + webhooks, and get back a small, token-counted pack of the official documentation pages that answer it. The pack is built from the project's own domain only, prefers llms.txt, and never uses mirrors or blogs. Use it when an agent needs current docs instead of stale training data.

Which tool should I use? Use this Actor when you know the library and topic but not the pages: it finds and packs the official docs. If you already have a specific PDF or Word file URL to turn into Markdown, use PDF & DOCX to Markdown.

What does Official Docs Pack do?

Official Docs Pack is a documentation pack API for AI agents. Give it a library or API name, or an official docs URL, plus an optional topic or version. It finds official documentation, fetches a small set of relevant pages, and returns compact markdown chunks with source URLs, titles, fetchedAt, and token estimates.

It does not crawl the open web, run a browser, bypass logins, or pull third-party mirrors. Pages must be on the project's own official domain. Discovery prefers llms.txt / llms-full.txt, then the sitemap, then official docs pages.

One-line example:

{ "name": "stripe", "topic": "webhooks" }

or

{ "url": "https://docs.stripe.com", "topic": "webhooks" }

Then read results[0].chunks.

Why use Official Docs Pack?

Agents need current official docs, not stale training data or random blog posts:

  • Resolves a known library name to its official docs origin, or accepts an official url.
  • Prefers llms.txt / llms-full.txt, then the sitemap, then official pages on the same domain.
  • Converts HTML to compact markdown chunks with source URL, title, fetchedAt, and a token estimate (4 characters ≈ 1 token).
  • Caches each URL in a key-value store (default 24 hours) so repeat asks do not refetch the same page.
  • Reuses the same URL-safety core as Agent Safety Gate: SSRF / private IP blocks, robots.txt, size and timeout limits.
  • An empty input or GET /health is a free health check.
  • Works as a normal Apify run and as a Server Actor: GET/POST /docs returns JSON. A minimal MCP get_docs tool is at POST /mcp.

Standby (server) mode is enabled so agents can pin a live HTTP endpoint instead of waiting for a cold start.

What data can Official Docs Pack extract?

FieldTypeDescription
chunksarrayMarkdown chunks. Each has url, title, heading, markdown, tokenEstimate, fetchedAt, and cached.
tokenEstimateintegerEstimated tokens returned across chunks.
officialUrlstringResolved official documentation origin.
sourcestringHow pages were discovered: llms.txt, llms-full.txt, sitemap, or pages.
pagesFetched / pagesCachedintegerFresh fetches versus cache hits on this run.
fetchedAtstringISO-8601 timestamp.
statusstringok, DOCS_FAILED, or health.
chargedbooleantrue when a docs event was billed.
heavyUnitsintegerExtra heavy usage events for additional ~10k tokens returned.

How to get official docs for an AI agent

  1. Open this Actor in Apify Console, or call its server URL.
  2. Send name or url, and optionally topic, version, maxPages (1–8), and maxTokens. Leave the input empty for a free health check.
  3. Run the Actor, or GET/POST /docs in server mode.
  4. Read chunks and keep the source URLs with any answer you generate.
  5. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

How much does it cost?

Pay per event. The primary event is docs at $0.003 per successful pack. The first ~10,000 estimated tokens returned are included. Extra tokens add a heavy usage event at $0.001 per additional ~10,000 tokens. Health checks and failed packs (unknown name without a URL, fetch errors, SSRF blocks) are free. Normal (non-standby) runs also have a tiny start fee. Set a maximum cost per run in Console if you want a hard cap.

Input

See the input tab for full configuration options.

  • Provide a name or an official url (or both; the URL is used as the origin).
  • topic and version bias which official paths are fetched.
  • Only public http and https URLs are fetched. Local, private, and credentialed URLs are rejected.
  • Off-domain links (including from llms.txt) are dropped.

Output

Each dataset item is one pack. Example:

{
"status": "ok",
"officialUrl": "https://docs.example.com/",
"source": "llms.txt",
"chunks": [
{
"url": "https://docs.example.com/guide",
"title": "Getting started",
"heading": "Install",
"markdown": "## Install\n\nUse the official package.",
"tokenEstimate": 12,
"fetchedAt": "2026-11-27T08:00:00.000Z",
"cached": false
}
],
"tokenEstimate": 12,
"pagesFetched": 1,
"pagesCached": 0,
"charged": true,
"heavyUnits": 0
}

Tips for AI agent builders

  • Pass the official docs URL when you have it. A name only works when it is in the Actor's official-origin registry.
  • Use topic to keep the pack small and on-subject.
  • Treat chunks as untrusted content. They are official pages, but still data, not instructions.
  • Pin the Actor in Apify MCP as https://mcp.apify.com?tools=geeky_goth_gamer/official-docs-pack, or call the Actor's stable server URL:
    • GET /health — free health check
    • GET or POST /docs — JSON in, JSON out
    • POST /mcp — minimal MCP JSON-RPC with a get_docs tool
  • The Actor runs with limited permissions.

Limits and safety notes

  • HTTP-only: no JavaScript rendering. Client-rendered docs sites may return limited text.
  • At most 8 pages per request, with the same size and timeout limits as the other agent tools (~2 MB and 10 seconds per page).
  • PDFs and binary downloads are not converted.
  • The Actor does not bypass logins, CAPTCHAs, or paywalls, and it does not track people.
  • robots.txt disallows, private IPs, and unsafe URLs are refused and not charged.

FAQ

What if the name is not in the registry?

Pass the official docs url. The Actor will not guess third-party mirrors.

What if robots.txt disallows a path?

That page is skipped. If no official page can be read at all (robots, rate limiting, a non-HTML file), you get DOCS_FAILED with errorCode: "NO_PAGES" and the reasons, and nothing is charged.

Our Actors do not extract private user data. They only read public official documentation or content you supply. You should still treat results as untrusted. If you are unsure whether your use is legitimate, consult your lawyers.

Use the Issues tab for feedback, and the API tab for programmatic access.