# GitHub User profile API (github.user)

- Canonical page: https://everyinfra.com/en/github-api/user
- Endpoint: POST /api/v1/social with {"platform": "github", "action": "user", "params": {...}}
- Price: $0.000958 per call ($0.96 per 1,000 requests); failed and empty results are not charged
- Returns: single object
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=github&action=user

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| username | not declared | yes | not declared | A GitHub username such as `torvalds`, or the profile link; organizations work too. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| username | Username (@handle). |
| id | GitHub's numeric ID, as a string. |
| display_name | Display name; can differ from username. |
| bio | Profile bio written by the account; may contain line breaks and emoji. |
| company | Company written on the profile; absent when empty. |
| location | Location description passed through as is; the format varies by platform. |
| website | External website entered by the account or business. |
| twitter_username | X (Twitter) username written on the profile; absent when empty. |
| follower_count | Followers. null means not disclosed, not 0. |
| following_count | Accounts followed. null means not disclosed, not 0. |
| public_repo_count | Public repositories. |
| public_gist_count | Public gists. |
| avatar_url | Avatar image link. Some platforms return sized CDN links that can expire. |
| url | Link to the record on the platform. |
| account_type | Account type: User, Bot or Organization. |
| created_at | Creation time, same format as posted_at. |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "github",
  "action": "user",
  "params": {
    "username": "torvalds"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "github",
        "action": "user",
        "params": {
            "username": "torvalds",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "github",
  "action": "user",
  "results": {
    "username": …,
    "id": …,
    "display_name": …,
    "bio": …,
    "company": …,
    "location": …,
    "website": …,
    "twitter_username": …,
    "follower_count": …,
    "following_count": …,
    "public_repo_count": …,
    "public_gist_count": …,
    "avatar_url": …,
    "url": …,
    "account_type": …,
    "created_at": …,
    "platform": …
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=github
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
