# GitHub



GitHub's public records — one repository's vitals, one user's profile.



## GitHub Repository

One repository's public record — stars, forks, language, license, and when it last moved.

- Method: `GET`
- Path: `/v1/dev/github/repo`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `owner` | string | required | The user or organisation. |
| `repo` | string | required | The repository name. |
| `max_age` | integer (seconds) | optional | Ask for data no older than this. Clamped to the product's own floor, so it can narrow the window but never force a refresh on every call. |

**Example request**

```bash
curl https://api.diraz.ae/v1/dev/github/repo \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "full_name": "vercel/next.js",
    "description": "The React Framework.",
    "html_url": "https://github.com/vercel/next.js",
    "stars": 131000,
    "forks": 28400,
    "open_issues": 3200,
    "language": "JavaScript",
    "default_branch": "canary",
    "license": "MIT",
    "created_at": "2016-10-05T20:43:26Z",
    "pushed_at": "2026-08-21T12:03:00Z",
    "archived": false
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-21T14:05:00.000Z",
    "age_seconds": 42,
    "next_update_at": "2026-08-21T15:05:00.000Z"
  }
}
```

## GitHub User

One GitHub user's public profile — bio, company, and the follower counts.

- Method: `GET`
- Path: `/v1/dev/github/user`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `username` | string | required | The login. |
| `max_age` | integer (seconds) | optional | Ask for data no older than this. Clamped to the product's own floor, so it can narrow the window but never force a refresh on every call. |

**Example request**

```bash
curl https://api.diraz.ae/v1/dev/github/user \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "login": "torvalds",
    "name": "Linus Torvalds",
    "company": null,
    "blog": "",
    "location": "Portland, OR",
    "bio": null,
    "public_repos": 8,
    "followers": 240000,
    "following": 0,
    "html_url": "https://github.com/torvalds",
    "created_at": "2008-01-01T01:01:01Z"
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-21T14:05:00.000Z",
    "age_seconds": 42,
    "next_update_at": "2026-08-21T15:05:00.000Z"
  }
}
```

## GitHub Trending

The repos the world is starring today — daily, weekly, or monthly, optionally per language.

- Method: `GET`
- Path: `/v1/dev/trending`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `window` | string | optional | `daily`, `weekly`, or `monthly`. |
| `language` | string | optional | Filter to a language, e.g. `typescript`. |
| `max_age` | integer (seconds) | optional | Ask for data no older than this. Clamped to the product's own floor, so it can narrow the window but never force a refresh on every call. |

**Example request**

```bash
curl https://api.diraz.ae/v1/dev/trending \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "window": "daily",
    "language": null,
    "repos": [
      {
        "fullName": "ollama/ollama",
        "description": "Get up and running with large language models locally.",
        "language": "Go",
        "stars": 105000,
        "starsInWindow": 412,
        "url": "https://github.com/ollama/ollama"
      }
    ]
  },
  "meta": { "request_id": "req_7Q2fK4mZ", "as_of": "2026-08-22T04:05:00.000Z", "age_seconds": 42, "next_update_at": "2026-08-22T05:05:00.000Z" }
}
```