Skip to main content
github_search is a focused tool for querying GitHub activity. It searches for pull requests or commits by author within a date range and returns only the essential fields — no pagination tokens, no nested objects, no raw API noise. Unlike calling the GitHub API through fetch_external, this tool handles query construction, header setup (commits search requires a special Accept header), and response shaping automatically.

Prerequisites

  • GITHUB_TOKEN must be set in your environment
  • api.github.com must be in PROXY_ALLOWED_DOMAINS
  • The token must be configured for injection in FETCH_EXTERNAL_TOKEN_MAP:
    PROXY_ALLOWED_DOMAINS=api.github.com
    FETCH_EXTERNAL_TOKEN_MAP={"api.github.com":"GITHUB_TOKEN"}
    GITHUB_TOKEN=ghp_xxxxxxxxxxxx
    

Parameters

type
string
required
What to search for. Must be either "prs" (pull requests) or "commits".
repo
string
required
Repository in owner/repo format (e.g. "thezem/reacher").
author
string
required
GitHub username to filter by (e.g. "thezem").
created_after
string
required
ISO date string. Returns items created on or after this date (e.g. "2026-03-01"). For commits this filters by committer date.
per_page
number
Number of results to return. Min 1, max 100. Defaults to 25.

Return value

success
boolean
true on a successful GitHub API response.
items
array
Array of result objects. Shape depends on type.

Usage examples

{
  "type": "prs",
  "repo": "thezem/reacher",
  "author": "thezem",
  "created_after": "2026-01-01"
}

Example output

{
  "success": true,
  "items": [
    {
      "number": 42,
      "title": "Add browser tool with CDP support",
      "url": "https://github.com/thezem/reacher/pull/42",
      "state": "closed",
      "draft": false,
      "merged": true,
      "created_at": "2026-03-12"
    }
  ]
}
The GitHub commits search API requires the Accept: application/vnd.github.cloak-preview header. This is handled automatically by the tool — you don’t need to pass it.