{"data":{"billing":{"currency":"USD","mode":"rules","parameters":[],"policy_version":2,"sale":{"addons":[],"base_price_micro_usd":"0","max_cost_micro_usd":"2000","quantities":[{"id":"upstream_credits","label":"Actual API.SH credits consumed","max_quantity":"1","measure":"value","pointer":"/credits_used","price_micro_usd":"2000","quantity_scale":0,"source":"response","unit":"credit","unit_quantity":"1"}],"rounding":"ceil","variants":[]}},"capabilityId":"24d43399-26d1-4c8f-956f-8a177ef83375","catalogType":"api","categories":["developer","data"],"dataPlatform":"bitbucket","dataPlatformLogoUrl":"https://api.sh/logos/bitbucket.png","dataPlatformTranslations":{},"dataProduct":"dev-reference","description":"Get Bitbucket Repository Source data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as output, repo, and retrieve structured data including queried workspace/repo identifier, returned resource type, and repository-relative entry path to explore repository folders, read specific source files, and audit files across commits.","descriptionTranslations":{"ar":"تصفح محتويات المجلدات أو اقرأ نص ملف في مستودع Bitbucket عام عبر OpenAny REST لفحص الشيفرة ومراجعة الإعدادات. أرسل repo مع ref وpath اختياريا لسرد عناصر المجلد مع تصفح بالمؤشر أو جلب نص ملف محدد حتى 500 كيلوبايت.","ja":"OpenAny REST で Bitbucket 公開リポジトリのディレクトリ一覧を取得し、指定ファイルの本文（最大 500 KB）を読み取れます。repo に任意の ref と path を指定すると、フォルダ一覧のカーソルページングまたはファイル内容取得が可能です。","zh":"通过 OpenAny REST 浏览 Bitbucket 公开仓库的目录条目或读取单个文件正文，适用于代码检查与配置核验。传入 repo 以及可选 ref 与 path，即可通过游标分页列出目录内容，或获取上限 500 KB 的指定文件文本。"},"effectContentHtml":"","executionMode":"sync","id":"ff1e55c0-43d6-4819-a417-3c8662c561eb","includedContentHtml":"","inputs":[{"description":"Repository as workspace/repo, or a bitbucket.org link.","location":"query","name":"repo","nullable":false,"required":true,"type":"string"},{"description":"Branch, tag or commit (default: the main branch).","location":"query","name":"ref","nullable":false,"required":false,"type":"string"},{"description":"Folder or file path (default: the root folder).","location":"query","name":"path","nullable":false,"required":false,"type":"string"},{"description":"`next_cursor` from the previous page of a folder listing.","location":"query","name":"cursor","nullable":false,"required":false,"type":"string"},{"description":"0 leaves out the bulky `raw` source blocks (often 10-30x smaller).","enum_values":["0","1"],"location":"query","name":"raw","nullable":false,"required":false,"type":"string"},{"description":"Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included.","location":"query","name":"fields","nullable":false,"required":false,"type":"string"},{"description":"1 skips the 24-hour cache and fetches live.","enum_values":["1"],"location":"query","name":"fresh","nullable":false,"required":false,"type":"string"},{"description":"JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON exports are not exposed.","enum_values":["json"],"location":"query","name":"output","nullable":false,"required":false,"type":"string"},{"description":"Native CSV/NDJSON record selector; it has no effect on this JSON-only product.","location":"query","name":"records","nullable":false,"required":false,"type":"string"}],"logoUrl":"https://api.sh/logos/bitbucket.png","method":"GET","name":"Bitbucket repository source entries API","nameTranslations":{},"overviewHtml":"\u003ch2\u003eBitbucket Repository Source API\u003c/h2\u003e\n\u003cp\u003eSupply repo plus optional ref (defaulting to the main branch) and path (defaulting to repository root). Folder requests return entries[] with next_cursor for continuation, whereas pointing path at a file returns that file\u0026#39;s available text up to 500 KB.\u003c/p\u003e\n\u003ch2\u003eQuick Facts\u003c/h2\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eFact\u003c/th\u003e\n\u003cth\u003eValue\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eAccess\u003c/td\u003e\n\u003ctd\u003eOpenAny REST\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eAuthentication\u003c/td\u003e\n\u003ctd\u003eOpenAny API key in the Authorization header\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eCore inputs\u003c/td\u003e\n\u003ctd\u003eRequired query: repo. Optional ref (branch/tag/commit, default main branch), path (folder or file path, default root), cursor (next_cursor for folder listings), raw=0, fields and fresh=1.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eSelected implementation\u003c/td\u003e\n\u003ctd\u003eapish · Bitbucket repository source entries API\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eBilling\u003c/td\u003e\n\u003ctd\u003eSee the pricing area for the selected implementation and request options\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003ch2\u003eWhat You Can Build\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cstrong\u003eExplore repository folders\u003c/strong\u003e: List root or subdirectory entries at a branch or tag to locate configuration files and documentation.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eRead specific source files\u003c/strong\u003e: Point path at a file to inspect its text content (up to 500 KB) without cloning the repository.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eAudit files across commits\u003c/strong\u003e: Pass a commit SHA or tag in ref to compare directory layouts or file text across revisions.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2\u003eReturned Data\u003c/h2\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eField\u003c/th\u003e\n\u003cth\u003eMeaning\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003erepo\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eQueried workspace/repo identifier\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eref\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eBranch, tag or commit queried\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003epath\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eRequested folder or file path\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003etype\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eReturned resource type (directory or file)\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eentries[].name\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eEntry file or folder name\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eentries[].path\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eRepository-relative entry path\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eentries[].type\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eEntry kind reported by Bitbucket\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eentries[].size_bytes\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eReported file size in bytes\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003enext_cursor\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eContinuation cursor for folder listings\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003ch2\u003eQuick Start\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eSet OPENANY_API_KEY to your OpenAny API key.\u003c/li\u003e\n\u003cli\u003eReview the selected implementation and pricing, then adapt the request below to your target.\u003c/li\u003e\n\u003cli\u003eCheck the HTTP response and business result before reading optional fields.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre\u003e\u003ccode class=\"language-bash\"\u003ecurl --request GET --get \\\n  https://api.openany.si/v1/agent-apis/apish/bitbucket/v1/source \\\n  -H \u0026#34;Authorization: Bearer ${OPENANY_API_KEY}\u0026#34; \\\n  --data-urlencode output=json \\\n  --data-urlencode repo=atlassian/aui\n\u003c/code\u003e\u003c/pre\u003e\n\u003ch2\u003eRequest and Response Examples\u003c/h2\u003e\n\u003cp\u003eThe response example is a documentation reference and may be abbreviated. The documented request is a calling template; use the published contract and returned response for the selected implementation.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://openany.si/api/v1/agent-apis/ff1e55c0-43d6-4819-a417-3c8662c561eb\"\u003ePublished Bitbucket Repository Source API implementation contract\u003c/a\u003e.\u003c/p\u003e\n\u003ch2\u003ePricing and Billing\u003c/h2\u003e\n\u003cp\u003eThe pricing area reflects the selected API implementation. Review its billing unit and any request-dependent rules before calling; a source service\u0026#39;s public availability does not determine OpenAny billing.\u003c/p\u003e\n\u003ch2\u003eFrequently Asked Questions\u003c/h2\u003e\n\u003ch3\u003eHow does this endpoint handle folders versus files?\u003c/h3\u003e\n\u003cp\u003ePointing path at a directory (or omitting it for root) returns paginated entries[]; pointing path at a file returns that file\u0026#39;s available text.\u003c/p\u003e\n\u003ch3\u003eWhat is the file text size limit?\u003c/h3\u003e\n\u003cp\u003eReturned file text is limited to 500 KB.\u003c/p\u003e\n\u003ch3\u003eWhen should I use the cursor parameter?\u003c/h3\u003e\n\u003cp\u003eUse cursor with the returned next_cursor value only when paging through folder listings; single-file retrieval is not paginated.\u003c/p\u003e\n\u003ch3\u003eWhat branch is queried if ref is omitted?\u003c/h3\u003e\n\u003cp\u003eWhen ref is omitted, the operation defaults to the repository\u0026#39;s main branch.\u003c/p\u003e\n\u003ch3\u003eCan I pass a Bitbucket URL in repo?\u003c/h3\u003e\n\u003cp\u003eYes. repo accepts either workspace/repo or a bitbucket.org repository link.\u003c/p\u003e\n\u003ch3\u003eHow do I fetch live source changes?\u003c/h3\u003e\n\u003cp\u003ePass fresh=1 to skip the 24-hour cache, and raw=0 to omit bulky raw source blocks.\u003c/p\u003e\n\u003ch2\u003eRelated APIs\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"https://openany.si/market/apis/bitbucket/bitbucket-pipelines-api\"\u003eBitbucket Pipelines API\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://openany.si/market/apis/bitbucket/bitbucket-pull-request-api\"\u003eBitbucket Pull Request API\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://openany.si/market/apis/bitbucket/bitbucket-repositories-api\"\u003eBitbucket Repositories API\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n","pagePath":"/markets/apis/bitbucket/bitbucket-repository-source-entries-api?offering=ff1e55c0-43d6-4819-a417-3c8662c561eb","providerId":"apish","publicPath":"/v1/agent-apis/apish/bitbucket/v1/source","requestContentType":"none","revision":3,"samples":[{"http_status":200,"name":"Official example · Official documentation response · Supplier-tr","request":{"body":null,"headers":{},"path":{},"query":{"output":"json","repo":"atlassian/aui"}},"response_body":{"cached":false,"count":41,"credits_used":1,"entries":[{"mimetype":null,"name":".bitbucket","path":".bitbucket","size_bytes":null,"type":"dir"},{"mimetype":null,"name":".mvn","path":".mvn","size_bytes":null,"type":"dir"},"… 39 more"],"next_cursor":null,"path":"","ref":"master","repo":"atlassian/aui","type":"dir"}}],"seoDescription":"Get Bitbucket Repository Source data via REST or MCP powered by Apish. Pay per call, no subscription. Structured JSON output with one OpenAny API key.","updatedAt":"2026-12-03T02:54:59.575Z","usageInstructionsHtml":""}}