How to search GitHub issues and PRs by author or label
Pull matching GitHub issues and pull requests with author, state, labels, counts and body so you can see who is opening work on two repositories
On this page
You have 75 issues and pull requests opened by one contributor across two repositories and need to decide whether to invite that person to a triage team. Use anyapi.github.search_issues to pull the matching rows, then fill a review table with author, association, state, labels, counts and timestamps. Agents call it through POST /v1/runs with toolId anyapi.github.search_issues. No run has been executed for this article; the worksheet and values below are a design
Example query and review table
Start with one query per repository. Example query, with invented repository names and a placeholder login:
repo:acme-plumbing/boiler-app author:octo-contributor-example
Replace the repo and login with your own. The query field is required and accepts GitHub qualifiers such as repo:, is:pr, is:issue, author:, label: and created:.... Add label:bug when the review is scoped to that label; leave the label qualifier out when you need the contributor's full set. The contract documents these optional fields: limit defaults to 100 and accepts 1-100, page defaults to 1, sort accepts comments, created, updated or reactions, and order accepts desc or asc. Keep limit the same while walking pages because it sets the page size
The deliverable is a table with these columns: repo, number, title, author, authorAssociation, state, labels, comments, reactions, createdUtc, updatedUtc and url. Values here are placeholders showing the shape
| repo | number | title | author | authorAssociation | state | labels | comments | reactions | createdUtc | updatedUtc | url |
|---|---|---|---|---|---|---|---|---|---|---|---|
| acme-plumbing/boiler-app | 101 | (title from result) | octo-contributor-example | FIRST_TIME_CONTRIBUTOR | open | bug, triage | 4 | 2 | (epoch) | (epoch) | (result url) |
Read the fields that set review priority
The output has found, data.total, data.hasMore and data.issues. Each issue object carries the fields in the table plus body; body is Markdown as written or null when empty. authorAssociation is the author's relationship to the repository: OWNER, MEMBER, COLLABORATOR, CONTRIBUTOR, FIRST_TIME_CONTRIBUTOR, FIRST_TIMER or NONE. authorType is User, Bot or Organization, so check it before treating a row as a person
Use those fields in your sheet to judge review priority. A row with FIRST_TIMER or FIRST_TIME_CONTRIBUTOR and a bug label can go high. A closed pull request with mergedUtc set can go low, since the contract says a merged pull request is closed and has mergedUtc set. A bot or organization account can go to a separate check. Use state, labels, comments and reactions to separate recurring bug reports from merged work. createdUtc, updatedUtc, closedUtc and mergedUtc are UTC epoch seconds; multiply by 1000 for a JS Date in milliseconds. draft is true or false for a pull request and null for an issue
If found is false, reason can be not_found; the contract calls that a successful call, not an error. For comment-level review after this table, the companion guide on listing GitHub issue comments covers that step
Walk pages within the 1,000 match limit
GitHub serves only the first 1,000 matches, so page times limit can be at most 1,000. limit is 1-100 and sets the page size. Keep it the same while walking pages. Request page + 1 while data.hasMore is true. data.total is the number of matches GitHub reports. If data.total is above 1,000, the tool cannot show matches beyond the first 1,000; narrow the query with created:..., label: or is:pr instead of expecting more pages
The agent prompt
Example prompt with the same invented repository names and placeholder login:
Set up https://purrkey.app/SKILL.md, then use Purrkey to search GitHub
issues and pull requests for one contributor across two repositories.
Check the current inputs and price of anyapi.github.search_issues before
running anything. Use limit 100 and page 1 for each query, then request
page + 1 while data.hasMore is true. Return a table with repo, number,
title, author, authorAssociation, state, labels, comments, reactions,
createdUtc, updatedUtc, url. Do not invent rows.
Query 1: repo:acme-plumbing/boiler-app author:octo-contributor-example
Query 2: repo:acme-plumbing/pipe-service author:octo-contributor-exampleReplace the example queries with your repositories and contributor. If you need a label-scoped pass, add label: to the query and account for the extra calls in the cost plan
Estimated tool cost
Prices read through the Purrkey catalog on November 13, 2026. The unit is max_call: Maximum per call. Successful runs settle at the actual AnyAPI charge. The totals below are ceilings, not settled charges
| Step | Formula | Unit price | Planned quantity | Total |
|---|---|---|---|---|
| One page of up to 100 results | calls x max price | $0.0024 per call | 1 | $0.0024 |
Three pages while data.hasMore is true | calls x max price | $0.0024 per call | 3 | $0.0072 |
| Two-repo first pass, one page each | calls x max price | $0.0024 per call | 2 | $0.0048 |
For 75 results, start with one page per repository: 2 calls at most $0.0048. If either repository reports data.hasMore, request page + 1; a three-page walk is at most $0.0072. Agent model fees are not counted
Next action
Run the first query on the GitHub issue search tool page
Get started by giving this to your agent
- Claude Code
- Codex
- Gemini CLI
- Cursor
- GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with GitHub.FAQ
How do I search GitHub issues by author and label?
Run anyapi.github.search_issues with a query that includes author: and, when needed, label:, plus a repo: qualifier for each repository. The result table includes author, labels, state, comments, reactions and timestamps.
What inputs does anyapi.github.search_issues take?
The contract documents query as required, with optional limit, page, sort and order. limit defaults to 100 and accepts 1-100; page defaults to 1; sort accepts comments, created, updated or reactions; order accepts desc or asc.
How many search results can I page through?
GitHub serves only the first 1,000 matches, so page times limit can be at most 1,000. limit is 1-100 and sets the page size; request page + 1 while data.hasMore is true.
What does authorAssociation tell me?
It reports the author's relationship to the repository as OWNER, MEMBER, COLLABORATOR, CONTRIBUTOR, FIRST_TIME_CONTRIBUTOR, FIRST_TIMER or NONE. Use it with authorType, state, labels, comments and reactions to judge review priority.
How much does a GitHub issue search cost?
The listing is up to $0.0024 per call, quoted as max_call. One page is one call at most $0.0024, and three pages are three calls at most $0.0072. Successful runs settle at the actual AnyAPI charge.
What happens when no issue or pull request matches?
found is false and reason can be not_found; the contract calls that a successful call, not an error. A matching search returns data.total, data.hasMore and data.issues.
Next step
Try this with GitHub
The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.