# /zenn/articles

`POST /api/zenn/articles`

Price: 5 credits

Get Zenn Article

## How to use it

Get a Zenn article by slug or URL. Returns the rendered body and its plain-text form, the table of contents, topics, emoji, like/comment/bookmark counts, the full threaded comment tree, the author profile with the contest prizes they won, the publication that hosts the article, the GitHub repository the article is synced from, and the contest it was entered into. Some articles carry an English translation: available_locales lists which languages exist and locale picks one, and asking for a language the article does not have returns the Japanese original.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `article` (string, required) — Article slug or article URL (examples: "gh-stack-introduction", "https://zenn.dev/ubie_dev/articles/gh-stack-introduction")
- `locale` (string) — Language of the article body (default: "ja"; one of: "ja", "en")

## Response

### 200 — Successful Response

- `@type` (string) (default: "ZennArticle")
- `id` (integer, required)
- `alias` (string, required)
- `article_title` (string, nullable)
- `article_type` (string, nullable) (one of: "tech", "idea")
- `emoji` (string, nullable)
- `url` (string, nullable)
- `image` (string, nullable)
- `text` (string, nullable)
- `text_html` (string, nullable)
- `published_at` (integer, nullable)
- `body_updated_at` (integer, nullable)
- `source_repo_updated_at` (integer, nullable)
- `like_count` (integer, nullable)
- `comment_count` (integer, nullable)
- `positive_comment_count` (integer, nullable)
- `bookmark_count` (integer, nullable)
- `letter_count` (integer, nullable)
- `draft_reveal_scope` (string, nullable)
- `available_locales` (array) (default: [])
- `principal_type` (string, nullable) (one of: "User", "Publication")
- `is_pinned` (boolean) (default: false)
- `is_toc_enabled` (boolean) (default: false)
- `can_send_badge` (boolean) (default: false)
- `github_url` (string, nullable)
- `github_commits_url` (string, nullable)
- `github_dev_url` (string, nullable)
- `github_repository` (object, nullable)
  - `@type` (string) (default: "ZennGithubRepository")
  - `id` (integer, required)
  - `name` (string, nullable)
  - `full_name` (string, nullable)
  - `branch_name` (string, nullable)
  - `url` (string, nullable)
  - `is_public` (boolean) (default: false)
  - `is_link_shown` (boolean) (default: false)
- `contest` (object, nullable)
  - `@type` (string) (default: "ZennContest")
  - `id` (integer, required)
  - `alias` (string, required)
  - `contest_title` (string, nullable)
  - `url` (string, nullable)
  - `started_at` (integer, nullable)
  - `ended_at` (integer, nullable)
  - `article_published_from` (integer, nullable)
- `article_list` (object, nullable)
  - `@type` (string) (default: "ZennArticleList")
  - `alias` (string, required)
  - `name` (string, nullable)
  - `description` (string, nullable)
  - `emoji` (string, nullable)
  - `image` (string, nullable)
  - `article_count` (integer, nullable)
  - `article_order_type` (string, nullable)
  - `priority` (integer, nullable)
  - `is_published` (boolean) (default: false)
  - `created_at` (integer, nullable)
  - `updated_at` (integer, nullable)
- `topics` (array) (default: [])
  - `@type` (string) (default: "ZennTopic")
  - `id` (integer, required)
  - `alias` (string, required)
  - `name` (string, nullable)
  - `image` (string, nullable)
  - `url` (string, nullable)
  - `tagging_count` (integer, nullable)
- `toc` (array) (default: [])
  - `@type` (string) (default: "ZennTocEntry")
  - `text` (string, required)
  - `id` (string, nullable)
  - `level` (integer, nullable)
  - `children` (array) (default: [])
- `badges` (array) (default: [])
  - `@type` (string) (default: "ZennBadge")
  - `badge_type` (string, required)
  - `rank` (string, nullable)
  - `created_at` (integer, nullable)
- `comments` (array) (default: [])
  - `@type` (string) (default: "ZennComment")
  - `id` (integer, required)
  - `alias` (string, nullable)
  - `text` (string, nullable)
  - `text_html` (string, nullable)
  - `created_at` (integer, nullable)
  - `updated_at` (integer, nullable)
  - `like_count` (integer, nullable)
  - `is_pinned` (boolean) (default: false)
  - `hidden_reason` (string, nullable)
  - `user` (object, nullable)
    - `@type` (string) (default: "ZennUserRef")
    - `id` (integer, required)
    - `alias` (string, required)
    - `name` (string, nullable)
    - `image` (string, nullable)
    - `url` (string, nullable)
  - `children` (array) (default: [])
- `commented_users` (array) (default: [])
  - `@type` (string) (default: "ZennUserRef")
  - `id` (integer, required)
  - `alias` (string, required)
  - `name` (string, nullable)
  - `image` (string, nullable)
  - `url` (string, nullable)
