We’ve removed offset-based pagination parameters (page, first, and last) in all GitHub Dependabot alerts for REST API endpoints. Going forward, we only support cursor-based pagination parameters (before, after, and per_page). This change brings GitHub Dependabot alerts in line with other GitHub security APIs and simplifies how you retrieve large sets of alerts.

What’s changing

You are longer able to use page, first, or last parameters when listing Dependabot alerts via the REST API. This affects the following endpoints:

  • List Dependabot alerts for a repository
  • List Dependabot alerts for an organization
  • List Dependabot alerts for an enterprise

To paginate through results, use these cursor-based parameters instead:

  • before
  • after
  • per_page

Why we made this change

Cursor-based pagination is more consistent, reliable, and performant than offset-based pagination. By standardizing on cursor-based pagination, we’re making it easier for you to work with large datasets and align your integrations across GitHub security APIs.

For more details on how cursor-based pagination works in the API, see the GitHub API documentation. For more information on the working with Dependabot, see the Dependabot Alerts API documentation.