{"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":"65280953-a6eb-4739-8e42-112c04ab8a4b","catalogType":"api","categories":["developer","data"],"dataPlatform":"gitlab","dataPlatformLogoUrl":"https://api.sh/logos/gitlab.png","dataPlatformTranslations":{},"dataProduct":"dev-reference","description":"Get GitLab Project Tree data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as output, path, and retrieve structured data including requested directory path, full repository-relative path, git file mode, and next page to map repository structure, plan targeted file reads, and compare paths across refs.","descriptionTranslations":{"ar":"استعرض الملفات والمجلدات الفرعية في مستودع GitLab عام عبر OpenAny REST قبل جلب محتوى ملفات محددة. أرسل مسار المشروع مع مسار المجلد والمرجع وخيار السرد المتكرر اختياريا لاستلام المسارات والأنواع والأوضاع والروابط مع دعم التصفح.","ja":"OpenAny REST で GitLab 公開リポジトリのファイルやフォルダ構成を一覧取得し、個別ファイル取得前の探索に利用できます。プロジェクトパスに任意のフォルダパス、ref、再帰取得フラグを指定すると、パス、種別、モード、URL をページング付きで返します。","zh":"通过 OpenAny REST 浏览 GitLab 公开仓库的文件和子目录结构，便于在读取单文件内容前先定位路径。传入项目路径以及可选目录路径、分支或提交引用和递归开关，即可分页获取条目路径、类型、权限模式和链接。"},"effectContentHtml":"","executionMode":"sync","id":"bb3083f0-883a-423a-8532-973c45c2b1d2","includedContentHtml":"","inputs":[{"description":"Project path (namespace/project), link or numeric id.","location":"query","name":"path","nullable":false,"required":true,"type":"string"},{"description":"Folder path (default: the root).","location":"query","name":"dir","nullable":false,"required":false,"type":"string"},{"description":"Branch, tag or commit.","location":"query","name":"ref","nullable":false,"required":false,"type":"string"},{"description":"1 = every level below the folder.","location":"query","name":"recursive","nullable":false,"required":false,"type":"string"},{"description":"Items per page (default 100, max 100).","location":"query","name":"limit","nullable":false,"required":false,"type":"integer"},{"description":"Page number (default 1). Pass `next_page` back; null on the last page.","location":"query","name":"page","nullable":false,"required":false,"type":"integer"},{"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/gitlab.png","method":"GET","name":"GitLab project tree API","nameTranslations":{},"overviewHtml":"\u003ch2\u003eGitLab Project Tree API\u003c/h2\u003e\n\u003cp\u003eSend path in the query string, then optionally specify dir for a subdirectory (defaulting to repository root), ref for a branch, tag or commit, and recursive=1 to traverse nested folders. Returned items list each blob or tree entry with its path, mode and URL.\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: path. Optional dir (folder path, default root), ref (branch/tag/commit), recursive (1 for all nested levels), limit (default 100, max 100) and page.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eSelected implementation\u003c/td\u003e\n\u003ctd\u003eapish · GitLab project tree 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\u003eMap repository structure\u003c/strong\u003e: Inspect top-level or recursive directory trees to locate manifests, docs or source folders.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003ePlan targeted file reads\u003c/strong\u003e: Collect exact blob paths and pass them to the GitLab Project File API instead of cloning the repository.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eCompare paths across refs\u003c/strong\u003e: Query the same folder under two tags or branches to see added or moved files.\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\u003edir\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eRequested directory path\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\u003eitems[].name\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eFile or folder base name\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eitems[].path\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eFull repository-relative path\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eitems[].type\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eEntry type such as blob or tree\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eitems[].mode\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eGit file mode\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eitems[].url\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eDirect GitLab web URL for the entry\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003enext_page\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eNext page number, or null on the final page\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/gitlab/v1/project/tree \\\n  -H \u0026#34;Authorization: Bearer ${OPENANY_API_KEY}\u0026#34; \\\n  --data-urlencode output=json \\\n  --data-urlencode path=gitlab-org/gitlab-runner\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/bb3083f0-883a-423a-8532-973c45c2b1d2\"\u003ePublished GitLab Project Tree 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\u003eWhat does the dir parameter control?\u003c/h3\u003e\n\u003cp\u003edir sets the folder path inside the repository to list; omit it to list from the repository root.\u003c/p\u003e\n\u003ch3\u003eHow do I list files in nested subdirectories?\u003c/h3\u003e\n\u003cp\u003ePass recursive=1 to traverse every level below the selected folder.\u003c/p\u003e\n\u003ch3\u003eDoes this endpoint return file contents?\u003c/h3\u003e\n\u003cp\u003eNo. It returns directory metadata such as path, type and mode. Use the GitLab Project File API to read a file\u0026#39;s text.\u003c/p\u003e\n\u003ch3\u003eHow many entries are returned per page?\u003c/h3\u003e\n\u003cp\u003elimit defaults to 100 (also the maximum per page). Pass next_page back as page until it is null.\u003c/p\u003e\n\u003ch3\u003eCan I browse the tree at an older tag or commit?\u003c/h3\u003e\n\u003cp\u003eYes. Set ref to the target branch name, tag or commit SHA.\u003c/p\u003e\n\u003ch3\u003eHow do I avoid stale listings after a recent push?\u003c/h3\u003e\n\u003cp\u003ePass fresh=1 to skip the 24-hour cache and fetch the live repository tree.\u003c/p\u003e\n\u003ch2\u003eRelated APIs\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"https://openany.si/market/apis/gitlab/gitlab-project-api\"\u003eGitLab Project API\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://openany.si/market/apis/gitlab/gitlab-project-file-api\"\u003eGitLab Project File API\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://openany.si/market/apis/gitlab/gitlab-project-issues-api\"\u003eGitLab Project Issues API\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n","pagePath":"/markets/apis/gitlab/gitlab-project-tree-api?offering=bb3083f0-883a-423a-8532-973c45c2b1d2","providerId":"apish","publicPath":"/v1/agent-apis/apish/gitlab/v1/project/tree","requestContentType":"none","revision":3,"samples":[{"http_status":200,"name":"Official example · Official documentation response · Supplier-tr","request":{"body":null,"headers":{},"path":{},"query":{"output":"json","path":"gitlab-org/gitlab-runner"}},"response_body":{"cached":false,"count":59,"credits_used":1,"dir":null,"items":[{"id":"80727d38ae9b31bab896624b2cc045266b1558e0","mode":"040000","name":".gitlab","path":".gitlab","type":"dir","url":"https://gitlab.com/gitlab-org/gitlab-runner/-/tree/HEAD/.gitlab"},{"id":"743b29ba50b6aaf34dd39c1d110c0ee2e19e1eb8","mode":"040000","name":".vscode","path":".vscode","type":"dir","url":"https://gitlab.com/gitlab-org/gitlab-runner/-/tree/HEAD/.vscode"},"… 57 more"],"next_page":null,"page":1,"project":"gitlab-org/gitlab-runner","recursive":false,"ref":null,"total":59,"total_pages":1}}],"seoDescription":"Get GitLab Project Tree 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:38:44.357Z","usageInstructionsHtml":""}}