# DeviantArt 作品画廊 API (deviantart.gallery)

- Canonical page: [https://everyinfra.com/deviantart-api/gallery](https://everyinfra.com/deviantart-api/gallery?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "deviantart", "action": "gallery", "params": {...}}
- Price: $0.001389 per call ($1.39 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 30, max 100 per call
- Mode: sync; add "mode": "async" for slow tasks

DeviantArt 作品画廊按创作者的 `username` 列出他画廊里的作品，每行带标题、说明、分类、大图和缩略图、发布时间和作者信息，作者公开了邮箱时还附邮箱。它回答「这位创作者都发过什么」，适合在约稿或授权前翻一遍一个人的公开作品集，或者长期跟踪几位创作者的更新。

`username` 只填用户名本身，不带 @、域名或路径。`category` 可以只看某一类，例如这位创作者同时画同人和做设计，传 `fan_art` 只留同人作品；不传或传 `any_category` 就是全部。默认 30 条，单次最多 100 条，作品多的创作者先按类别拆开读。

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| username | not declared | yes | not declared | DeviantArt 创作者用户名，不带 @、域名或路径；返回该创作者的画廊作品。 |
| category | enum: any_category / designs / digital_art / fan_art / film_animation / literature / photography / traditional_art | no | not declared | gallery 的作品类别：any_category 不限、digital_art 数字艺术、traditional_art 传统艺术、photography 摄影、fan_art 同人、literature 文学、film_animation 影视动画、designs 设计。 |
| limit | integer (1–100) | no | 30 | 这次调用最多返回的条数，整数，1–100；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| url | 该记录在原平台上的可访问链接。 |
| title | 标题。平台无标题概念时（如纯文本帖）为 null。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| category | 分类名称，取值为原平台的分类体系，未做跨平台归一。 |
| image_url | 图片链接。多图能力可能返回 image_urls 数组。 |
| thumbnail_url | 缩略图链接，分辨率低于 image_url。 |
| author_username | 作者用户名（@handle），通常可用于拼 URL。 |
| author_name | 作者昵称（显示名）。 |
| author_url | 作者在原平台的主页链接。 |
| author_avatar_url | 作者头像。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| author_emails | 作者公开的联系邮箱列表，原文返回；没有时没有这个字段。 |
| author_email_domains | 上面那些邮箱的域名列表。 |
| 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": "deviantart",
  "action": "gallery",
  "params": {
    "username": "pixelbypixel"
  }
}'
```

```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": "deviantart",
        "action": "gallery",
        "params": {
            "username": "pixelbypixel",
        },
    },
    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 7. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "deviantart",
  "action": "gallery",
  "results": [
    {
      "id": "78857324",
      "url": "https://www.deviantart.com/pixelbypixel/art/NoE-78857324",
      "title": "NoE",
      "text": "a bliss of innocence...",
      "image_url": "https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/af35a3c0-bf41-499d-8ce4-0d2c31e4a857/d1ay6p8-c8af927c-364b-4927-a77f-f6feca4afec0.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOjdlMGQxODg5ODIyNjQzNzNhNWYwZDQxNWVhMGQyNmUwIiwiaXNzIjoidXJuOmFwcDo3ZTBkM…",
      "thumbnail_url": "https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/af35a3c0-bf41-499d-8ce4-0d2c31e4a857/d1ay6p8-c8af927c-364b-4927-a77f-f6feca4afec0.jpg/v1/fit/w_300,h_500,q_70,strp/noe_by_pixelbypixel_d1ay6p8-300w.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOjdlMGQ…",
      "author_username": "pixelbypixel",
      "author_name": "pixelbypixel",
      "author_url": "https://www.deviantart.com/•••",
      "author_avatar_url": "https://a.deviantart.net/•••",
      "posted_at": "2008-03-02T01:28:04.000Z",
      "platform": "deviantart"
    },
    {
      "id": "73167735",
      "url": "https://www.deviantart.com/pixelbypixel/art/Aiskah-Yanugabac-73167735",
      "title": "Aiskah Yanugabac",
      "text": "another one of my vexel works in Adobe Pshop...",
      "image_url": "https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/af35a3c0-bf41-499d-8ce4-0d2c31e4a857/d17k8l3-9c33e5d2-67ab-4f51-b1d6-ff481aeffee7.jpg/v1/fill/w_600,h_450,q_75,strp/aiskah_yanugabac_by_pixelbypixel_d17k8l3-fullview.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiO…",
      "thumbnail_url": "https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/af35a3c0-bf41-499d-8ce4-0d2c31e4a857/d17k8l3-9c33e5d2-67ab-4f51-b1d6-ff481aeffee7.jpg/v1/fit/w_300,h_450,q_70,strp/aiskah_yanugabac_by_pixelbypixel_d17k8l3-300w.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm…",
      "author_username": "pixelbypixel",
      "author_name": "pixelbypixel",
      "author_url": "https://www.deviantart.com/•••",
      "author_avatar_url": "https://a.deviantart.net/•••",
      "posted_at": "2007-12-28T15:25:37.000Z",
      "platform": "deviantart"
    }
  ],
  "count": 7,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### 画廊里能看到付费或仅关注者可见的作品吗？

不能保证。DeviantArt 说明，作品移进 Premium Gallery 或 Watchers-Only Gallery 后访问权限会变，公开的作品列表不等于能拿到全部付费或仅关注者可见的作品。所以画廊返回的条数只代表公开部分，比较创作者的产量或统计作品总数时，要把这层限制写进结论。

### 怎么联系画廊里的创作者？

先看 `author_emails`：创作者公开了联系邮箱时，这里是原文邮箱列表；没公开时整个字段都不出现，代码里要先判断字段在不在，别当成空列表去读。没有邮箱的，用 `author_url` 打开主页，按站内方式联系。

### 作品画廊和关键词搜索怎么分工？

搜索按主题找作品，作者来自四面八方；画廊按人找作品，只看一位创作者。常见做法是先用关键词搜索按主题挑出风格合适的作品，记下每行的 `author_username`，它是作者的用户名，填进这里的 `username` 时不带 @，再来画廊翻这个人的完整作品集。浏览作品集用分辨率较低的 `thumbnail_url`，选定作品再取 `image_url` 大图。

## Also

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