openapi: 3.0.1
info:
  title: twtData
  description: A tool that allows users to 1) retrieve real time data on twitter accounts and 2) search twitter users via keywords. This data includes, public metrics like followers and following, their bio, profile image, verified status and type, pinned tweet data like date, text and public metrics and more.
  version: 'v1'
servers:
  - url: "https://www.twtdata.com"
paths:
  /get-username-stats/{username}:
    get:
      operationId: getStats
      summary: Get twitter account stats
      parameters:
        - in: path
          name: username
          schema:
            type: string
          required: true
          description: The username of the twitter account
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getStats'

  /search-twitter-profiles/{keyword}:
    get:
      operationId: searchUsers
      summary: search twitter user profile by keyword
      parameters:
        - in: path
          name: keyword
          schema:
            type: string
          required: true
          description: keyword used to perform twitter profile keyword search
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/searchUsers'

components:
  schemas:
    getStats:
      type: object
      properties:
        EXTRA_INFORMATION_TO_ASSISTANT:
          type: string
        account_found:
          type: boolean
        pinned_tweet_data:
          type: object
          properties:
            created_at:
              type: string
            text:
              type: string
            public_metrics:
              type: object
              properties:
                retweet_count:
                  type: integer
                reply_count:
                  type: integer
                like_count:
                  type: integer
                quote_count:
                  type: integer
                impression_count:
                  type: integer
        description:
          type: string
        verified:
          type: boolean
        verified_type:
          type: string
        created_at:
          type: string
        profile_image_url:
          type: string
        name:
          type: string
        link_to_free_sample_report:
          type: string
        link_to_purchase_full_report:
          type: string
        followers_count:
          type: integer
        following_count:
          type: integer
        tweet_count:
          type: integer
        listed_count:
          type: integer
        manual_how_to_use_the_plugin:
          type: string
        analytic_blog_for_the_account:
          type: string
        relevant_users:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              username:
                type: string
              description:
                type: string
              location:
                type: string
              followers_count:
                type: integer
              following_count:
                type: integer
              tweet_count:
                type: integer
              listed_count:
                type: integer
              text:
                type: string
              protected:
                type: boolean
              url:
                type: string
              id:
                type: string
              profile_image_url:
                type: string

      required:
        - account_found
      description: Twitter account stats.

    searchUsers:
      type: object
      properties:
        EXTRA_INFORMATION_TO_ASSISTANT:
          type: string
        keyword_found:
          type: boolean
        total_count:
          type: integer
        relevant_users:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              username:
                type: string
              description:
                type: string
              location:
                type: string
              followers_count:
                type: integer
              following_count:
                type: integer
              tweet_count:
                type: integer
              text:
                type: string
              verified:
                type: boolean
              influencer_type:
                type: string
              interests:
                type: string
              profession_industry:
                type: string
              analysis_report:
                type: string
              is_dm_open:
                type: boolean
              data_available:
                type: boolean
              is_suspended:
                type: boolean
              id:
                type: string
      required:
        - keyword_found
      description: Twitter users by keyword
