{"meta":{"title":"REST API endpoints for GitHub Actions artifacts","intro":"Use the REST API to interact with artifacts in GitHub Actions.","product":"REST API","breadcrumbs":[{"href":"/en/enterprise-cloud@latest/rest","title":"REST API"},{"href":"/en/enterprise-cloud@latest/rest/actions","title":"Actions"},{"href":"/en/enterprise-cloud@latest/rest/actions/artifacts","title":"Artifacts"}],"documentType":"article"},"body":"# REST API endpoints for GitHub Actions artifacts\n\nUse the REST API to interact with artifacts in GitHub Actions.\n\n## About artifacts in GitHub Actions\n\nYou can use the REST API to download, delete, and retrieve information about workflow artifacts in GitHub Actions. Artifacts enable you to share data between jobs in a workflow and store data once that workflow has completed. For more information, see [Store and share data with workflow artifacts](/en/enterprise-cloud@latest/actions/tutorials/store-and-share-data).\n\n> \\[!NOTE]\n> Most endpoints use `Authorization: Bearer <YOUR-TOKEN>` and `Accept: application/vnd.github+json` headers, plus `X-GitHub-Api-Version: 2026-03-10`. Curl examples below omit these standard headers for brevity.\n\n## List artifacts for a repository\n\n```\nGET /repos/{owner}/{repo}/actions/artifacts\n```\n\nLists all artifacts for a repository.\nAnyone with read access to the repository can use this endpoint.\nOAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with a private repository.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n* **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n* **`page`** (integer)\n  The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"\n  Default: `1`\n\n* **`name`** (string)\n  The name field of an artifact. When specified, only artifacts with this name will be returned.\n\n### HTTP response status codes\n\n* **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/actions/artifacts\n```\n\n**Response schema (Status: 200):**\n\n* `total_count`: required, integer\n* `artifacts`: required, array of `Artifact`:\n  * `id`: required, integer\n  * `node_id`: required, string\n  * `name`: required, string\n  * `size_in_bytes`: required, integer\n  * `url`: required, string\n  * `archive_download_url`: required, string\n  * `expired`: required, boolean\n  * `created_at`: required, string or null, format: date-time\n  * `expires_at`: required, string or null, format: date-time\n  * `updated_at`: required, string or null, format: date-time\n  * `digest`: string or null\n  * `workflow_run`: object or null:\n    * `id`: integer\n    * `repository_id`: integer\n    * `head_repository_id`: integer\n    * `head_branch`: string\n    * `head_sha`: string\n\n## Get an artifact\n\n```\nGET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\n```\n\nGets a specific artifact for a workflow run.\nAnyone with read access to the repository can use this endpoint.\nIf the repository is private, OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n* **`artifact_id`** (integer) (required)\n  The unique identifier of the artifact.\n\n### HTTP response status codes\n\n* **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/actions/artifacts/ARTIFACT_ID\n```\n\n**Response schema (Status: 200):**\n\n* `id`: required, integer\n* `node_id`: required, string\n* `name`: required, string\n* `size_in_bytes`: required, integer\n* `url`: required, string\n* `archive_download_url`: required, string\n* `expired`: required, boolean\n* `created_at`: required, string or null, format: date-time\n* `expires_at`: required, string or null, format: date-time\n* `updated_at`: required, string or null, format: date-time\n* `digest`: string or null\n* `workflow_run`: object or null:\n  * `id`: integer\n  * `repository_id`: integer\n  * `head_repository_id`: integer\n  * `head_branch`: string\n  * `head_sha`: string\n\n## Delete an artifact\n\n```\nDELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\n```\n\nDeletes an artifact for a workflow run.\nOAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n* **`artifact_id`** (integer) (required)\n  The unique identifier of the artifact.\n\n### HTTP response status codes\n\n* **204** - No Content\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/repos/OWNER/REPO/actions/artifacts/ARTIFACT_ID\n```\n\n**Response schema (Status: 204):**\n\n## Download an artifact\n\n```\nGET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}\n```\n\nGets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for Location: in\nthe response header to find the URL for the download. The :archive\\_format must be zip.\nOAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n* **`artifact_id`** (integer) (required)\n  The unique identifier of the artifact.\n\n* **`archive_format`** (string) (required)\n\n### HTTP response status codes\n\n* **302** - Found\n\n* **410** - Gone\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/actions/artifacts/ARTIFACT_ID/ARCHIVE_FORMAT\n```\n\n**Response schema (Status: 302):**\n\n## List workflow run artifacts\n\n```\nGET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\n```\n\nLists artifacts for a workflow run.\nAnyone with read access to the repository can use this endpoint.\nOAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with a private repository.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n* **`run_id`** (integer) (required)\n  The unique identifier of the workflow run.\n\n* **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n* **`page`** (integer)\n  The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"\n  Default: `1`\n\n* **`name`** (string)\n  The name field of an artifact. When specified, only artifacts with this name will be returned.\n\n* **`direction`** (string)\n  The direction to sort the results by.\n  Default: `desc`\n  Can be one of: `asc`, `desc`\n\n### HTTP response status codes\n\n* **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/artifacts\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [List artifacts for a repository](#list-artifacts-for-a-repository)."}