API / list-github-repositories-via-cloud-agents-api

API

List GitHub repositories via the Cloud Agents API

List GitHub repositories accessible to the authenticated user through Cursor's GitHub App with GET https://api.cursor.com/v1/repositories. Official reference: Cloud Agents API → List GitHub Repositories.

The Cloud Agents API v1 is in public beta. Authenticate with Basic auth (API key as username, empty password) or Authorization: Bearer YOUR_API_KEY. Create a user key at Cursor Dashboard → API Keys, or use a service account key. Availability: Beta (all plans) per the API overview.

Strict rate limits

This endpoint has very strict rate limits:

  • 1 request / user / minute
  • 30 requests / user / hour

The request can take tens of seconds for users with access to many repositories. Handle missing repository data gracefully in your client.

Request

curl --request GET \
  --url https://api.cursor.com/v1/repositories \
  -u YOUR_API_KEY:

Response

{
  "items": [
    {
      "url": "https://github.com/your-org/your-repo"
    }
  ]
}

Each item is a repository url you can pass as repos[].url on Create An Agent. Cache the list locally and refresh on a slow cadence so you stay inside the rate limits.