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

# Replay a keyword's webhook events

> The items this keyword caught, each in **exactly the body its webhook delivers**, newest first, across every Source and every search of the keyword, including what its searches caught before they last changed. This is the raw entity (`listing`, `tweet`, `post`, `previousPrice` and the rest), where `GET /v1/keywords/{id}/results` is the same items projected as mentions; it is what to poll when you have no webhook endpoint, and it carries Vinted's `listing.price_changed` and `listing.delisted`. `since` is an ISO timestamp and defaults to the last 24 hours; `source` narrows to one Source. Free: does not charge credits.



## OpenAPI

````yaml /openapi.json get /v1/keywords/{id}/events
openapi: 3.1.0
info:
  title: Nephia API
  description: >-
    The brand-monitoring API. Create a **keyword** and it polls the live Sources
    (X, Reddit, Youtube, TikTok, Bluesky, Hacker News, Mastodon, Lemmy, GitHub,
    Product Hunt, Stack Overflow, RSS, AI answers and Vinted) on an interval,
    keeps what matches, reads each mention for sentiment and intent, sorts it
    into your buckets and answers your own agent step over it. Read the result
    back as **mentions** (`GET /v1/mentions` across the whole Account, or per
    keyword), or have it pushed to you as signed webhook events and delivery
    channels. A search can carry several terms at once, OR'd into one upstream
    request at one tick's cost. Authenticate with an API key on your Account.
    Monitoring is sold as a subscription (keywords, terms, freshness and AI)
    with credits as the meter underneath; credit packs are overflow and never
    change a limit. Reading your own mentions is free; the semantic search mode
    and the AI passes are what meter. Request quota is per Account (all API keys
    share one bucket), by Plan: Free 60/min, Solo 350/min, Growth 700/min, Pro
    1200/min.
  version: 1.0.0
servers:
  - url: https://api.nephia.cc
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Account
    description: Account balance
  - name: Mentions
    description: Everything your keywords caught, across every Source
  - name: Keywords
    description: >-
      What you monitor. A keyword carries its terms, its Sources and its
      settings. Read, create, edit and pause them here.
  - name: Explore
    description: >-
      One question asked of the Sources once, priced first, without creating a
      keyword
  - name: AI
    description: Group, classify, agent and summarise passes over items you name
  - name: Vinted analytics
    description: Observed price history and per-day market statistics
paths:
  /v1/keywords/{id}/events:
    get:
      tags:
        - Keywords
      summary: Replay a keyword's webhook events
      description: >-
        The items this keyword caught, each in **exactly the body its webhook
        delivers**, newest first, across every Source and every search of the
        keyword, including what its searches caught before they last changed.
        This is the raw entity (`listing`, `tweet`, `post`, `previousPrice` and
        the rest), where `GET /v1/keywords/{id}/results` is the same items
        projected as mentions; it is what to poll when you have no webhook
        endpoint, and it carries Vinted's `listing.price_changed` and
        `listing.delisted`. `since` is an ISO timestamp and defaults to the last
        24 hours; `source` narrows to one Source. Free: does not charge credits.
      operationId: getV1KeywordsByIdEvents
      parameters:
        - in: path
          name: id
          schema:
            type: string
            format: uuid
          required: true
        - in: query
          name: since
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: integer
            minimum: 1
            maximum: 500
        - in: query
          name: source
          schema:
            type: string
            enum:
              - x
              - reddit
              - youtube
              - tiktok
              - bluesky
              - hackernews
              - mastodon
              - lemmy
              - github
              - producthunt
              - stackoverflow
              - rss
              - ai_answers
              - vinted
      responses:
        '200':
          description: Events
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeywordEventsResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                required:
                  - error
        '404':
          description: Keyword not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                required:
                  - error
        '429':
          description: >-
            Request quota exceeded. Retry after the `Retry-After` header
            (seconds). Response includes `RateLimit-*` headers (IETF draft-7).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                required:
                  - error
              example:
                error: Rate limit exceeded
                code: TOO_MANY_REQUESTS
