Query Pull Requests
Retrieve pull requests matching a natural-language query with optional repository and person filters. Unlike search, which ranks results by semantic relevance, query returns the pull requests that match the given criteria.
Authentication behavior:
- Personal Access Token (PAT) keys: Requests are attributed to the key’s user
- Organization-wide API keys: Requests are attributed to the organization
Authorizations
The API key to authenticate requests. Obtainable from the web dashboard.
Body
Natural-language description of the pull requests to retrieve. Criteria
such as status, labels, or time range are expressed in the query text,
including references to people and their role (for example, authored by
or reviewed by). Repository scoping is provided separately via the
projects field.
1Repository or project names that scope the query (for example, GitHub repository names). Each value is resolved against all connected providers and applied as a filter. When omitted or empty, all accessible repositories are searched.
Name, display name, or username of a person referenced by the query. The
value is resolved to a known identity before the query runs; the literal
value me resolves to the user associated with the API key.
Response
OK
The issues or pull requests matching the query criteria.