{"uid":"cap_cQkn6s4o5zIBRi_B70EAg","slug":"aayat-ai-library-docs-fetcher-4926128b","name":"Aayat AI Library Docs Fetcher","description":"Pay-per-use data and tools for AI agents: crypto token safety, prices and wallets, an LLM gateway, web search and documents to Markdown, library docs, package safety and AI model prices for coding agents, company research, news, UK/EU open data and an x402 market guide. Pay per call in USDC on Base or Solana with x402. No account or API key.","url":"https://aayatai.com/docs/lib?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["library"],"properties":{"topic":{"type":"string","maxLength":200,"description":"What you need, e.g. routing, authentication, streaming responses (default: overview)."},"tokens":{"type":"integer","default":4000,"maximum":12000,"minimum":500,"description":"Most tokens of documentation to return."},"library":{"type":"string","maxLength":214,"minLength":1,"description":"Library/package name as published, e.g. hono, fastapi, serde, github.com/gin-gonic/gin."},"ecosystem":{"enum":["npm","pypi","crates","go"],"type":"string","default":"npm","description":"Package ecosystem: npm, pypi, crates (Rust) or go (Go modules)."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["library","ecosystem","version","content","tokens","sources"],"properties":{"topic":{"type":["string","null"]},"trust":{"type":"object","description":"Third-party text, cleaned: read trust.notice; removed = what we stripped."},"tokens":{"type":"integer","description":"Estimated tokens in content."},"content":{"type":"string","description":"Markdown documentation, each part headed by an HTML comment naming its source."},"library":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"kind":{"enum":["llms.txt","llms-full.txt","docs-page","readme"],"type":"string"}}}},"version":{"type":["string","null"],"description":"Latest published version the docs were matched to."},"homepage":{"type":["string","null"]},"ecosystem":{"type":"string"},"fetchedAt":{"type":"string"},"truncated":{"type":"boolean","description":"True if relevant material was left out to fit the budget."}}}}}}},"responseSchema":{"type":"json","example":{"topic":"cors middleware","tokens":42,"content":"<!-- source: https://hono.dev/docs/middleware/builtin/cors -->\n# CORS Middleware\n\n```ts\nimport { cors } from 'hono/cors'\napp.use('/api/*', cors())\n```","library":"hono","sources":[{"url":"https://hono.dev/docs/middleware/builtin/cors","kind":"docs-page"}],"version":"4.13.9","homepage":"https://hono.dev","ecosystem":"npm","fetchedAt":"2026-09-28T12:00:00.000Z","truncated":false}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"down","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_CCAd7BttbjdK9ynQWWZ9o","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches up-to-date, topic-filtered documentation for any npm, PyPI, crates, or Go library, trimmed to a token budget, with source attribution and current version.","exampleAgentPrompt":"Can you pull up the current middleware docs for the hono npm library, focused on CORS, and keep it under 3000 tokens?","exampleUseCases":[{"title":"Coding agent using current Rust library docs","prompt":"Fetch the latest documentation for the serde crate on crates.io, focused on custom serialization, and keep it under 4000 tokens so I can use it while writing my Rust code."},{"title":"Python developer debugging auth flow","prompt":"Get me the up-to-date fastapi docs from PyPI on authentication and OAuth2, trimmed to 5000 tokens — I need to make sure I'm not using a stale API."},{"title":"Go developer exploring HTTP routing","prompt":"Pull the current docs for github.com/gin-gonic/gin on routing, from the Go ecosystem, and limit it to 3000 tokens with sources included."}],"resultDescription":"Returns a JSON object containing: markdown-formatted documentation content (with HTML comment source headers), the library's latest published version, the package ecosystem, a list of source URLs with their kind (llms.txt, docs-page, readme, etc.), an estimated token count, a truncation flag indicating if content was cut to fit the budget, a homepage URL, and a fetchedAt timestamp.","failureModes":["Library not found in the specified ecosystem — returns an error or empty content","Topic too narrow with no matching documentation sections","Token budget too small to return meaningful content (minimum 500)","Documentation source unavailable or unreachable at crawl time","Incorrect ecosystem specified for the library (e.g. npm instead of pypi)","Rate limiting or payment failure via x402 protocol"],"whenToPreferThis":"Choose this endpoint when a coding agent needs fresh, authoritative documentation for a specific library rather than relying on potentially stale training data. It is especially valuable when working with rapidly-evolving packages where APIs change between versions, or when you need topic-scoped docs trimmed to fit an LLM context window. Prefer it over generic web search when you want structured, version-tagged markdown with explicit source attribution rather than raw HTML pages.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-22T06:25:36.091Z","isFirstParty":false,"canonicalSlug":"aayat-ai-library-docs-fetcher-4926128b"}