REST API endpoints for starring

Use the REST API to bookmark a repository.

About starring

You can use the REST API to star (bookmark) a repository. Stars are shown next to repositories to show an approximate level of interest. Stars have no effect on notifications or the activity feed. For more information, see Saving repositories with stars.

Starring versus watching

In August 2012, we changed the way watching
works
on GitHub. Some API
client applications may still be using the original "watcher" endpoints for accessing
this data. You should now use the "star" endpoints instead (described
below). For more information, see REST API endpoints for watching and the changelog post.

In responses from the REST API, watchers, watchers_count, and stargazers_count correspond to the number of users that have starred a repository, whereas subscribers_count corresponds to the number of watchers.

New access restrictions

In July 2026, to ensure responsible use of this data and to protect users from misuse, we are introducing new access restrictions to the endpoints related to starring. Access to the stargazers listing endpoints will be limited to admins and collaborators. For more information, see the changelog post.

Note

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.

List stargazers

GET /repos/{owner}/{repo}/stargazers

Lists the people that have starred the repository.
This endpoint supports the following custom media types. For more information, see "Media types."

application/vnd.github.star+json: Includes a timestamp of when the star was created.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example 1: Status Code 200

Request:

curl -L \
  -X GET \
  https://api.github.com/repos/OWNER/REPO/stargazers

Response schema (Status: 200):

Example 2: Status Code 200

Request:

curl -L \
  -X GET \
  https://api.github.com/repos/OWNER/REPO/stargazers

Response schema (Status: 200):

Get stargazer count

GET /repos/{owner}/{repo}/stargazers/count

Gets the current number of users who have starred the repository. Users who previously starred the repository but later removed their star are not included.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/repos/OWNER/REPO/stargazers/count

Response schema (Status: 200):

Get repository star history

GET /repos/{owner}/{repo}/stargazers/history

Returns repository stars grouped by calendar weeks, most recent first. Pages move backward toward the repository's creation week, and weeks within a page are ordered newest to oldest, so concatenating pages produces one continuous series. Weeks without stars contain zero counts. Week and day boundaries are not guaranteed to align with UTC. The days array contains the number of stars created on each day of the week, starting on Sunday.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/repos/OWNER/REPO/stargazers/history

Response schema (Status: 200):

Array (maxItems: 30) of Stargazer History:

List repositories starred by the authenticated user

GET /user/starred

Lists repositories the authenticated user has starred.
This endpoint supports the following custom media types. For more information, see "Media types."

application/vnd.github.star+json: Includes a timestamp of when the star was created.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example 1: Status Code 200

Request:

curl -L \
  -X GET \
  https://api.github.com/user/starred

Response schema (Status: 200):

Array of Repository:

Example 2: Status Code 200

Request:

curl -L \
  -X GET \
  https://api.github.com/user/starred \
  -H "Accept: application/vnd.github.v3.star+json"

Response schema (Status: 200):

Array of Starred Repository:

Check if a repository is starred by the authenticated user

GET /user/starred/{owner}/{repo}

Whether the authenticated user has starred the repository.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/user/starred/OWNER/REPO

Response schema (Status: 204):

Star a repository for the authenticated user

PUT /user/starred/{owner}/{repo}

Note that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see "HTTP method."

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X PUT \
  https://api.github.com/user/starred/OWNER/REPO

Response schema (Status: 204):

Unstar a repository for the authenticated user

DELETE /user/starred/{owner}/{repo}

Unstar a repository that the authenticated user has previously starred.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X DELETE \
  https://api.github.com/user/starred/OWNER/REPO

Response schema (Status: 204):

List repositories starred by a user

GET /users/{username}/starred

Lists repositories a user has starred.
If the specified user has a private profile, this endpoint returns an empty list unless the request is authenticated as that user. A request authenticated as the specified user returns starred repositories visible to the token even if the token has no OAuth scopes.
This endpoint supports the following custom media types. For more information, see "Media types."

application/vnd.github.star+json: Includes a timestamp of when the star was created.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/users/USERNAME/starred

Response schema (Status: 200):

Same response schema as List stargazers.