> ## Documentation Index
> Fetch the complete documentation index at: https://docs.konbiniapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get user posts

> Returns public posts from a user's profile as visible to not logged in users. This feed is not guaranteed to be chronological and is often a ranked public selection. Pages may overlap: a pinned post is repeated on every page, so deduplicate by id when paging.

## What it does

Returns public posts from a user's profile as visible to not logged in users. This feed is not guaranteed to be chronological and is often a ranked public selection. Pages may overlap: a pinned post is repeated on every page, so deduplicate by id when paging.

## Tool details

| Field | Value |
| - | - |
| Tool name | `x_get_user_posts` |
| Platform | X |
| REST endpoint | `GET /v1/x/users/{username}/posts` |
| Result type | Collection tool |

## Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `username` | `string` | Yes | X username (with or without @ symbol) |
| `cursor` | `string` | No | Pagination cursor |
| `projection_preset` | `string` | No | Defaults to `minimal`. Allowed values: `full`, `minimal`, `identity`, `engagement`, `content`. |
| `data_fields` | `string[]` | No | Adds top-level keys from `data` on top of the selected `projection_preset`. |
| `item_fields` | `string[]` | No | Adds keys from `data.orderedItems[]` on top of the selected `projection_preset`. |

## Example

```json theme={null}
{
  "name": "x_get_user_posts",
  "arguments": {
    "username": "khaby.lame",
    "projection_preset": "minimal",
    "data_fields": [
      "orderedItems",
      "nextCursor",
      "cursor",
      "itemCount"
    ],
    "item_fields": [
      "entityId",
      "published",
      "content",
      "url",
      "viewCount"
    ]
  }
}
```

## Available data fields

* `@context`
* `type`
* `partOf`
* `totalItems`
* `cursor`
* `nextCursor`
* `next`
* `itemCount`
* `orderedItems`

## Available item fields

* `type`
* `id`
* `url`
* `entityId`
* `content`
* `published`
* `likeCount`
* `replyCount`
* `viewCount`
* `repostCount`
* `quoteCount`
* `saveCount`
* `contentFormat`
* `isEdited`
* `attributedTo`
* `inReplyTo`
* `quote`
* `image`
* `attachment`
* `tag`

## Response notes

Successful calls return a JSON object with a top-level `data` field and, when
available, `metadata.creditsUsed` and `metadata.creditsRemaining`. See
[response format](/getting-started/response-format),
[pagination](/getting-started/pagination), and [credits](/getting-started/credits).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.