{"uid":"cap_EuUfB88N2cc90ROjCLpiN","slug":"npm-symbol-context-lookup-cdba7a23","name":"npm Symbol Context Lookup","description":"Free need-to-tool routing plus pay-per-call npm docs and TypeScript API signatures, npm breaking-change diffs, JavaScript-rendered browser snapshots and deterministic coding-agent checks via AgentCash/x402.","url":"https://x402-canary.nicolas-x402-16f380a7.workers.dev/v1/agent/npm-symbol-context","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"package":{"type":"string","example":"hono","maxLength":214},"symbols":{"type":"array","items":{"type":"string"},"example":["Hono"],"maxItems":8},"version":{"type":"string","example":"4.13.2","maxLength":100}}},"responseSchema":{"type":"json","example":{"data":{"package":"hono","symbol_hits":[{"file":"package/dist/types/hono.d.ts","symbol":"Hono","snippet":"export declare class Hono..."}],"latest_version":"4.13.2","resolved_version":"4.13.2","requested_symbols":["Hono"]},"meta":{"engine":"npm-symbol-context"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.015","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":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.015/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.015","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.015","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_39fLkyeR2C-V8fqI9BjDh","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.015","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns TypeScript API signatures and type definitions for specified symbols from an npm package, resolved from the package's distributed type declaration files.","exampleAgentPrompt":"Can you look up the TypeScript type signature for the Hono class in the hono package, version 4.13.2?","exampleUseCases":[{"title":"TypeScript class API discovery","prompt":"What are the TypeScript type signatures exported by the `Router` symbol in the express package at version 4.18.2?"},{"title":"Coding agent library integration","prompt":"I'm building something with the zod library — can you grab the TypeScript declaration for the ZodObject symbol so I know exactly what methods are available?"},{"title":"Version-specific type resolution","prompt":"Pull the TypeScript API signature for the `Client` symbol in the @supabase/supabase-js package pinned to version 2.39.0, I need to know what parameters the constructor takes."}],"resultDescription":"A JSON object containing the package name, a list of symbol hits (each with the source .d.ts file path and the relevant TypeScript declaration snippet), the resolved package version, the latest available version, and the list of requested symbols. The engine metadata field identifies the service as 'npm-symbol-context'.","failureModes":["Package not found on npm — returns empty symbol_hits or error","Symbol not exported by the package — returns empty snippet for that symbol","Version string doesn't resolve to a valid published version — may fall back to latest or return error","Too many symbols requested (max 8) — request rejected","Package name too long (max 214 chars) — request rejected","Payment not completed via x402 — 402 Payment Required response before data is returned"],"whenToPreferThis":"Choose this endpoint when a coding agent or developer tool needs precise, machine-readable TypeScript type declarations for specific symbols from an npm package — especially when the exact constructor signature, method signatures, or exported interface shape is needed at a specific version. Prefer this over full documentation scrapers when you only need targeted symbol-level type information rather than prose documentation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:35:42.205Z","isFirstParty":false}