{"uid":"cap_OeT76fKfB5Bkz_vMj_COU","slug":"s2ar-symbol-finder-code-search-by-name-in-github-repo-76b6a785","name":"s2ar Symbol Finder — Code Search by Name in GitHub Repo","description":"Code search by name in a GitHub repo — every definition of a symbol with file and lines. GET ?repo=&name=","url":"https://api.s2ar.dev/x402/v1/sym/find?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","name"],"properties":{"ref":{"type":"string","description":"branch, tag or commit; the default branch when omitted"},"name":{"type":"string"},"repo":{"type":"string","description":"a public GitHub, GitLab or Codeberg repository: owner/repo, github.com/owner/repo or its https URL"},"prefix":{"type":"string","description":"match names starting with `name`"}},"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.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_JELMZyy1dBe_GmVQPWf92","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Searches a public GitHub, GitLab, or Codeberg repository for every definition of a named symbol, returning file paths and line ranges for all matches.","exampleAgentPrompt":"Find every definition of the symbol `parseRequest` in the repo github.com/acme/backend — show me the file paths and line numbers for each one.","exampleUseCases":[{"title":"Locate all class definitions in a repo","prompt":"Find every place the class `AuthService` is defined in the repo owner/myproject on GitHub, including which files and line numbers."},{"title":"Trace a function across branches","prompt":"Search the repo gitlab.com/myorg/api for all definitions of the function `handleWebhook` on the `develop` branch and tell me where they appear."},{"title":"Audit symbol usage before refactoring","prompt":"Before I rename it, can you find every definition of `UserModel` in github.com/acme/data-layer so I know what files and lines I need to update?"}],"resultDescription":"A list of all definitions for the requested symbol name found in the specified repository, each entry including the file path and the line range (start and end lines) where the definition appears. Optionally filtered to a specific branch, tag, or commit.","failureModes":["Repository not found or is private — returns an error indicating the repo is inaccessible","Symbol name not found in the repository — returns an empty result set","Invalid repository format — error if owner/repo or URL is malformed","Rate limits or payment failure — 402 response if x402 payment is not completed","Branch/tag/commit ref does not exist — error or fallback to default branch"],"whenToPreferThis":"Use this endpoint when you need to find all locations where a specific named symbol (function, class, method, variable, type) is defined within a public repository, especially when you know the exact name or a name prefix. Prefer it over semantic/meaning-based search when the symbol name is already known. It is more precise than a full-text grep because it understands code structure and returns definition sites rather than all usages.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T12:35:38.188Z","isFirstParty":false,"canonicalSlug":"s2ar-symbol-finder-code-search-by-name-in-github-repo-76b6a785"}