# /gab/accounts/posts

`POST /api/gab/accounts/posts`

Price: 5 credits

Get Gab Account Posts

## How to use it

Read a Gab account's posts from a handle, profile URL, or numeric id. Two different corpora sit behind one path and the choice matters: the default feed carries only posts from the last seven days, while only_media=true reaches back through the account's whole archive, years deep, restricted to posts with an image or video. So an empty default result means nothing was posted in the last week, not that the account is empty, and it is normal for a busy account with a six-figure post count to return a couple of dozen rows. pinned=true returns the handful of posts pinned to the profile instead. Replies cannot be filtered out; no repost was observed in any sampled timeline.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `account` (string, required) — Gab handle, profile URL, or numeric account id (examples: "a", "https://gab.com/a", "31"; minLength: 1)
- `count` (integer, required) — Max result count (examples: 20; min: 1; max: 400)
- `only_media` (boolean) — Only posts that carry a media attachment (default: false)
- `pinned` (boolean) — Only the posts the account pinned to its profile (default: false)

## Response

### 200 — Successful Response

- `@type` (string) (default: "GabStatus")
- `id` (string, required)
- `created_at` (string, nullable)
- `edited_at` (string, nullable)
- `text` (string, nullable)
- `spoiler_text` (string, nullable)
- `url` (string, nullable)
- `language` (string, nullable)
- `visibility` (string, nullable)
- `background` (string, nullable)
- `is_sensitive` (boolean) (default: false)
- `is_reply` (boolean) (default: false)
- `has_quote` (boolean) (default: false)
- `is_pinnable_by_group` (boolean) (default: false)
- `conversation_id` (string, nullable)
- `in_reply_to_id` (string, nullable)
- `in_reply_to_account_id` (string, nullable)
- `reply_count` (integer, nullable)
- `direct_reply_count` (integer, nullable)
- `reblog_count` (integer, nullable)
- `favourite_count` (integer, nullable)
- `quote_count` (integer, nullable)
- `reaction_counts` (object) (default: {})
  - `*` (integer)
- `account` (object, nullable)
  - `@type` (string) (default: "GabAccount")
  - `id` (string, required)
  - `alias` (string, nullable)
  - `display_name` (string, nullable)
  - `bio` (string, nullable)
  - `url` (string, nullable)
  - `image` (string, nullable)
  - `cover` (string, nullable)
  - `created_at` (string, nullable)
  - `follower_count` (integer, nullable)
  - `following_count` (integer, nullable)
  - `status_count` (integer, nullable)
  - `country_code` (string, nullable)
  - `is_verified` (boolean) (default: false)
  - `is_pro` (boolean) (default: false)
  - `is_donor` (boolean) (default: false)
  - `is_investor` (boolean) (default: false)
  - `is_parody` (boolean) (default: false)
  - `is_spam` (boolean) (default: false)
  - `is_locked` (boolean) (default: false)
  - `is_discoverable` (boolean) (default: false)
  - `has_pro_life_badge` (boolean) (default: false)
  - `fields` (array) (default: [])
    - `@type` (string) (default: "GabField")
    - `name` (string, nullable)
    - `value` (string, nullable)
    - `verified_at` (string, nullable)
  - `emojis` (array) (default: [])
    - `@type` (string) (default: "GabEmoji")
    - `shortcode` (string, nullable)
    - `url` (string, nullable)
    - `static_url` (string, nullable)
    - `is_visible_in_picker` (boolean) (default: false)
- `quote` (object, nullable) (see schema GabStatus)
- `reblog` (object, nullable) (see schema GabStatus)
- `group` (object, nullable)
  - `@type` (string) (default: "GabGroup")
  - `id` (string, required)
  - `name` (string, nullable)
  - `alias` (string, nullable)
  - `url` (string, nullable)
  - `description` (string, nullable)
  - `description_html` (string, nullable)
  - `image` (string, nullable)
  - `category` (string, nullable)
  - `category_id` (string, nullable)
  - `member_count` (integer, nullable)
  - `created_at` (string, nullable)
  - `is_private` (boolean) (default: false)
  - `is_verified` (boolean) (default: false)
  - `is_archived` (boolean) (default: false)
  - `is_paused` (boolean) (default: false)
  - `is_moderated` (boolean) (default: false)
  - `is_visible` (boolean) (default: false)
  - `has_password` (boolean) (default: false)
  - `is_quote_allowed` (boolean) (default: false)
  - `is_members_visible` (boolean) (default: false)
  - `is_media_visible` (boolean) (default: false)
  - `is_links_visible` (boolean) (default: false)
  - `is_admins_visible` (boolean) (default: false)
  - `moderators` (array) (default: [])
    - `@type` (string) (default: "GabGroupModerator")
    - `account_id` (string, nullable)
    - `role` (string, nullable)
- `card` (object, nullable)
  - `@type` (string) (default: "GabPreviewCard")
  - `id` (string, nullable)
  - `url` (string, nullable)
  - `link_title` (string, nullable)
  - `description` (string, nullable)
  - `card_type` (string, nullable)
  - `image` (string, nullable)
  - `html` (string, nullable)
  - `provider_name` (string, nullable)
  - `provider_url` (string, nullable)
  - `width` (integer, nullable)
  - `height` (integer, nullable)
  - `updated_at` (string, nullable)
- `mood` (object, nullable)
  - `@type` (string) (default: "GabMood")
  - `id` (string, nullable)
  - `name` (string, nullable)
- `media_attachments` (array) (default: [])
  - `@type` (string) (default: "GabMediaAttachment")
  - `id` (string, nullable)
  - `media_type` (string, nullable)
  - `url` (string, nullable)
  - `preview_url` (string, nullable)
  - `video_url` (string, nullable)
  - `description` (string, nullable)
  - `blurhash` (string, nullable)
  - `file_name` (string, nullable)
  - `file_content_type` (string, nullable)
  - `width` (integer, nullable)
  - `height` (integer, nullable)
  - `duration` (number, nullable)
- `mentions` (array) (default: [])
  - `@type` (string) (default: "GabMention")
  - `id` (string, nullable)
  - `alias` (string, nullable)
  - `url` (string, nullable)
- `tags` (array) (default: [])
  - `@type` (string) (default: "GabTag")
  - `name` (string, nullable)
  - `url` (string, nullable)
- `emojis` (array) (default: [])
  - `@type` (string) (default: "GabEmoji")
  - `shortcode` (string, nullable)
  - `url` (string, nullable)
  - `static_url` (string, nullable)
  - `is_visible_in_picker` (boolean) (default: false)

## 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

Account not found. Verify the handle, profile URL, or numeric id.

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.

