Api Endpoint

docs-snippet

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.

Open interactive test console

Offering

Provider
api.agentstools.dev
Method
GET
Offering type
Api Endpoint
Transport type
http
Category
Development
Delivery
Not provided
Pricing model
Not provided
x402 version
2

Endpoint context

URL
https://api.agentstools.dev/docs/snippet
MIME type
application/json
First seen
2026-10-16T01:51:10.599Z
Last seen
Tags
docs, code, snippet, example, coding-agent, usage, sample, npm, pypi, crates, GitHub, reference

Payment pricing

x402 payment terms are the authoritative price for calling this endpoint.

Payment option 1
0.008 USDC
Atomic price: 8000 · Network: eip155:8453 · Asset: USDC · Scheme: exact
Raw x402 terms
[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "8000",
    "payTo": "0xF22e558a00D91Ee12A1F50C52186FecB8dDFf493"
  }
]

Observed health

Status
Healthy
Latest latency
379 ms
Average latency
775 ms
HTTP status
402
Last checked
Reachability
100% over 13 checks

Latency is measured to the first response headers. A reachable result does not verify response accuracy or merchant identity.

Input schema

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "http"
    },
    "method": {
      "type": "string",
      "enum": [
        "GET",
        "HEAD",
        "DELETE"
      ]
    },
    "queryParams": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Package name; for github pass owner/repo such as coinbase/x402. npm scoped names @scope/name are allowed."
        },
        "ecosystem": {
          "type": "string",
          "enum": [
            "npm",
            "pypi",
            "crates",
            "github"
          ],
          "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."
        },
        "version": {
          "type": "string",
          "description": "Optional exact version to pin, such as 2.31.0; default is latest."
        },
        "topic": {
          "type": "string",
          "description": "Optional topic or symbol; matched against the README/llms.txt markdown headings, such as authentication or useEffect."
        },
        "symbol": {
          "type": "string",
          "description": "Optional symbol name to match, an alias for topic."
        }
      },
      "required": [
        "name",
        "ecosystem"
      ]
    }
  },
  "required": [
    "type",
    "method"
  ],
  "additionalProperties": false
}

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"
}