Upcoming Changes to GitHub Dependabot Alerts REST API Pagination
Allison announces the upcoming removal of offset-based pagination from GitHub Dependabot alerts REST API, guiding developers on migrating to cursor-based pagination methods for enhanced performance and consistency.
Upcoming Changes to GitHub Dependabot Alerts REST API Pagination
GitHub is deprecating offset-based pagination parameters (page
, first
, and last
) for all Dependabot alerts REST API endpoints. Developers and integrators must switch to using only cursor-based pagination (before
, after
, and per_page
), aligning Dependabot APIs with other GitHub security APIs and enhancing data retrieval reliability.
What’s Changing
- Offset-based pagination parameters will no longer be supported:
page
first
last
- This change affects the following endpoints:
- List Dependabot alerts for a repository
- List Dependabot alerts for an organization
- List Dependabot alerts for an enterprise
New Pagination Parameters
- Use these cursor-based parameters:
before
after
per_page
Why This Matters
Cursor-based pagination offers greater consistency and performance advantages, simplifying how users and integrations handle large datasets across security APIs on GitHub.
Timeline
- The deprecation becomes effective on October 14, 2025.
- Offset-based pagination will be removed on that date.
- Update all relevant scripts and integrations as soon as possible.
Next Steps
- Review your current usage of GitHub Dependabot alerts REST API endpoints.
- Replace any use of
page
,first
, orlast
withbefore
,after
, orper_page
. - Reference the following documentation for more details:
Community and Support
- Join the ongoing discussion or ask questions in the GitHub Community announcements forum.
About the Author
This update was provided by Allison via The GitHub Blog.
This post appeared first on “The GitHub Blog”. Read the entire article here