# Substack Details API (substack.profile)

- Canonical page: [https://everyinfra.com/en/substack-api/profile](https://everyinfra.com/en/substack-api/profile?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "substack", "action": "profile", "params": {...}}
- Price: $0.001389 per call ($1.39 per 1,000 requests); failed calls 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=substack&action=profile

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| username | not declared | yes | not declared | Specifies the target creator handle for profile or notes, accepted as a plain handle (with optional @ prefix) or a full substack.com/@user link. The notes action fetches short creator updates rather than long-form publication posts. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| user_id | User's unique ID on the platform. |
| username | Username (@handle). |
| display_name | Display name; can differ from username. |
| bio | Profile bio written by the account; may contain line breaks and emoji. |
| avatar_url | Avatar image link. Some platforms return sized CDN links that can expire. |
| twitter_username | platform-native meaning |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |
| publications | platform-native meaning |

## 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": "substack",
  "action": "profile",
  "params": {
    "username": "astralcodexten"
  }
}'
```

```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": "substack",
        "action": "profile",
        "params": {
            "username": "astralcodexten",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-09-26T08:56:04Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "substack",
  "action": "profile",
  "results": {
    "user_id": "•••",
    "username": "astralcodexten",
    "display_name": "•••",
    "avatar_url": "https://substackcdn.com/•••",
    "platform": "substack",
    "publications": [
      {
        "name": "Astral Codex Ten",
        "handle": "astralcodexten",
        "url": "https://astralcodexten.substack.com",
        "role": "admin"
      },
      {
        "name": "AI Futures Project",
        "handle": "•••",
        "url": "https://aifutures1.substack.com",
        "role": "admin"
      }
    ]
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

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