# GitHub Repository contributors API (github.contributors)

- Canonical page: https://everyinfra.com/en/github-api/contributors
- Endpoint: POST /api/v1/social with {"platform": "github", "action": "contributors", "params": {...}}
- Price: $0.000958 per call ($0.96 per 1,000 requests); failed and empty results are not charged
- Returns: list, default 30, max 100 per call
- 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=contributors

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | A GitHub repository link such as `https://github.com/facebook/react` or just `facebook/react`; for `issue_comments`, the full link of an issue or pull request such as `https://github.com/openai/whisper/pull/1838`. Other formats are rejected before any charge. |
| limit | integer (1–100) | no | 30 | The most rows to return in this call, an integer from 1 to 100. The default applies when you leave it out, and a call can return fewer rows. Larger values return 422 before any charge. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| rank | Position in this response from 1: by commit count for contributors, in Trending order for trending. |
| username | Username (@handle). |
| id | GitHub's numeric ID, as a string. |
| url | Link to the record on the platform. |
| avatar_url | Avatar image link. Some platforms return sized CDN links that can expire. |
| contribution_count | Commits to this repository (contributors). |
| account_type | Account type: User, Bot or Organization. |
| 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": "contributors",
  "params": {
    "url": "https://github.com/facebook/react"
  }
}'
```

```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": "contributors",
        "params": {
            "url": "https://github.com/facebook/react",
        },
    },
    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": "contributors",
  "results": [
    {
      "rank": …,
      "username": …,
      "id": …,
      "url": …,
      "avatar_url": …,
      "contribution_count": …,
      "account_type": …,
      "platform": …
    }
  ],
  "count": …,
  "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
