{"uid":"cap_lWmoOn_UZ2-i_rEjV1C-n","slug":"github-repository-file-fetcher-e1ae5490","name":"GitHub Repository File Fetcher","description":"Fetch a file's contents from a GitHub repository at a given ref.","url":"https://sovereign-x402-zeta.vercel.app/api/v1/repo/github/file","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","properties":{},"additionalProperties":true},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"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.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_UEIrqkPIcofzQYvJQ8_CZ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches the raw contents of a file from a GitHub repository at a specified ref (branch, tag, or commit).","exampleAgentPrompt":"Can you fetch the contents of the file `src/config.json` from the `main` branch of the GitHub repo `octocat/Hello-World`?","exampleUseCases":[{"title":"Read config file from a branch","prompt":"Pull the contents of `.env.example` from the `develop` branch of the GitHub repository `myorg/backend-api` so I can see what environment variables are needed."},{"title":"Retrieve source code at a specific commit","prompt":"Fetch the file `lib/parser.js` from the GitHub repo `acme/data-pipeline` at commit `a3f9c12` so I can review what the parser looked like at that point in time."},{"title":"Access README from a tagged release","prompt":"Get me the `README.md` file from the `v2.0.0` tag of the GitHub repository `openai/openai-python` so I can read the release documentation."}],"resultDescription":"Returns the raw contents of the requested file from the GitHub repository at the specified ref, which may include text or binary file data along with any associated metadata.","failureModes":["File not found at the given path or ref — returns 404-style error","Invalid repository name or owner — repository does not exist or is private without credentials","Invalid or non-existent ref (branch, tag, or commit SHA) — returns error indicating ref not found","Rate limiting from GitHub API — returns error if too many requests are made","Network or service unavailability — upstream GitHub API unreachable"],"whenToPreferThis":"Use this endpoint when an agent needs to programmatically read a specific file from a GitHub repository at a particular ref (branch, tag, or commit), especially in automated workflows that need to inspect source code, configuration files, or documentation without cloning the entire repository.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:44:32.648Z","isFirstParty":false}