{"uid":"cap_JrVaPKkl9R2EITFVx6wFK","slug":"s2ar-repo-symbol-map-dfa53753","name":"s2ar Repo Symbol Map","description":"GitHub repo map — files ranked by imports with their definitions, fitted to a token budget. GET ?repo=owner/repo","url":"https://api.s2ar.dev/x402/v1/sym/map?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","queryParams"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"queryParams":{"type":"object","required":["repo"],"properties":{"ref":{"type":"string","description":"branch, tag or commit; the default branch when omitted"},"repo":{"type":"string","description":"a public GitHub, GitLab or Codeberg repository: owner/repo, github.com/owner/repo or its https URL"},"budget":{"type":"string","description":"approximate tokens (default 1000)"}},"additionalProperties":{"type":"string"}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_XnytBKx6MZ4oIDVfmIL01","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns files in a GitHub/GitLab/Codeberg repo ranked by imports, with their definitions, fitted to a token budget.","exampleAgentPrompt":"Can you give me a map of the most important files and their definitions in the vercel/next.js GitHub repo, fitted to about 2000 tokens?","exampleUseCases":[{"title":"Pre-contribution codebase orientation","prompt":"I'm about to contribute to the pallets/flask repo on GitHub — can you map out the core files ranked by how often they're imported, with their definitions, so I understand the architecture before diving in?"},{"title":"AI context window prep for code Q&A","prompt":"I want to ask questions about the huggingface/transformers repo but need to fit context into about 1500 tokens — can you give me a ranked map of its key files and symbols?"},{"title":"Open source project architecture review","prompt":"Can you show me the most central files and their function/type definitions in the django/django GitHub repo so I can understand how the project is structured at a high level?"}],"resultDescription":"A ranked list of files from the repository, ordered by how often they are imported by other files, each accompanied by their symbol definitions (functions, types, classes, etc.), with the entire output fitted to the specified token budget (default 1000 tokens). This gives an agent or developer a compact, importance-weighted map of the codebase's core structure.","failureModes":["Repository not found or is private — returns error indicating inaccessible repo","Invalid repo format (not owner/repo or recognizable URL) — returns validation error","Token budget too small to include any meaningful content — may return minimal or empty map","Rate limiting or upstream GitHub/GitLab/Codeberg API failures — returns upstream error","Invalid ref (branch/tag/commit does not exist) — returns ref-not-found error","Payment not processed — x402 payment required error before response is served"],"whenToPreferThis":"Choose this endpoint when you need a compact, importance-weighted structural overview of a public repository — especially when working within a token budget (e.g., for feeding into an LLM context window). It is superior to raw file listing because it ranks files by import centrality and includes symbol definitions, giving semantic meaning to the structure. Prefer it over the file-skeleton endpoint when you want cross-file ranking by importance rather than a flat per-file outline, and over the semantic code search endpoint when you want a holistic map rather than answers to a specific question.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T12:34:38.712Z","isFirstParty":false,"canonicalSlug":"s2ar-repo-symbol-map-dfa53753"}