# GitHub

Search repositories, issues + PRs, discussions, or literal code patterns across public GitHub, and fetch repo data — metadata, READMEs, files, trees, commits, releases, PRs, issues, discussions — from a single ref.

## Tools & pricing

- `glim_github_search` / `POST /api/v1/github/search` — $0.002 per call. `query` with GitHub search syntax; `kind` picks repos | conversations | discussions | code (inferred when omitted); `repo` scopes to one repository.
- `glim_github_get` / `POST /api/v1/github/get` — from $0.002 per call. A github.com URL or `owner/repo` shorthand returns repo + README, files, PRs, issues, discussions and more — inferred from the ref.

## Example

**request**

```
curl -X POST https://glim.sh/api/v1/github/search \
  -H "x-api-key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"model context protocol stars:>500"}'
```

**response (real call, trimmed to 1 of 105 results)**

```
{
  "kind": "repos",
  "results": [
    {
      "full_name": "modelcontextprotocol/servers",
      "description": "Model Context Protocol Servers",
      "language": "TypeScript",
      "stargazers_count": 87103,
      "forks_count": 10980,
      "homepage": "https://modelcontextprotocol.io",
      "pushed_at": "2026-06-07T22:29:30Z",
      "owner": { "login": "modelcontextprotocol", "type": "Organization" }
    }
  ],
  "total_count": 105,
  "has_more": true
}
```

## Good to know

- Repo search works best with minimal distinctive keywords (the project name), narrowed by qualifiers like `language:`, `stars:>N`, `topic:` — not natural-language phrases.
- Code search takes a literal pattern that appears in files (e.g. `useState(`), narrowed with `language:` / `path:` qualifiers or the `repo` param.
- Public repos only — glim reads GitHub unauthenticated, so private data is never reachable.

## Prompts to try

- "Find the most active MCP server implementations in Rust and compare their approaches."
- "Open issues mentioning streaming bugs in owner/repo — summarize the known workarounds."

---

## All docs pages


**Get started**

- [Introduction](https://glim.sh/docs.md?page=introduction)
- [MCP quickstart](https://glim.sh/docs.md?page=quickstart)
- [REST API quickstart](https://glim.sh/docs.md?page=quickstart-rest)
- [JavaScript quickstart](https://glim.sh/docs.md?page=quickstart-js)
- [Python quickstart](https://glim.sh/docs.md?page=quickstart-python)
- [Payments & auth](https://glim.sh/docs.md?page=payments)

**Tools**

- [Twitter / X](https://glim.sh/docs.md?page=twitter)
- [Reddit](https://glim.sh/docs.md?page=reddit)
- [Web](https://glim.sh/docs.md?page=web)
- [GitHub](https://glim.sh/docs.md?page=github)
- [Amazon](https://glim.sh/docs.md?page=amazon)
- [YouTube](https://glim.sh/docs.md?page=youtube)
- [Telegram](https://glim.sh/docs.md?page=telegram)

**Reference**

- [Changelog](https://glim.sh/docs.md?page=changelog)
- [API reference](https://glim.sh/docs-openapi)
- [OpenAPI spec](https://glim.sh/openapi.json)
