Interface SearchIssuesParams

Query parameters for searching issues and pull requests.

Use the q field to build a GitHub search query. Prefix qualifiers with is:issue or is:pr to narrow results.

// All open PRs authored by a user
{ q: 'is:pr is:open author:octocat' }

// Stale issues not updated in 30+ days
{ q: 'is:issue is:open updated:<2024-01-01' }
interface SearchIssuesParams {
    order?: "asc" | "desc";
    page?: number;
    per_page?: number;
    q: string;
    sort?: "created" | "updated" | "comments";
}

Hierarchy (View Summary)

Properties

order?: "asc" | "desc"

Sort direction

page?: number

Page number to retrieve (1-based). Use nextPage from the previous response to paginate forward.

per_page?: number

Maximum number of results per page. GitHub default is 30, maximum is 100.

q: string

The search query string. Required.

Supports GitHub's search syntax with qualifiers such as is:issue, is:pr, is:open, author:, label:, repo:, etc.

sort?: "created" | "updated" | "comments"

Sort field