# Search GitHub Discussions API

> Search GitHub Discussions across all repositories (GraphQL). Returns title, body, author, repository, category, comment count and the node id you need to reply, with cursor pagination. Requires your own GitHub token - GitHub's GraphQL API does not serve anonymous callers.

Category: [Developer Tools APIs](https://upapi.io/apis/developer-tools) · Last updated 2026-09-07

## How to call it

- Endpoint: `POST https://api.upapi.io/github-search-discussions.get`, key in the `X-Api-Key` header, JSON body.
- Cost: 1 weighted unit per call.
- Timeout: 30 seconds.
- Cache: identical requests are served from cache for 120 seconds, unbilled.
- Try it without writing code: https://app.upapi.io/try/github-search-discussions.get

```bash
curl -X POST https://api.upapi.io/github-search-discussions.get \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{ "q": "\"note taking\" is:open", "first": 30, "token": "example" }'
```

## Request parameters

- `q` (string, required) — GitHub search syntax for discussions, e.g. '"note taking" is:open'
- `after` (string) — pageInfo.endCursor from the previous page
- `first` (integer) — Rows to return (max 100)
- `token` (string, required) — GitHub token - GraphQL does not accept anonymous calls
- `proxyUrl` (string) — Optional exit to send from (direct otherwise)

## Response fields

- `items` (array, required)
- `items[].id` (string, required) — GraphQL node id (the value addDiscussionComment takes)
- `items[].url` (string, required)
- `items[].body` (string, required)
- `items[].title` (string, required)
- `items[].author` (string, required)
- `items[].number` (integer, required)
- `items[].category` (string, required)
- `items[].comments` (integer, required)
- `items[].createdAt` (string, required)
- `items[].repository` (string, required)
- `endCursor` (string, required)
- `fetchedAt` (string, required)
- `rateLimit` (object, required) — The rate-limit headers GitHub returned on THIS response, surfaced so the caller
can pace itself instead of the operation sleeping on its behalf.
- `rateLimit.limit` (integer, required) — X-RateLimit-Limit: requests allowed per window
- `rateLimit.resetAt` (string, required) — X-RateLimit-Reset as an ISO-8601 UTC timestamp
- `rateLimit.resource` (string, required) — X-RateLimit-Resource: which bucket (core, search, graphql, ...)
- `rateLimit.remaining` (integer, required) — X-RateLimit-Remaining: requests left
- `rateLimit.resetEpoch` (integer, required) — X-RateLimit-Reset as unix seconds
- `totalCount` (integer, required)
- `hasNextPage` (boolean, required)

## Example request and response

The example response is generated from the published output schema: it shows the shape and field names, not values from a recorded call.

```json
{
  "q": "\"note taking\" is:open",
  "first": 30,
  "token": "example"
}
```

```json
{
  "items": [
    {
      "id": "example",
      "url": "https://github.com",
      "body": "example",
      "title": "Alan Turing",
      "author": "example",
      "number": 1,
      "category": "example",
      "comments": 1,
      "createdAt": "example",
      "repository": "example"
    }
  ],
  "endCursor": "example",
  "fetchedAt": "example",
  "rateLimit": {
    "limit": 5,
    "resetAt": "example",
    "resource": "example",
    "remaining": 1,
    "resetEpoch": 1
  },
  "totalCount": 1,
  "hasNextPage": false
}
```

## Frequently asked questions

### How much does the Search GitHub Discussions API cost per call?

Each call spends 1 weighted unit of your plan's monthly quota. Full pricing is at https://upapi.io/pricing.

### How do I authenticate to the Search GitHub Discussions API?

Send your key in the X-Api-Key header. A free guest key is available without creating an account.

### Are Search GitHub Discussions API responses cached?

Yes — identical requests are served from cache for 120 seconds, and a cache hit is not billed.

## More Developer Tools APIs

- [Search GitHub Issues](https://upapi.io/apis/developer-tools/github-search-issues)
- [Search GitHub Repositories](https://upapi.io/apis/developer-tools/github-search-repos)
- [Search GitHub Users](https://upapi.io/apis/developer-tools/github-search-users)
- [Get GitHub User Commit Emails](https://upapi.io/apis/developer-tools/github-user-emails)
- [List GitHub Issue Comments](https://upapi.io/apis/developer-tools/github-issue-comments)
- [List GitHub Repository Contributors](https://upapi.io/apis/developer-tools/github-repo-contributors)
- [List GitHub Repository Issues](https://upapi.io/apis/developer-tools/github-repo-issues)
- [Star or Unstar a GitHub Repository](https://upapi.io/apis/developer-tools/github-repo-star)
