# GitHub User Repositories

Returns the public repositories owned by a GitHub account, with description, topics, fork and archived flags, star, fork and watcher counts, primary language, default branch, and creation and push dates. Pagination is explicit: pages are never fetched for you, so one request performs exactly one upstream lookup. The optional rate_limit block reports the anonymous REST budget as observed on this request, read from the live upstream response headers; its values change per request and per egress, so the numbers in the example are illustrative and must not be cached or treated as a quota.

- **Documentation:** [https://scrappa.co/docs/github-api/github_user_repositories](https://scrappa.co/docs/github-api/github_user_repositories)
- **API group:** GitHub API
- **Endpoint:** `GET https://scrappa.co/api/github/user/repositories`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `username` | string | Yes | GitHub account login, e.g. torvalds. |
| `page` | integer | No | Page number. Pagination is explicit and per request; pages are never fetched for you. |
| `per_page` | integer | No | Rows per page, 1-100. GitHub caps most list routes at 100. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/github/user/repositories?username=torvalds&per_page=10"
```

## Example response

```json
{
    "search_parameters": {
        "engine": "github_user_repositories",
        "username": "torvalds",
        "per_page": 10
    },
    "repositories": [
        {
            "name": "linux",
            "full_name": "torvalds/linux",
            "stargazers_count": 190000,
            "language": "C",
            "fork": false
        }
    ],
    "result_count": 1,
    "rate_limit": {
        "limit": 60,
        "remaining": 57,
        "used": 3,
        "reset": 1791138568
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter failed validation. |
| 404 | Not Found | GitHub has no public resource at that address. For a repository this also covers a private or renamed repository, which is indistinguishable anonymously. |
| 503 | GitHub Upstream Unavailable | The upstream service is temporarily unavailable. Please retry shortly. |
| 500 | Parser Drift | GitHub returned a response shape this parser does not recognise. The incident has been reported; retrying will return the same result. |
| 406 | Not Acceptable Upstream | GitHub has no JSON representation for this route, or rejected the request headers. Never charged. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