- `user` (object, nullable)
  - `@type` (string) (default: "ZennUserSummary")
  - `id` (integer, required)
  - `alias` (string, required)
  - `name` (string, nullable)
  - `bio` (string, nullable)
  - `bio_html` (string, nullable)
  - `image` (string, nullable)
  - `url` (string, nullable)
  - `github_url` (string, nullable)
  - `twitter_url` (string, nullable)
  - `hatena_id` (string, nullable)
  - `website_url` (string, nullable)
  - `total_liked_count` (integer, nullable)
  - `is_support_open` (boolean) (default: false)
  - `analytics_id` (string, nullable)
  - `seller_name` (string, nullable)
  - `seller_contact` (string, nullable)
  - `awards` (array) (default: [])
    - `@type` (string) (default: "ZennAward")
    - `event_alias` (string, required)
    - `event_title` (string, nullable)
    - `event_type` (string, nullable)
    - `prize_name` (string, nullable)
    - `prize_rank` (string, nullable)
    - `article` (object, nullable)
      - `@type` (string) (default: "ZennArticleRef")
      - `id` (integer, required)
      - `alias` (string, required)
      - `article_title` (string, nullable)
      - `article_type` (object, nullable) (see schema ZennArticleType)
      - `emoji` (string, nullable)
      - `url` (string, nullable)
      - `published_at` (integer, nullable)
      - `body_updated_at` (integer, nullable)
      - `source_repo_updated_at` (integer, nullable)
      - `like_count` (integer, nullable)
      - `comment_count` (integer, nullable)
      - `bookmark_count` (integer, nullable)
      - `letter_count` (integer, nullable)
      - `is_pinned` (boolean) (default: false)
      - `principal_type` (object, nullable) (see schema ZennPrincipalType)
      - `user` (object, nullable) (see schema ZennUserRef)
      - `publication` (object, nullable) (see schema ZennPublicationRef)
- `publication` (object, nullable)
  - `@type` (string) (default: "ZennPublication")
  - `id` (integer, required)
  - `alias` (string, required)
  - `name` (string, nullable)
  - `description` (string, nullable)
  - `description_html` (string, nullable)
  - `image` (string, nullable)
  - `cover` (string, nullable)
  - `url` (string, nullable)
  - `is_pro` (boolean) (default: false)
  - `has_avatar` (boolean) (default: false)
  - `follower_count` (integer, nullable)
  - `award_count` (integer, nullable)
  - `sponsor_count` (integer, nullable)
  - `github_url` (string, nullable)
  - `twitter_url` (string, nullable)
  - `analytics_id` (string, nullable)
  - `is_article_comment_open` (boolean) (default: false)
  - `is_support_open` (boolean) (default: false)
  - `has_recent_article_lists` (boolean) (default: false)
  - `fixed_sentences_html` (string, nullable)
  - `navigations` (array) (default: [])
    - `@type` (string) (default: "ZennNavigation")
    - `id` (integer, required)
    - `label` (string, nullable)
    - `url` (string, nullable)
    - `position` (integer, nullable)
  - `banners` (array) (default: [])
    - `@type` (string) (default: "ZennBanner")
    - `id` (integer, required)
    - `banner_title` (string, nullable)
    - `image` (string, nullable)
    - `url` (string, nullable)
    - `is_published` (boolean) (default: false)
  - `article_lists` (array) (default: [])
    - `@type` (string) (default: "ZennArticleList")
    - `alias` (string, required)
    - `name` (string, nullable)
    - `description` (string, nullable)
    - `emoji` (string, nullable)
    - `image` (string, nullable)
    - `article_count` (integer, nullable)
    - `article_order_type` (string, nullable)
    - `priority` (integer, nullable)
    - `is_published` (boolean) (default: false)
    - `created_at` (integer, nullable)
    - `updated_at` (integer, nullable)

## Errors

### 422 — Validation Error

The request body did not validate

What to do: Check the fields against this schema. A URN with the wrong prefix is the most common cause.

- `detail` (array)
  - `loc` (array, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (object)

### 408

The request ran past its time limit

What to do: Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.

### 412

Article not found. Verify the article slug or URL.

What to do: Retrying will not help: either the entity does not exist, or the input points at a different one.

### 429

Too many requests: a rate limit or a usage window is exhausted

What to do: When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.

### 500

Something broke on our side

What to do: Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.

### 529

Rate limit reached, or the endpoint is overloaded

What to do: Wait at least 30 seconds, then retry.

## Response envelope

Success: Array of objects (may be empty if no results)

Error: Error may coexist with partial results if it occurs mid-execution. Check X-Error header and status code.

Every response carries these headers:

- `X-Error` — Error message text (present only on error)
- `X-Request-ID` — Unique request identifier
- `X-Execution-Time` — Execution time in seconds
- `X-Result-Count` — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.
- `X-Total-Available-Results` — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.
- `X-Warning` — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.
- `X-Retry-After` — Seconds to wait before retrying. Present only on 429.

