{"meta":{"title":"REST-API-Endpunkte für Repositorydatenverkehr","intro":"Verwende die REST-API, um die in deinem Repositorydiagramm bereitgestellten Informationen abzurufen.","product":"REST-API","breadcrumbs":[{"href":"/de/rest","title":"REST-API"},{"href":"/de/rest/metrics","title":"Metriken"},{"href":"/de/rest/metrics/traffic","title":"Verkehr"}],"documentType":"article"},"body":"# REST-API-Endpunkte für Repositorydatenverkehr\n\nVerwende die REST-API, um die in deinem Repositorydiagramm bereitgestellten Informationen abzurufen.\n\n## Informationen zum Repository-Datenverkehr\n\nDu kannst diese Endpunkte verwenden, um Informationen abzurufen, die in deinem Repositorydiagramm für Repositorys bereitgestellt werden, auf die du Schreibzugriff hast. Weitere Informationen finden Sie unter [Datenverkehr zu einem Repository anzeigen](/de/repositories/viewing-activity-and-data-for-your-repository/viewing-traffic-to-a-repository).\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## Get repository clones\n\n```\nGET /repos/{owner}/{repo}/traffic/clones\n```\n\nGet the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday.\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`** (string)\n  The time frame to display results for.\n  Default: `day`\n  Can be one of: `day`, `week`\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **403** - Forbidden\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/traffic/clones\n```\n\n**Response schema (Status: 200):**\n\n* `count`: required, integer\n* `uniques`: required, integer\n* `clones`: required, array of `Traffic`:\n  * `timestamp`: required, string, format: date-time\n  * `uniques`: required, integer\n  * `count`: required, integer\n\n## Get top referral paths\n\n```\nGET /repos/{owner}/{repo}/traffic/popular/paths\n```\n\nGet the top 10 popular contents over the last 14 days.\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### HTTP response status codes\n\n* **200** - OK\n\n* **403** - Forbidden\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/traffic/popular/paths\n```\n\n**Response schema (Status: 200):**\n\nArray of `Content Traffic`:\n\n* `path`: required, string\n* `title`: required, string\n* `count`: required, integer\n* `uniques`: required, integer\n\n## Get top referral sources\n\n```\nGET /repos/{owner}/{repo}/traffic/popular/referrers\n```\n\nGet the top 10 referrers over the last 14 days.\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### HTTP response status codes\n\n* **200** - OK\n\n* **403** - Forbidden\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/traffic/popular/referrers\n```\n\n**Response schema (Status: 200):**\n\nArray of `Referrer Traffic`:\n\n* `referrer`: required, string\n* `count`: required, integer\n* `uniques`: required, integer\n\n## Get page views\n\n```\nGET /repos/{owner}/{repo}/traffic/views\n```\n\nGet the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday.\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`** (string)\n  The time frame to display results for.\n  Default: `day`\n  Can be one of: `day`, `week`\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **403** - Forbidden\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/traffic/views\n```\n\n**Response schema (Status: 200):**\n\n* `count`: required, integer\n* `uniques`: required, integer\n* `views`: required, array of `Traffic`:\n  * `timestamp`: required, string, format: date-time\n  * `uniques`: required, integer\n  * `count`: required, integer"}