GITHUB API

Pull Requests

Retrieve pull requests from GitHub with a single API request.

GET/api/data/v1/github/user/pull-requests
1credit base cost

Request parameters

Up to 1 credit

GitHub username/handle of the user you want pull requests for

Only return pull requests created on or after this date. Use YYYY-MM-DD.

Only return pull requests created on or before this date. Use YYYY-MM-DD.

Cursor from the previous response. Defaults to 1.

Try in the console

Live requests use your prepaid balance. Cached responses cost zero where supported.

curl --request GET \
  --url 'https://fetchgoblin.com/api/data/v1/github/user/pull-requests?handle=torvalds' \
  --header 'x-api-key: YOUR_FETCHGOBLIN_API_KEY'

Response

Example
{
  "success": true,
  "credits_charged": 1,
  "pull_requests": [
    {
      "title": "Garmin: Report correct local time offset",
      "repo": "subsurface/libdc",
      "state": "closed",
      "created_at": "2024-12-26T20:13:25Z",
      "url": "https://github.com/subsurface/libdc/pull/69"
    }
  ],
  "cursor": 2,
  "has_more": false
}
Example data from the API specification. Run a request to retrieve current data.

Response shape

This schema describes the documented data shape. Some platform fields may be absent or null. The response also includes your FetchGoblin request ID and current credit balance.

View JSON Schema +
{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "credits_remaining": {
      "type": "integer"
    },
    "credits_charged": {
      "type": "integer"
    },
    "pull_requests": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "repo": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      }
    },
    "cursor": {
      "type": "integer"
    },
    "has_more": {
      "type": "boolean"
    }
  }
}