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

# List all posts

> Returns posts with rich filtering and cursor pagination. Supports filtering by status, platform, account_ids, date range, and text search.



## OpenAPI

````yaml /api-reference/openapi.json get /posts
openapi: 3.0.0
info:
  description: >-
    Unified social media inbox API. Read and respond to comments, DMs, reviews,
    and mentions across Instagram, Facebook, Threads, Google Business Profile,
    TikTok, LinkedIn, and YouTube through a single REST API. X/Twitter and
    Trustpilot coming soon.
  title: SocialAPI.AI
  contact:
    name: SocialAPI.AI Support
    email: support@social-api.ai
  license:
    name: MIT
  version: '1.0'
servers:
  - url: https://api.social-api.ai/v1
security: []
paths:
  /posts:
    get:
      tags:
        - Posts
      summary: List all posts
      description: >-
        Returns posts with rich filtering and cursor pagination. Supports
        filtering by status, platform, account_ids, date range, and text search.
      parameters:
        - description: Comma-separated connected account IDs
          name: account_ids
          in: query
          schema:
            type: string
        - description: Filter to posts whose targets belong to this brand
          name: brand_id
          in: query
          schema:
            type: string
        - description: >-
            Filter by status (draft, scheduled, publishing, published, partial,
            failed, cancelled)
          name: status
          in: query
          schema:
            type: string
        - description: Filter by platform (e.g. instagram, facebook)
          name: platform
          in: query
          schema:
            type: string
        - description: Filter by specific page ID (for multi-page accounts like Facebook)
          name: page_id
          in: query
          schema:
            type: string
        - description: Start of date range (RFC3339)
          name: from
          in: query
          schema:
            type: string
        - description: End of date range (RFC3339)
          name: to
          in: query
          schema:
            type: string
        - description: Text search (case-insensitive)
          name: search
          in: query
          schema:
            type: string
        - description: >-
            Sort order: scheduled_asc (default), scheduled_desc, created_asc,
            created_desc
          name: sort
          in: query
          schema:
            type: string
        - description: Pagination cursor from previous response
          name: cursor
          in: query
          schema:
            type: string
        - description: Max results (default 25, max 100)
          name: limit
          in: query
          schema:
            type: integer
        - description: Include hidden posts (default false)
          name: hidden
          in: query
          schema:
            type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.PostsListResponse'
        '400':
          description: Invalid query parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.ErrorResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    api_endpoints.PostsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/api_endpoints.PostResponse'
        pagination:
          $ref: '#/components/schemas/api_endpoints.PaginationInfo'
    api_endpoints.ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/api_endpoints.ErrorBody'
    api_endpoints.PostResponse:
      type: object
      properties:
        created_at:
          type: string
          example: '2026-03-14T09:00:00Z'
        hidden:
          type: boolean
          example: false
        id:
          type: string
          example: p_01HZ9X3Q4R5M6N7P8V2K0W1J
        media:
          type: array
          items:
            $ref: '#/components/schemas/api_endpoints.MediaInput'
        media_ids:
          description: 'Deprecated: use media.'
          type: array
          items:
            type: string
        published_at:
          type: string
          example: '2026-04-01T10:00:05Z'
        retry_count:
          type: integer
          example: 0
        scheduled_at:
          type: string
          example: '2026-04-01T10:00:00Z'
        status:
          type: string
          enum:
            - draft
            - scheduled
            - publishing
            - published
            - partial
            - failed
            - cancelled
          example: published
        targets:
          type: array
          items:
            $ref: '#/components/schemas/api_endpoints.PostTargetResponse'
        text:
          type: string
          example: Check out our new product launch!
        title:
          type: string
          example: Exciting News
        updated_at:
          type: string
          example: '2026-03-14T09:00:00Z'
        visibility:
          type: string
          enum:
            - public
            - private
            - connections_only
            - logged_in
          example: public
    api_endpoints.PaginationInfo:
      type: object
      properties:
        has_more:
          type: boolean
        limit:
          type: integer
          example: 25
        next_cursor:
          type: string
    api_endpoints.ErrorBody:
      type: object
      properties:
        code:
          type: string
          example: resource.not_found
        message:
          type: string
          example: Account not found
        meta:
          type: object
          additionalProperties: {}
    api_endpoints.MediaInput:
      type: object
      properties:
        source:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        source_type:
          type: string
          enum:
            - url
            - media_id
            - platform_attachment_id
          example: media_id
        type:
          type: string
          enum:
            - image
            - video
            - audio
            - file
          example: image
    api_endpoints.PostTargetResponse:
      type: object
      properties:
        account_id:
          type: string
          example: acc_01HZ9X3Q4R5M6N7P8V2K0W1J
        board_id:
          type: string
          example: '8828'
        error:
          $ref: '#/components/schemas/api_endpoints.PostTargetErrorResponse'
        first_comment:
          type: string
        media:
          type: array
          items:
            $ref: '#/components/schemas/api_endpoints.MediaInput'
        media_ids:
          description: 'Deprecated: use media.'
          type: array
          items:
            type: string
        media_type:
          type: string
          enum:
            - feed
            - reel
            - stories
            - carousel
          example: reel
        metadata:
          type: object
          additionalProperties: {}
        metrics:
          $ref: '#/components/schemas/api_endpoints.PostTargetMetricsResponse'
        metrics_synced_at:
          type: string
          example: '2026-04-01T12:00:00Z'
        page_id:
          type: string
          example: sapi_page_01HZ9X3Q4R5M6N7P8V2K0W1J
        permalink:
          type: string
          example: https://www.instagram.com/p/ABC123/
        platform:
          type: string
          enum:
            - instagram
            - facebook
            - threads
            - tiktok
            - linkedin
            - google
            - zalo
          example: instagram
        platform_post_id:
          type: string
          example: '17895695668004550'
        published_at:
          type: string
          example: '2026-04-01T10:00:05Z'
        scheduled_at:
          type: string
          example: '2026-04-01T10:00:00Z'
        status:
          type: string
          enum:
            - pending
            - publishing
            - published
            - failed
          example: published
        text:
          type: string
        title:
          type: string
        visibility:
          type: string
          example: public
    api_endpoints.PostTargetErrorResponse:
      type: object
      properties:
        category:
          type: string
          enum:
            - validation
            - auth
            - rate_limit
            - platform
            - system
          example: validation
        caused_by:
          type: string
          enum:
            - user
            - platform
            - system
          example: user
        code:
          type: string
          example: platform.tiktok.media_required
        message:
          type: string
          example: Video posts require at least one media URL
    api_endpoints.PostTargetMetricsResponse:
      type: object
      properties:
        comments:
          type: integer
          example: 23
        extra:
          type: object
          additionalProperties: {}
        likes:
          type: integer
          example: 142
        saves:
          type: integer
          example: 31
        shares:
          type: integer
          example: 8
  securitySchemes:
    BearerAuth:
      description: >-
        Prefix your API key with "Bearer ". Example: `Authorization: Bearer
        sapi_key_...`
      type: apiKey
      name: Authorization
      in: header

````