{"uid":"cap_OdJ4vUGJaxqqbrr_Wz8Tz","slug":"2s-io-github-repository-branches-4f7b0771","name":"2s.io GitHub Repository Branches","description":"Branches of a repository: name, head commit sha, and protection flag. Read-only; no caller key needed.","url":"https://2s.io/api/github/branches","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":{"const":"http"},"method":{"const":"GET"},"queryParams":{"type":"object","required":["owner","repo"],"properties":{"page":{"type":"integer","minimum":1},"repo":{"type":"string","maxLength":120,"minLength":1},"owner":{"type":"string","maxLength":100,"minLength":1},"perPage":{"type":"integer","maximum":100,"minimum":1}},"additionalProperties":false}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0025","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.0025/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_pQKhCHwwc0SdnjJynGeN4","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0025","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns all branches of a GitHub repository including branch name, head commit SHA, and branch protection status.","exampleAgentPrompt":"Can you list all the branches in the facebook/react GitHub repository, including their head commit SHAs and whether they're protected?","exampleUseCases":null,"resultDescription":"A paginated list of branches for the specified repository, each entry containing the branch name, the SHA of the head commit, and a boolean protection flag indicating whether the branch has protection rules enabled.","failureModes":["Invalid or non-existent owner/repo combination returns an error or empty result","Rate limiting by upstream GitHub API may cause timeouts","Missing required owner or repo query parameters returns a validation error","Private repositories may not be accessible without additional authentication","Page number out of range returns empty results"],"whenToPreferThis":"Use this endpoint when you need a quick, pay-per-call lookup of branch metadata (names, head SHAs, protection status) for any public GitHub repository without managing GitHub API credentials yourself. Ideal for AI agents that need to inspect repo structure on demand within a multi-step workflow.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:56:01.230Z","isFirstParty":false}