Setup
Put them in your environment or
.env; Data APIs covers the other ways.
Notes
- Works without a token for public data, at 60 requests an hour per IP; a token raises that to 5,000 an hour. Search has its own per-minute limits.
- Paging: per_page up to 100 (default 30) and page; the Link response header carries the next and last page URLs.
- Times are ISO 8601 UTC, YYYY-MM-DDTHH:MM:SSZ.
- Pull requests are issues too: comments on a PR conversation go through the issues endpoints, and issue numbers and PR numbers share one sequence.
Endpoints
Search repositories
- Search allows 30 requests a minute authenticated, 10 without a token, and returns at most 1,000 results per query.
Search issues and pull requests
Get a repository
Get a repository’s README
List a repository’s issues
- Pull requests are returned too; they carry a ‘pull_request’ key. Filter them out for issues only.
Get an issue
- 301 means the issue was transferred, 410 that it was deleted.
List an issue’s comments
Get a pull request
List a pull request’s files
- At most 3,000 files in total across pages.