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

# X Post API

> Text, engagement metrics, and author for one post.



## OpenAPI

````yaml openapi.json GET /v1/x/posts
openapi: 3.0.0
info:
  title: ScoutLayer API
  version: 1.0.0
  description: Competitor data. One API.
servers:
  - url: https://api.scoutlayer.io
    description: Production
security:
  - ApiKeyAuth: []
  - BearerAuth: []
paths:
  /v1/x/posts:
    get:
      tags:
        - x
        - posts
      summary: Get a single X post by URL
      description: Text, engagement metrics, and author for one post.
      parameters:
        - schema:
            type: string
            format: uri
            example: https://x.com/shopify/status/1234567890123456789
          required: true
          name: url
          in: query
      responses:
        '200':
          description: Get a single X post by URL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/XPost'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: This endpoint is declared but not yet implemented — never charged
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: The orchestrator failed or was unreachable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    XPost:
      type: object
      properties:
        postId:
          type: string
        text:
          type: string
        url:
          type: string
        publishedAt:
          type: string
        language:
          type: string
        conversationId:
          type: string
        isQuote:
          type: boolean
        media:
          type: array
          items:
            $ref: '#/components/schemas/MediaItem'
        links:
          type: array
          items:
            type: string
        hashtags:
          type: array
          items:
            type: string
        metrics:
          type: object
          properties:
            views:
              type: integer
              nullable: true
            likes:
              type: integer
            comments:
              type: integer
            shares:
              type: integer
            quotes:
              type: integer
            bookmarks:
              type: integer
          required:
            - views
            - likes
            - comments
            - shares
            - quotes
            - bookmarks
        author:
          type: object
          properties:
            handle:
              type: string
            name:
              type: string
            avatarUrl:
              type: string
            isVerified:
              type: boolean
          required:
            - handle
            - name
            - avatarUrl
            - isVerified
      required:
        - postId
        - text
        - url
        - publishedAt
        - language
        - conversationId
        - isQuote
        - media
        - links
        - hashtags
        - metrics
        - author
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: NOT_FOUND
            message:
              type: string
          required:
            - code
            - message
      required:
        - error
    MediaItem:
      type: object
      properties:
        type:
          type: string
          enum:
            - image
            - video
            - carousel
            - text
            - audio
            - unknown
        url:
          type: string
          description: CDN URL — may be time-limited by the source platform
        thumbnailUrl:
          type: string
          nullable: true
      required:
        - type
        - url
        - thumbnailUrl
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key passed as the X-API-Key request header. Recommended for
        server-to-server calls.
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key (or OAuth token) passed as a Bearer token in the Authorization
        header.

````