components:
  schemas:
    KeywordEventsResponse:
      type: object
      properties:
        events:
          type: array
          items:
            $ref: '#/components/schemas/KeywordEvent'
      required:
        - events
    KeywordEvent:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - listing.created
            - listing.delisted
            - listing.price_changed
            - tweet.created
            - post.created
            - reddit_comment.created
            - video.created
            - bluesky_post.created
            - hn_item.created
            - article.created
            - answer.created
            - answer.changed
            - term.cited
            - term.uncited
            - status.created
            - lemmy_post.created
            - github_item.created
            - launch.created
            - stack_item.created
        keywordId:
          type:
            - string
            - 'null'
        source:
          type:
            - string
            - 'null'
          enum:
            - x
            - reddit
            - youtube
            - tiktok
            - bluesky
            - hackernews
            - mastodon
            - lemmy
            - github
            - producthunt
            - stackoverflow
            - rss
            - ai_answers
            - vinted
            - null
        listing:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            source:
              type: string
              const: vinted
            market:
              type: string
            title:
              type: string
            price:
              type: number
            currency:
              type: string
            brand:
              type:
                - string
                - 'null'
            size:
              type:
                - string
                - 'null'
            status:
              type:
                - string
                - 'null'
            color1:
              type:
                - string
                - 'null'
            color2:
              type:
                - string
                - 'null'
            description:
              type:
                - string
                - 'null'
            photos:
              type: array
              items:
                type: object
                properties:
                  url:
                    type: string
                  width:
                    type:
                      - number
                      - 'null'
                  height:
                    type:
                      - number
                      - 'null'
                required:
                  - url
                  - width
                  - height
            url:
              type: string
            createdAt:
              type:
                - string
                - 'null'
            updatedAt:
              type:
                - string
                - 'null'
            isReserved:
              type: boolean
            favouriteCount:
              type:
                - number
                - 'null'
            viewCount:
              type:
                - number
                - 'null'
            seller:
              type:
                - object
                - 'null'
              properties:
                id:
                  type: string
                login:
                  type: string
                feedbackScore:
                  type:
                    - number
                    - 'null'
                feedbackCount:
                  type:
                    - number
                    - 'null'
                photoUrl:
                  type:
                    - string
                    - 'null'
                business:
                  type:
                    - boolean
                    - 'null'
                countryCode:
                  type:
                    - string
                    - 'null'
                city:
                  type:
                    - string
                    - 'null'
                country:
                  type:
                    - string
                    - 'null'
                positiveFeedbackCount:
                  type:
                    - number
                    - 'null'
                neutralFeedbackCount:
                  type:
                    - number
                    - 'null'
                negativeFeedbackCount:
                  type:
                    - number
                    - 'null'
                itemCount:
                  type:
                    - number
                    - 'null'
                totalItemsCount:
                  type:
                    - number
                    - 'null'
                followersCount:
                  type:
                    - number
                    - 'null'
                followingCount:
                  type:
                    - number
                    - 'null'
                isOnline:
                  type:
                    - boolean
                    - 'null'
                isOnHoliday:
                  type:
                    - boolean
                    - 'null'
                lastLoggedOnAt:
                  type:
                    - string
                    - 'null'
                profileUrl:
                  type:
                    - string
                    - 'null'
                locale:
                  type:
                    - string
                    - 'null'
              required:
                - id
                - login
                - feedbackScore
                - feedbackCount
                - photoUrl
                - business
                - countryCode
                - city
                - country
                - positiveFeedbackCount
                - neutralFeedbackCount
                - negativeFeedbackCount
                - itemCount
                - totalItemsCount
                - followersCount
                - followingCount
                - isOnline
                - isOnHoliday
                - lastLoggedOnAt
                - profileUrl
                - locale
            sourceMetadata:
              type: object
              additionalProperties: {}
          required:
            - id
            - source
            - market
            - title
            - price
            - currency
            - brand
            - size
            - status
            - color1
            - color2
            - description
            - photos
            - url
            - createdAt
            - updatedAt
            - isReserved
            - favouriteCount
            - viewCount
            - seller
            - sourceMetadata
        tweet:
          oneOf:
            - $ref: '#/components/schemas/XTweet'
            - type: 'null'
        post:
          type:
            - object
            - 'null'
          properties:
            kind:
              type: string
              enum:
                - post
                - comment
            parentPostId:
              type: string
            id:
              type: string
            fullname:
              type: string
            title:
              type: string
            selftext:
              type: string
            selftextHtml:
              type:
                - string
                - 'null'
            url:
              type: string
            permalink:
              type: string
            domain:
              type: string
            author:
              type: object
              properties:
                id:
                  type:
                    - string
                    - 'null'
                username:
                  type: string
                fullname:
                  type:
                    - string
                    - 'null'
              required:
                - id
                - username
            authorFlairText:
              type:
                - string
                - 'null'
            subreddit:
              type: string
            subredditPrefixed:
              type: string
            subredditId:
              type:
                - string
                - 'null'
            subredditSubscribers:
              type:
                - number
                - 'null'
            score:
              type: number
            ups:
              type: number
            upvoteRatio:
              type:
                - number
                - 'null'
            numComments:
              type: number
            numCrossposts:
              type:
                - number
                - 'null'
            gilded:
              type:
                - number
                - 'null'
            totalAwards:
              type:
                - number
                - 'null'
            awards:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  count:
                    type: number
                  iconUrl:
                    type:
                      - string
                      - 'null'
                required:
                  - id
                  - name
                  - count
                  - iconUrl
            createdAt:
              type: string
            editedAt:
              type:
                - string
                - 'null'
            isNsfw:
              type: boolean
            isSelf:
              type: boolean
            isSpoiler:
              type: boolean
            isLocked:
              type: boolean
            isStickied:
              type: boolean
            isArchived:
              type: boolean
            isOriginalContent:
              type: boolean
            isVideo:
              type: boolean
            isGallery:
              type: boolean
            distinguished:
              type:
                - string
                - 'null'
            removedByCategory:
              type:
                - string
                - 'null'
            linkFlairText:
              type:
                - string
                - 'null'
            linkFlairBackgroundColor:
              type:
                - string
                - 'null'
            linkFlairTextColor:
              type:
                - string
                - 'null'
            linkFlairTemplateId:
              type:
                - string
                - 'null'
            thumbnail:
              type:
                - string
                - 'null'
            previewImages:
              type: array
              items:
                type: object
                properties:
                  url:
                    type: string
                  width:
                    type: number
                  height:
                    type: number
                required:
                  - url
                  - width
                  - height
            media:
              type: 'null'
            galleryData:
              type: 'null'
          required:
            - id
            - fullname
            - title
            - selftext
            - selftextHtml
            - url
            - permalink
            - domain
            - author
            - authorFlairText
            - subreddit
            - subredditPrefixed
            - subredditId
            - subredditSubscribers
            - score
            - ups
            - upvoteRatio
            - numComments
            - numCrossposts
            - gilded
            - totalAwards
            - awards
            - createdAt
            - editedAt
            - isNsfw
            - isSelf
            - isSpoiler
            - isLocked
            - isStickied
            - isArchived
            - isOriginalContent
            - isVideo
            - isGallery
            - distinguished
            - removedByCategory
            - linkFlairText
            - linkFlairBackgroundColor
            - linkFlairTextColor
            - linkFlairTemplateId
            - thumbnail
            - previewImages
        video:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            title:
              type: string
            description:
              type: string
            url:
              type: string
            channel:
              type: object
              properties:
                id:
                  type: string
                handle:
                  type:
                    - string
                    - 'null'
                title:
                  type: string
              required:
                - id
                - handle
                - title
            publishedAt:
              type:
                - string
                - 'null'
            viewCount:
              type:
                - number
                - 'null'
            likeCount:
              type:
                - number
                - 'null'
            commentCount:
              type:
                - number
                - 'null'
            durationSeconds:
              type:
                - number
                - 'null'
            thumbnailUrl:
              type:
                - string
                - 'null'
            isShort:
              type: boolean
            isLive:
              type: boolean
          required:
            - id
            - title
            - description
            - url
            - channel
            - publishedAt
            - viewCount
            - likeCount
            - commentCount
            - durationSeconds
            - thumbnailUrl
            - isShort
            - isLive
        blueskyPost:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            uri:
              type: string
            cid:
              type: string
            url:
              type: string
            text:
              type: string
            createdAt:
              type:
                - string
                - 'null'
            langs:
              type: array
              items:
                type: string
            author:
              type: object
              properties:
                did:
                  type: string
                handle:
                  type: string
                displayName:
                  type:
                    - string
                    - 'null'
                avatarUrl:
                  type:
                    - string
                    - 'null'
              required:
                - did
                - handle
                - displayName
                - avatarUrl
            metrics:
              type: object
              properties:
                likes:
                  type:
                    - number
                    - 'null'
                reposts:
                  type:
                    - number
                    - 'null'
                replies:
                  type:
                    - number
                    - 'null'
                quotes:
                  type:
                    - number
                    - 'null'
              required:
                - likes
                - reposts
                - replies
                - quotes
            embed:
              type: object
              properties:
                kind:
                  type:
                    - string
                    - 'null'
                  enum:
                    - images
                    - external
                    - record
                    - video
                    - null
                images:
                  type: array
                  items:
                    type: object
                    properties:
                      url:
                        type: string
                      thumbUrl:
                        type:
                          - string
                          - 'null'
                      alt:
                        type:
                          - string
                          - 'null'
                    required:
                      - url
                      - thumbUrl
                      - alt
                external:
                  type:
                    - object
                    - 'null'
                  properties:
                    uri:
                      type: string
                    title:
                      type: string
                    description:
                      type: string
                    thumbUrl:
                      type:
                        - string
                        - 'null'
                  required:
                    - uri
                    - title
                    - description
                    - thumbUrl
              required:
                - kind
                - images
                - external
            replyTo:
              type:
                - string
                - 'null'
            labels:
              type: array
              items:
                type: string
          required:
            - id
            - uri
            - cid
            - url
            - text
            - createdAt
            - langs
            - author
            - metrics
            - embed
            - replyTo
            - labels
        hnItem:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            type:
              type: string
              enum:
                - story
                - comment
            title:
              type:
                - string
                - 'null'
            url:
              type:
                - string
                - 'null'
            text:
              type:
                - string
                - 'null'
            author:
              type:
                - string
                - 'null'
            points:
              type:
                - number
                - 'null'
            numComments:
              type:
                - number
                - 'null'
            createdAt:
              type:
                - string
                - 'null'
            storyId:
              type:
                - string
                - 'null'
            parentId:
              type:
                - string
                - 'null'
            hnUrl:
              type: string
          required:
            - id
            - type
            - title
            - url
            - text
            - author
            - points
            - numComments
            - createdAt
            - storyId
            - parentId
            - hnUrl
        article:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            url:
              type: string
            title:
              type: string
            summary:
              type: string
            publishedAt:
              type:
                - string
                - 'null'
            updatedAt:
              type:
                - string
                - 'null'
            author:
              type:
                - string
                - 'null'
            feed:
              type: object
              properties:
                url:
                  type: string
                title:
                  type:
                    - string
                    - 'null'
              required:
                - url
                - title
            source:
              type:
                - string
                - 'null'
            imageUrl:
              type:
                - string
                - 'null'
            categories:
              type: array
              items:
                type: string
          required:
            - id
            - url
            - title
            - summary
            - publishedAt
            - updatedAt
            - author
            - feed
            - source
            - imageUrl
            - categories
        aiAnswer:
          oneOf:
            - $ref: '#/components/schemas/AiAnswer'
            - type: 'null'
        status:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            uri:
              type: string
            url:
              type: string
            content:
              type: string
            spoilerText:
              type: string
            createdAt:
              type:
                - string
                - 'null'
            language:
              type:
                - string
                - 'null'
            instance:
              type: string
            author:
              type: object
              properties:
                acct:
                  type: string
                displayName:
                  type:
                    - string
                    - 'null'
                url:
                  type:
                    - string
                    - 'null'
                avatarUrl:
                  type:
                    - string
                    - 'null'
                followersCount:
                  type:
                    - number
                    - 'null'
                bot:
                  type: boolean
              required:
                - acct
                - displayName
                - url
                - avatarUrl
                - followersCount
                - bot
            metrics:
              type: object
              properties:
                replies:
                  type:
                    - number
                    - 'null'
                reblogs:
                  type:
                    - number
                    - 'null'
                favourites:
                  type:
                    - number
                    - 'null'
              required:
                - replies
                - reblogs
                - favourites
            tags:
              type: array
              items:
                type: string
            mediaUrls:
              type: array
              items:
                type: string
            sensitive:
              type: boolean
          required:
            - id
            - uri
            - url
            - content
            - spoilerText
            - createdAt
            - language
            - instance
            - author
            - metrics
            - tags
            - mediaUrls
            - sensitive
        lemmyPost:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            type:
              type: string
              enum:
                - post
                - comment
            title:
              type:
                - string
                - 'null'
            body:
              type:
                - string
                - 'null'
            linkUrl:
              type:
                - string
                - 'null'
            url:
              type: string
            apId:
              type: string
            createdAt:
              type:
                - string
                - 'null'
            instance:
              type: string
            author:
              type: object
              properties:
                name:
                  type: string
                displayName:
                  type:
                    - string
                    - 'null'
                actorId:
                  type: string
                avatarUrl:
                  type:
                    - string
                    - 'null'
                bot:
                  type: boolean
              required:
                - name
                - displayName
                - actorId
                - avatarUrl
                - bot
            community:
              type: object
              properties:
                name:
                  type: string
                title:
                  type:
                    - string
                    - 'null'
                actorId:
                  type: string
                qualifiedName:
                  type: string
                nsfw:
                  type: boolean
              required:
                - name
                - title
                - actorId
                - qualifiedName
                - nsfw
            metrics:
              type: object
              properties:
                score:
                  type:
                    - number
                    - 'null'
                upvotes:
                  type:
                    - number
                    - 'null'
                downvotes:
                  type:
                    - number
                    - 'null'
                comments:
                  type:
                    - number
                    - 'null'
              required:
                - score
                - upvotes
                - downvotes
                - comments
            thumbnailUrl:
              type:
                - string
                - 'null'
            nsfw:
              type: boolean
          required:
            - id
            - type
            - title
            - body
            - linkUrl
            - url
            - apId
            - createdAt
            - instance
            - author
            - community
            - metrics
            - thumbnailUrl
            - nsfw
        githubItem:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            type:
              type: string
              enum:
                - issue
                - pull_request
                - repository
                - release
            title:
              type: string
            body:
              type:
                - string
                - 'null'
            url:
              type: string
            repo:
              type: string
            author:
              type:
                - string
                - 'null'
            state:
              type:
                - string
                - 'null'
            labels:
              type: array
              items:
                type: string
            comments:
              type:
                - number
                - 'null'
            stars:
              type:
                - number
                - 'null'
            tag:
              type:
                - string
                - 'null'
            number:
              type:
                - number
                - 'null'
            createdAt:
              type:
                - string
                - 'null'
          required:
            - id
            - type
            - title
            - body
            - url
            - repo
            - author
            - state
            - labels
            - comments
            - stars
            - tag
            - number
            - createdAt
        launch:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            name:
              type: string
            tagline:
              type: string
            description:
              type:
                - string
                - 'null'
            url:
              type: string
            website:
              type:
                - string
                - 'null'
            slug:
              type: string
            votesCount:
              type:
                - number
                - 'null'
            commentsCount:
              type:
                - number
                - 'null'
            createdAt:
              type:
                - string
                - 'null'
            featuredAt:
              type:
                - string
                - 'null'
            thumbnailUrl:
              type:
                - string
                - 'null'
            topics:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                  slug:
                    type: string
                required:
                  - name
                  - slug
            makers:
              type: array
              items:
                type: string
          required:
            - id
            - name
            - tagline
            - description
            - url
            - website
            - slug
            - votesCount
            - commentsCount
            - createdAt
            - featuredAt
            - thumbnailUrl
            - topics
            - makers
        stackItem:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            type:
              type: string
              enum:
                - question
                - answer
            title:
              type: string
            body:
              type:
                - string
                - 'null'
            excerpt:
              type:
                - string
                - 'null'
            url:
              type: string
            tags:
              type: array
              items:
                type: string
            score:
              type:
                - number
                - 'null'
            questionScore:
              type:
                - number
                - 'null'
            answerCount:
              type:
                - number
                - 'null'
            isAccepted:
              type:
                - boolean
                - 'null'
            isAnswered:
              type:
                - boolean
                - 'null'
            author:
              type:
                - string
                - 'null'
            authorUrl:
              type:
                - string
                - 'null'
            createdAt:
              type:
                - string
                - 'null'
            questionId:
              type: string
          required:
            - id
            - type
            - title
            - body
            - excerpt
            - url
            - tags
            - score
            - questionScore
            - answerCount
            - isAccepted
            - isAnswered
            - author
            - authorUrl
            - createdAt
            - questionId
        tiktokVideo:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            caption:
              type: string
            url:
              type: string
            author:
              type: object
              properties:
                id:
                  type:
                    - string
                    - 'null'
                handle:
                  type: string
                displayName:
                  type: string
                avatarUrl:
                  type:
                    - string
                    - 'null'
                verified:
                  type: boolean
                followerCount:
                  type:
                    - number
                    - 'null'
                url:
                  type: string
              required:
                - id
                - handle
                - displayName
                - avatarUrl
                - verified
                - followerCount
                - url
            postedAt:
              type:
                - string
                - 'null'
            playCount:
              type:
                - number
                - 'null'
            likeCount:
              type:
                - number
                - 'null'
            commentCount:
              type:
                - number
                - 'null'
            shareCount:
              type:
                - number
                - 'null'
            collectCount:
              type:
                - number
                - 'null'
            durationSeconds:
              type:
                - number
                - 'null'
            coverUrl:
              type:
                - string
                - 'null'
            hashtags:
              type: array
              items:
                type: string
            mentions:
              type: array
              items:
                type: string
            musicTitle:
              type:
                - string
                - 'null'
            musicAuthor:
              type:
                - string
                - 'null'
            region:
              type:
                - string
                - 'null'
            language:
              type:
                - string
                - 'null'
            isSlideshow:
              type: boolean
            isAigc:
              type: boolean
            isAd:
              type: boolean
          required:
            - id
            - caption
            - url
            - author
            - postedAt
            - playCount
            - likeCount
            - commentCount
            - shareCount
            - collectCount
            - durationSeconds
            - coverUrl
            - hashtags
            - mentions
            - musicTitle
            - musicAuthor
            - region
            - language
            - isSlideshow
            - isAigc
            - isAd
        previousPrice:
          type:
            - number
            - 'null'
        occurredAt:
          type: string
        publishedAt:
          type:
            - string
            - 'null'
        ai:
          type:
            - object
            - 'null'
          properties:
            output:
              type:
                - object
                - 'null'
              additionalProperties:
                anyOf:
                  - type: string
                  - type: number
                  - type: boolean
                  - type: 'null'
            model:
              type:
                - string
                - 'null'
            status:
              type: string
              enum:
                - ok
                - timeout
                - failed
            stepId:
              type: string
          required:
            - output
            - model
            - status
            - stepId
        analysis:
          type: object
          properties:
            sentiment:
              type:
                - string
                - 'null'
              enum:
                - positive
                - neutral
                - negative
                - question
                - mixed
                - null
            intent:
              type:
                - string
                - 'null'
              enum:
                - purchase_intent
                - comparison
                - question
                - complaint
                - praise
                - other
                - null
          required:
            - sentiment
            - intent
      required:
        - id
        - type
        - keywordId
        - source
        - listing
        - previousPrice
        - occurredAt
        - ai
    XTweet:
      type: object
      properties:
        id:
          type: string
        text:
          type: string
        createdAt:
          type: string
        lang:
          type:
            - string
            - 'null'
        url:
          type: string
        author:
          type: object
          properties:
            id:
              type: string
            username:
              type: string
            displayName:
              type: string
            profileImageUrl:
              type:
                - string
                - 'null'
            verified:
              type: boolean
            isBlueVerified:
              type: boolean
          required:
            - id
            - username
            - displayName
            - profileImageUrl
            - verified
            - isBlueVerified
        metrics:
          type: object
          properties:
            likes:
              type: number
            replies:
              type: number
            retweets:
              type: number
            quotes:
              type: number
            views:
              type:
                - number
                - 'null'
            bookmarks:
              type:
                - number
                - 'null'
          required:
            - likes
            - replies
            - retweets
            - quotes
            - views
            - bookmarks
        media:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                  - photo
                  - video
                  - animated_gif
              url:
                type: string
              previewUrl:
                type:
                  - string
                  - 'null'
              width:
                type:
                  - number
                  - 'null'
              height:
                type:
                  - number
                  - 'null'
              durationMs:
                type:
                  - number
                  - 'null'
              variants:
                type: array
                items:
                  type: object
                  properties:
                    url:
                      type: string
                    contentType:
                      type:
                        - string
                        - 'null'
                    bitrate:
                      type:
                        - number
                        - 'null'
                  required:
                    - url
                    - contentType
                    - bitrate
            required:
              - type
              - url
              - previewUrl
              - width
              - height
              - durationMs
              - variants
        entities:
          type: object
          properties:
            urls:
              type: array
              items:
                type: object
                properties:
                  url:
                    type: string
                  expandedUrl:
                    type:
                      - string
                      - 'null'
                  displayUrl:
                    type:
                      - string
                      - 'null'
                required:
                  - url
                  - expandedUrl
                  - displayUrl
            mentions:
              type: array
              items:
                type: object
                properties:
                  id:
                    type:
                      - string
                      - 'null'
                  username:
                    type: string
                  name:
                    type:
                      - string
                      - 'null'
                required:
                  - id
                  - username
                  - name
            hashtags:
              type: array
              items:
                type: object
                properties:
                  text:
                    type: string
                required:
                  - text
            cashtags:
              type: array
              items:
                type: object
                properties:
                  text:
                    type: string
                required:
                  - text
          required:
            - urls
            - mentions
            - hashtags
            - cashtags
        quotedTweet:
          oneOf:
            - $ref: '#/components/schemas/XTweet'
            - type: 'null'
        retweetedTweet:
          oneOf:
            - $ref: '#/components/schemas/XTweet'
            - type: 'null'
        inReplyToTweetId:
          type:
            - string
            - 'null'
        inReplyToUserId:
          type:
            - string
            - 'null'
        inReplyToUsername:
          type:
            - string
            - 'null'
        conversationId:
          type:
            - string
            - 'null'
        displayTextRange:
          type:
            - array
            - 'null'
          maxItems: 2
          minItems: 2
          prefixItems:
            - type: number
            - type: number
        source:
          type:
            - string
            - 'null'
        possiblySensitive:
          type: boolean
        poll:
          type:
            - object
            - 'null'
          properties:
            choices:
              type: array
              items:
                type: object
                properties:
                  label:
                    type: string
                  votes:
                    type:
                      - number
                      - 'null'
                required:
                  - label
                  - votes
            endAt:
              type:
                - string
                - 'null'
            countsAreFinal:
              type:
                - boolean
                - 'null'
          required:
            - choices
            - endAt
            - countsAreFinal
        card:
          type:
            - object
            - 'null'
          properties:
            type:
              type:
                - string
                - 'null'
            url:
              type:
                - string
                - 'null'
            title:
              type:
                - string
                - 'null'
            description:
              type:
                - string
                - 'null'
            imageUrl:
              type:
                - string
                - 'null'
          required:
            - type
            - url
            - title
            - description
            - imageUrl
        communityNote:
          type:
            - object
            - 'null'
          properties:
            text:
              type:
                - string
                - 'null'
            title:
              type:
                - string
                - 'null'
          required:
            - text
            - title
        editControl:
          type:
            - object
            - 'null'
          properties:
            editTweetIds:
              type: array
              items:
                type: string
            editableUntilMs:
              type:
                - number
                - 'null'
            editsRemaining:
              type:
                - number
                - 'null'
            isEditEligible:
              type:
                - boolean
                - 'null'
          required:
            - editTweetIds
            - editableUntilMs
            - editsRemaining
            - isEditEligible
      required:
        - id
        - text
        - createdAt
        - lang
        - url
        - author
        - metrics
        - media
        - entities
        - quotedTweet
        - retweetedTweet
        - inReplyToTweetId
        - inReplyToUserId
        - inReplyToUsername
        - conversationId
        - displayTextRange
        - source
        - possiblySensitive
        - poll
        - card
        - communityNote
        - editControl
    AiAnswer:
      type: object
      properties:
        id:
          type: string
        source:
          type: string
          const: ai_answers
        engine:
          type: string
          enum:
            - chatgpt
            - gemini
            - perplexity
        model:
          type:
            - string
            - 'null'
        prompt:
          type: string
        country:
          type: string
        answerText:
          type: string
        truncated:
          type: boolean
        searched:
          type: boolean
        citations:
          type: array
          items:
            $ref: '#/components/schemas/AiCitation'
        mentions:
          type: array
          items:
            $ref: '#/components/schemas/AiTermMention'
        askedAt:
          type: string
        latencyMs:
          type: number
        previous:
          type:
            - object
            - 'null'
          properties:
            runId:
              type: string
            changed:
              type:
                - string
                - 'null'
              enum:
                - terms
                - citations
                - text
                - null
          required:
            - runId
            - changed
      required:
        - id
        - source
        - engine
        - model
        - prompt
        - country
        - answerText
        - truncated
        - searched
        - citations
        - mentions
        - askedAt
        - latencyMs
        - previous
    AiCitation:
      type: object
      properties:
        url:
          type: string
        domain:
          type: string
        title:
          type:
            - string
            - 'null'
      required:
        - url
        - domain
        - title
    AiTermMention:
      type: object
      properties:
        term:
          type: string
        mentioned:
          type: boolean
        cited:
          type: boolean
        count:
          type: number
      required:
        - term
        - mentioned
        - cited
        - count
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key created from the Nephia dashboard for your Account.

````