# GitHub Issue and PR Search API

> Search issues and pull requests across GitHub with GitHub's own search syntax (repo:, is:pr, is:issue, author:, label:, opened:...), with each result's author, state, labels, counts and body. Use it to find who opens issues and pull requests on a repository.

Source: https://www.sandbase.ai/apis/github/search-issues
API reference: https://www.sandbase.ai/apis/github/search-issues#api

## Facts

- Provider: GitHub
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/github/search-issues`
- Price: From $0.0024 per call
- Capabilities: api, github, developer, code
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/github/search-issues` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `query` | string | yes |  |
| `page` | integer | no |  |
| `sort` | string | no | comments, created, updated, reactions |
| `limit` | integer | no |  |
| `order` | string | no | desc, asc |

## FAQ

### How do I use the GitHub Issue and PR Search API?

Send a POST request to https://api.sandbase.ai/v1/api/github/search-issues with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

### How much does the GitHub Issue and PR Search API cost?

From $0.0024 per call, billed from your SandBase balance. You are only charged for calls you make; there is no subscription.

### What parameters does the GitHub Issue and PR Search API accept?

Required: query (string). Optional: page (integer), sort (one of comments, created, updated, reactions), limit (integer) and order (one of desc, asc). The Parameters table and the Playground on this page list every field.

### What does the GitHub Issue and PR Search API return?

A JSON response returned in the same HTTP request (synchronous).

### Do I need a GitHub developer account or API key?

No. GitHub Issue and PR Search runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for GitHub API access separately.

## README

### GitHub Issue and PR Search API

Search issues and pull requests across GitHub with GitHub's own search syntax (repo:, is:pr, is:issue, author:, label:, opened:...), with each result's author, state, labels, counts and body. Use it to find who opens issues and pull requests on a repository.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/run" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "github/search-issues", "query": "repo:openai/whisper is:pr"}'
```

The result is returned in `outputs[0].data`. Lookups that find nothing fail with a not-found error.

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `query` | string | Yes | GitHub issue search query with any of GitHub's qualifiers, e.g. "repo:openai/whisper is:pr", "is:issue label:bug author:octocat", "repo:ggml-org/llama.cpp is:pr is:merged opened:>2026-01-01". |
| `limit` | integer | No | Rows per page, 1-100 (GitHub's own page-size limit). Keep it the same while walking pages, because it sets the page size. Default `100`. |
| `order` | string | No | Sort direction when sort is set. Defaults to desc. One of: `desc`, `asc`. |
| `page` | integer | No | 1-based page of results. Request page + 1 while hasMore is true. Default `1`. |
| `sort` | string | No | Sort by number of comments, creation date, last update, or reactions. Omit for best match. One of: `comments`, `created`, `updated`, `reactions`. |

#### Pricing

Billed at the actual cost of each call, about $0.0024 per request. A call can cost more when the first data source fails and another one answers. Failed calls and lookups that find nothing are not charged.
