{"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":"c04152d5-1f72-4645-864c-5f1f9c244e72","catalogType":"api","categories":["developer","data"],"dataPlatform":"gitlab","dataPlatformLogoUrl":"https://api.sh/logos/gitlab.png","dataPlatformTranslations":{},"dataProduct":"dev-reference","description":"Get GitLab Project File 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 truncated and returned file text content to read repository manifests, verify file integrity, and inspect documentation snapshots, ready for production pipelines and AI agent automation.","descriptionTranslations":{"ar":"اجلب ملفا واحدا من مستودع GitLab عام عبر OpenAny REST لتدقيق الإعدادات أو فهرسة الوثائق أو فحص الشيفرة. حدد الهدف عبر مسار المشروع ومسار الملف والمرجع الاختياري أو أرسل رابط blob مباشرة لاستلام النص وبيانات الالتزام وبصمة SHA-256 ومؤشرات الملفات الثنائية والاقتطاع.","ja":"OpenAny REST で GitLab 公開リポジトリの単一ファイルを取得し、設定監査、ドキュメント索引作成、コード確認に利用できます。プロジェクトパス・ファイルパス・任意の ref、または GitLab の blob URL を指定すると、本文、コミット情報、SHA-256、バイナリ判定、切り詰めフラグを返します。","zh":"通过 OpenAny REST 读取 GitLab 公开仓库中的单个文件，适用于配置检查、文档索引或代码审阅。可传入项目路径、文件路径与可选分支或提交引用，或直接提供 GitLab blob 链接，返回文件正文、提交元数据、SHA-256 校验值、二进制标记与截断状态。"},"effectContentHtml":"","executionMode":"sync","id":"babd0675-9ced-4b07-a1b9-07cc96a5b8e1","includedContentHtml":"","inputs":[{"description":"Project path (namespace/project), link or numeric id.","location":"query","name":"path","nullable":false,"required":false,"type":"string"},{"description":"File path in the repository (default: the README).","location":"query","name":"file","nullable":false,"required":false,"type":"string"},{"description":"Branch, tag or commit (default: the default branch).","location":"query","name":"ref","nullable":false,"required":false,"type":"string"},{"description":"Instead of path and file: a /-/blob/\u003cref\u003e/\u003cfile\u003e link.","location":"query","name":"url","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/gitlab.png","method":"GET","name":"GitLab project file API","nameTranslations":{},"overviewHtml":"\u003ch2\u003eGitLab Project File API\u003c/h2\u003e\n\u003cp\u003eIdentify the file using path, file and optional ref, or supply a /-/blob/\u0026lt;ref\u0026gt;/\u0026lt;file\u0026gt; link in url. Omitting file defaults to the repository README on the default branch. Responses return content alongside blob_id, commit_id, sha256, size, binary and truncated flags.\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\u003eQuery: path plus optional file (defaults to README) and ref (defaults to default branch), or url (/-/blob/\u0026lt;ref\u0026gt;/\u0026lt;file\u0026gt;). Optional 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 · GitLab project file 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\u003eRead repository manifests\u003c/strong\u003e: Retrieve package manifests, CI definitions or README files at a pinned tag or commit SHA.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eVerify file integrity\u003c/strong\u003e: Compare sha256 and commit_id against local mirrors or compliance baselines.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eInspect documentation snapshots\u003c/strong\u003e: Pull Markdown or configuration files from public repositories without cloning the full Git history.\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\u003efile\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eRepository path of the returned file\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 used for retrieval\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003ecommit_id\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eCommit identifier associated with the file\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003esize\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\u003esha256\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eSHA-256 checksum of the file\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003ebinary\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eIndicator flagging binary file content\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003etruncated\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eIndicator flagging text truncated beyond 500,000 characters\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003econtent\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eReturned file text content\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eraw_url\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eDirect raw file URL on GitLab\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/file \\\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/babd0675-9ced-4b07-a1b9-07cc96a5b8e1\"\u003ePublished GitLab Project File 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 happens if I omit the file parameter?\u003c/h3\u003e\n\u003cp\u003eWhen file is omitted, the API requests the repository README on the default branch.\u003c/p\u003e\n\u003ch3\u003eCan I pass a GitLab blob URL instead of path and file?\u003c/h3\u003e\n\u003cp\u003eYes. Supply a /-/blob/\u0026lt;ref\u0026gt;/\u0026lt;file\u0026gt; link in the url query parameter as an alternative to path, file and ref.\u003c/p\u003e\n\u003ch3\u003eIs there a size limit on returned text?\u003c/h3\u003e\n\u003cp\u003eYes. Text beyond 500,000 characters is truncated and flagged by truncated; binary files are also flagged via binary.\u003c/p\u003e\n\u003ch3\u003eHow do I read a file from a specific tag or commit?\u003c/h3\u003e\n\u003cp\u003eSet the ref query parameter to the target branch name, tag or commit SHA, or include it inside a blob url.\u003c/p\u003e\n\u003ch3\u003eDoes this endpoint list directory contents?\u003c/h3\u003e\n\u003cp\u003eNo. It retrieves a single file. Use the GitLab Project Tree API to browse folders and discover file paths first.\u003c/p\u003e\n\u003ch3\u003eHow do caching and output format work?\u003c/h3\u003e\n\u003cp\u003eOutput is JSON only. Pass fresh=1 to bypass the 24-hour cache and raw=0 to drop bulky raw blocks.\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-issues-api\"\u003eGitLab Project Issues API\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://openany.si/market/apis/gitlab/gitlab-project-merge-request-api\"\u003eGitLab Merge Request API\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n","pagePath":"/markets/apis/gitlab/gitlab-project-file-api?offering=babd0675-9ced-4b07-a1b9-07cc96a5b8e1","providerId":"apish","publicPath":"/v1/agent-apis/apish/gitlab/v1/project/file","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":{"binary":false,"blob_id":"9b0ca792cf47a65754ac108767eef4b534ca23f6","cached":false,"commit_id":"f3160876b6f1199b482d32ae5733f4183adf084c","content":"# GitLab Runner\n\nThis is the repository of the official GitLab Runner written in Go.\nIt executes tests and sends the results to GitLab.\n\n[Gi…","credits_used":1,"executable":false,"file":"README.md","last_commit_id":"9962b4022534a1272a3c610b9fee1c4833aa340c","name":"README.md","project":"gitlab-org/gitlab-runner","raw_url":"https://gitlab.com/gitlab-org/gitlab-runner/-/raw/main/README.md","ref":"main","sha256":"83dd12da03d7e427f9e131b3019d9b0986daaa391862dab7b41ef9d02e02bb10","size":3895,"truncated":false,"url":"https://gitlab.com/gitlab-org/gitlab-runner/-/blob/main/README.md"}}],"seoDescription":"Get GitLab Project File 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:22.672Z","usageInstructionsHtml":""}}