{"uid":"cap_FV8UaYmH9wIGVZt2x4wxA","slug":"s2ar-semantic-code-search-36dd249b","name":"s2ar Semantic Code Search","description":"Code search by meaning in a GitHub repo — the definitions matching a question, with file and lines. GET ?repo=&query=","url":"https://api.s2ar.dev/x402/v1/sym/where?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","query"],"properties":{"k":{"type":"string","description":"hits to return (default 8)"},"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"},"query":{"type":"string"}},"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_Zx06dYdHhGsskA5MkBHZa","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":"Searches a GitHub/GitLab/Codeberg repository by meaning/natural language query and returns matching symbol definitions with file paths and line numbers","exampleAgentPrompt":"Search the torvalds/linux GitHub repo for code that handles memory allocation — give me the top 5 matching definitions with their file paths and line numbers.","exampleUseCases":[{"title":"Finding authentication logic in open source","prompt":"In the supabase/supabase repo, find me all the code that deals with JWT token validation — I want to see the actual definitions and which files they're in."},{"title":"Debugging unfamiliar codebase","prompt":"I'm trying to understand how stripe/stripe-node handles webhook signature verification — search that repo for the relevant code and show me the file and line locations."},{"title":"Onboarding to a new project","prompt":"Search the vercel/next.js repo for code related to server-side rendering and give me the top 8 definitions so I can understand where that logic lives."}],"resultDescription":"Returns a ranked list of symbol definitions from the repository that semantically match the query, each entry including the symbol name, file path, start and end line numbers, and the matched code snippet or signature.","failureModes":["Repository not found or is private — returns error indicating inaccessible repo","Query too vague or no semantic matches found — returns empty result set","Invalid repo format (not owner/repo or valid URL) — returns validation error","Specified ref/branch/tag does not exist in the repository — returns ref not found error","Repository too large or indexing timeout — may return partial results or timeout error"],"whenToPreferThis":"Choose this endpoint when you need to find code by what it does conceptually rather than by exact symbol name. It's ideal for navigating unfamiliar codebases, understanding where specific business logic lives, or finding all code related to a feature without knowing exact function names. Prefer it over the name-based symbol search when you don't know exact identifiers, and over the file skeleton endpoint when you need semantically relevant hits rather than a full structural map.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T12:33:49.567Z","isFirstParty":false,"canonicalSlug":"s2ar-semantic-code-search-36dd249b"}