# Snapchat 用户内容 API (snapchat.user_posts)

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| username | not declared | yes | not declared | 公开创作者账号短名，可写 @用户名，或 snapchat.com/add/用户名、snapchat.com/@用户名 链接。profile 取公开资料，stories 取当前公开故事，user_posts 取 Spotlight 短视频；不读取私聊或仅好友可见故事。 |
| limit | integer (1–) | no | not declared | 这次调用最多返回的条数，整数，至少为 1；不传按默认值，实际返回可能少于这个数。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| url | 该记录在原平台上的可访问链接。 |
| title | 标题。平台无标题概念时（如纯文本帖）为 null。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| summary | 摘要。 |
| caption | 内容文字说明。 |
| media_url | 媒体链接。 |
| thumbnail_url | 缩略图链接，分辨率低于 image_url。 |
| duration_ms | 时长，**单位毫秒**（除以 1000 才是秒）。 |
| width | 媒体宽度，像素。 |
| height | 媒体高度，像素。 |
| view_count | 浏览/播放数。null 表示不公开，不等于 0。 |
| share_count | 分享/转发数。null 表示不公开，不等于 0。 |
| comment_count | 评论数。null 表示不公开，不等于 0。 |
| boost_count | 推广加成数。 |
| recommend_count | 被推荐次数。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| username | 用户名（@handle）。 |
| author_name | 作者昵称（显示名）。 |
| author_url | 作者在原平台的主页链接。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 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": "snapchat",
  "action": "user_posts",
  "params": {
    "username": "fcbarcelona"
  }
}'
```

```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": "snapchat",
        "action": "user_posts",
        "params": {
            "username": "fcbarcelona",
        },
    },
    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; the list keeps the first 2 of 16. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "snapchat",
  "action": "user_posts",
  "results": [
    {
      "id": "W7_EDlXWTBiXAEEniNoMPwAAYcWdyZmptcHNlAaDTaexlAaDTaenOAAAAAQ",
      "url": "https://www.snapchat.com/spotlight/W7_EDlXWTBiXAEEniNoMPwAAYcWdyZmptcHNlAaDTaexlAaDTaenOAAAAAQ",
      "text": "😮‍💨 #fcbarcelona",
      "media_url": "https://bolt-gcdn.sc-cdn.net/bp/AJ0xy8jDjv8p8o8vwPOfd.27.IRZXSOY?mo=GmMaCTIBUUgCUC5gAVCiAVoQU3BvdGxpZ2h0U2hhcmluZ6IBPAgbEisKKQj0g3AgATCcBDjAB0ABShQKD-0BdIgBiwGCAWqmAY4BfBD0A1DIM2gCIgsSACoHSVJaWFNPWZADyDM%3D&uc=46",
      "thumbnail_url": "https://bolt-gcdn.sc-cdn.net/bp/AJ0xy8jDjv8p8o8vwPOfd.256.IRZXSOY?mo=GkYaCTIBUUgCUC5gAVCgAVoQRGZMYXJnZVRodW1ibmFpbKIBEAiAAiILEgAqB0lSWlhTT1miARAImgoiCxIAKgdJUlpYU09Z&uc=46",
      "duration_ms": 6600,
      "width": 540,
      "height": 960,
      "view_count": 34713,
      "share_count": 8,
      "comment_count": 28,
      "boost_count": 4884,
      "recommend_count": 274,
      "posted_at": "2026-09-24T12:35:28.846000+00:00",
      "username": "fcbarcelona",
      "author_name": "•••",
      "author_url": "https://www.snapchat.com/@fcbarcelona",
      "platform": "snapchat"
    },
    {
      "id": "W7_EDlXWTBiXAEEniNoMPwAAYcXJmYWl2dGl3AaDPbE16AaDPbEdQAAAAAQ",
      "url": "https://www.snapchat.com/spotlight/W7_EDlXWTBiXAEEniNoMPwAAYcXJmYWl2dGl3AaDPbE16AaDPbEdQAAAAAQ",
      "text": "Flick 🤝 Belletti #fcbarcelona",
      "media_url": "https://bolt-gcdn.sc-cdn.net/bp/hY7Zyp5zxih25D1Ai5TjK.27.IRZXSOY?mo=GmIaCTIBUUgCUC5gAVCiAVoQU3BvdGxpZ2h0U2hhcmluZ6IBOwgbEioKKAiy5MgBIAEwnAQ4wAdAAUoSCg3BAYUBbosBc3NhnQFuEPQDUKpqaAIiCxIAKgdJUlpYU09ZkAOqag%3D%3D&uc=46",
      "thumbnail_url": "https://bolt-gcdn.sc-cdn.net/bp/hY7Zyp5zxih25D1Ai5TjK.256.IRZXSOY?mo=GkYaCTIBUUgCUC5gAVCgAVoQRGZMYXJnZVRodW1ibmFpbKIBEAiAAiILEgAqB0lSWlhTT1miARAImgoiCxIAKgdJUlpYU09Z&uc=46",
      "duration_ms": 13610,
      "width": 540,
      "height": 960,
      "view_count": 27499,
      "share_count": 10,
      "comment_count": 48,
      "boost_count": 4768,
      "recommend_count": 300,
      "posted_at": "2026-09-23T17:59:34.992000+00:00",
      "username": "fcbarcelona",
      "author_name": "•••",
      "author_url": "https://www.snapchat.com/@fcbarcelona",
      "platform": "snapchat"
    }
  ],
  "count": 16,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

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