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

# Get Posts (Feed)

> Fetches a list of posts with optional filtering by cursor, size, query, and user IDs.

<Note>Use query string or #hashtag to show posts that contains query term.</Note>
<Note>For user's profile feed, use the userId to show posts by the users.</Note>
<Note>For a specific list feed, use tagged accounts' userId to show posts by the tagged accounts. Eg news feed, use news accounts' userIds</Note>

<Card title="Users By Tag API" icon="tag" href="/user/get-users-tags">
  Get userIds of tagged users
</Card>


## OpenAPI

````yaml GET /posts
openapi: 3.0.1
info:
  title: Posts API
  version: 1.0.0
  description: API for fetching posts
servers:
  - url: https://our-secret-api-url.com
security: []
paths:
  /posts:
    get:
      summary: Get Posts
      description: >-
        Fetches a list of posts with optional filtering by cursor, size, query,
        and user IDs.
      parameters:
        - name: cursor
          in: query
          description: Cursor for pagination (last ID of the page)
          required: false
          schema:
            type: integer
        - name: size
          in: query
          description: Number of posts to fetch
          required: false
          schema:
            type: integer
            default: 10
        - name: query
          in: query
          description: Search query to filter posts
          required: false
          schema:
            type: string
        - name: userIds
          in: query
          description: Comma-separated list of user IDs to filter posts
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A list of posts
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Post'
                  totalPages:
                    type: integer
        '500':
          description: Failed to fetch posts
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
components:
  schemas:
    Post:
      type: object
      properties:
        id:
          type: integer
        userId:
          type: integer
        content:
          type: string
          nullable: true
        snowflakeId:
          type: string
        user:
          $ref: '#/components/schemas/FeedUser'
        reposts:
          type: array
          items:
            type: integer
        repostsCount:
          type: integer
        repliesCount:
          type: integer
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        type:
          type: string
          enum:
            - post
            - quote
            - reply
            - repost
        originalId:
          type: integer
          nullable: true
        parentId:
          type: integer
          nullable: true
        hashtags:
          type: array
          items:
            type: string
        media:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              updatedAt:
                type: string
                format: date-time
              postId:
                type: integer
              mediaUrl:
                type: string
              mimeType:
                type: string
        isSuspended:
          type: boolean
          nullable: true
          description: A boolean if the post/reply is suspended or not
        links:
          type: array
          items:
            type: object
            properties:
              url:
                type: string
                description: URL of the OpenGraph link
              title:
                type: string
                nullable: true
                description: Title of the OpenGraph link
              description:
                type: string
                nullable: true
                description: Description of the OpenGraph link
              image:
                type: string
                nullable: true
                description: Image URL of the OpenGraph link
            required:
              - url
          description: List of OpenGraph details associated with the media
        parent:
          $ref: '#/components/schemas/Post'
      required:
        - snowflakeId
        - user
        - id
        - userId
        - createdAt
        - updatedAt
        - type
    FeedUser:
      type: object
      properties:
        id:
          type: integer
        username:
          type: string
        name:
          type: string
        image:
          type: string
        bio:
          type: string
          nullable: true
        verifiedAt:
          type: string
          format: date-time
          description: Last timestamp of user verified by admin
          nullable: true
        role:
          type: string
          enum:
            - user
            - admin
          nullable: true
        tags:
          type: array
          items:
            type: string
          nullable: true
      required:
        - id
        - username

````