{"slug":"api-agentstools-dev-docs-snippet-567e62","title":"Working code snippets for a library, matched to a topic","host":"api.agentstools.dev","method":"GET","resource":"https://api.agentstools.dev/docs/snippet","category":"code","description":"Working code snippets for a library, matched to a topic. Give an ecosystem, package name and a topic or symbol and get the fenced code blocks from the README or docs whose language, code or nearest heading matches, each with a source citation and an honest truncated flag. Ideal for grounding a codin","price_listed":0.008,"price_asked":0.008,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":1057,"reported_calls_30d":1,"reported_payers_30d":1,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"method":"GET","queryParams":{"ecosystem":"npm","name":"axios","topic":"request"},"type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"properties":{"ecosystem":{"description":"Package ecosystem. Aliases accepted: pip and python map to pypi; cargo and rust map to crates; node maps to npm; gh maps to github.","enum":["npm","pypi","crates","github"],"type":"string"},"name":{"description":"Package name; for github pass owner/repo such as coinbase/x402. npm scoped names @scope/name are allowed.","type":"string"},"symbol":{"description":"Optional symbol name to match, an alias for topic.","type":"string"},"topic":{"description":"Optional topic or symbol; matched against the README/llms.txt markdown headings, such as authentication or useEffect.","type":"string"},"version":{"description":"Optional exact version to pin, such as 2.31.0; default is latest.","type":"string"}},"required":["name","ecosystem"],"type":"object"},"type":{"const":"http","type":"string"}},"required":["type","method"],"type":"object"},"output":{"properties":{"example":{"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-09-24","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.008,"price_match":true,"latency_ms":1057,"error":null}],"description_full":"Working code snippets for a library, matched to a topic. Give an ecosystem, package name and a topic or symbol and get the fenced code blocks from the README or docs whose language, code or nearest heading matches, each with a source citation and an honest truncated flag. Ideal for grounding a coding agent in real usage examples.","last_updated":"2026-09-17T11:55:08.119Z","schemes":["exact"]}