{
  "openapi": "3.0.3",
  "info": {
    "title": "Twitter API Aggregated",
    "version": "1.0.0",
    "description": "Aggregated API documentation for Twitter data endpoints."
  },
  "servers": [
    {
      "url": "https://api.aisa.one/apis/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "Tweet": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "retweetCount": {
            "type": "integer"
          },
          "replyCount": {
            "type": "integer"
          },
          "likeCount": {
            "type": "integer"
          },
          "quoteCount": {
            "type": "integer"
          },
          "viewCount": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string"
          },
          "lang": {
            "type": "string"
          },
          "bookmarkCount": {
            "type": "integer"
          },
          "isReply": {
            "type": "boolean"
          },
          "inReplyToId": {
            "type": "string"
          },
          "conversationId": {
            "type": "string"
          },
          "displayTextRange": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "inReplyToUserId": {
            "type": "string"
          },
          "inReplyToUsername": {
            "type": "string"
          },
          "author": {
            "$ref": "#/components/schemas/User"
          },
          "entities": {
            "type": "object",
            "properties": {
              "hashtags": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "indices": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      }
                    },
                    "text": {
                      "type": "string"
                    }
                  }
                }
              },
              "urls": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "display_url": {
                      "type": "string"
                    },
                    "expanded_url": {
                      "type": "string"
                    },
                    "indices": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      }
                    },
                    "url": {
                      "type": "string"
                    }
                  }
                }
              },
              "user_mentions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id_str": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "screen_name": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "quoted_tweet": {
            "type": "string"
          },
          "retweeted_tweet": {
            "type": "string"
          },
          "isLimitedReply": {
            "type": "boolean"
          }
        }
      },
      "User": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "userName": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "isBlueVerified": {
            "type": "boolean"
          },
          "verifiedType": {
            "type": "string"
          },
          "profilePicture": {
            "type": "string"
          },
          "coverPicture": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "followers": {
            "type": "integer"
          },
          "following": {
            "type": "integer"
          },
          "canDm": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string"
          },
          "favouritesCount": {
            "type": "integer"
          },
          "hasCustomTimelines": {
            "type": "boolean"
          },
          "isTranslator": {
            "type": "boolean"
          },
          "mediaCount": {
            "type": "integer"
          },
          "statusesCount": {
            "type": "integer"
          },
          "withheldInCountries": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "possiblySensitive": {
            "type": "boolean"
          },
          "pinnedTweetIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "isAutomated": {
            "type": "boolean"
          },
          "automatedBy": {
            "type": "string"
          },
          "unavailable": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "unavailableReason": {
            "type": "string"
          }
        }
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/twitter/tweets": {
      "get": {
        "x-aisa-pricing": {
          "model": "dynamic",
          "currency": "USD",
          "basis": "provider_cost x 2",
          "nominal_usd": 0.0022,
          "observed_usd": {
            "min": 0.00015,
            "p50": 0.0022,
            "p95": 0.0111,
            "max": 0.015
          },
          "cost_drivers": [
            {
              "param": "result count",
              "effect": "charge scales with number of tweets/users returned"
            }
          ],
          "cost_tier": "variable",
          "note": "nominal_usd is a static reference, NOT a guaranteed minimum; actual charge = provider_cost x multiplier and can be higher or lower"
        },
        "tags": [
          "https://docs.twitterapi.io/api-reference/endpoint/get_tweet_by_ids"
        ],
        "summary": "Get Tweets by IDs",
        "operationId": "get_twitter_tweets",
        "description": "Fetch the full content of specific tweets when you already know their numeric tweet IDs (accepts multiple IDs in one call). Use this to expand IDs surfaced by search, timelines, or replies into complete objects. Returns text, author, source client, language, creation time, and engagement counts (likes, retweets, replies, quotes, bookmarks, views). If you do not have IDs yet, start with `get_twitter_tweet_advanced_search`.",
        "parameters": [
          {
            "name": "tweet_ids",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Comma-separated list of tweet IDs."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tweets": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Tweet"
                      }
                    },
                    "status": {
                      "type": "string"
                    },
                    "msg": {
                      "type": "string"
                    },
                    "code": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/twitter/tweet/replies": {
      "get": {
        "x-aisa-pricing": {
          "model": "dynamic",
          "currency": "USD",
          "basis": "provider_cost x 2",
          "nominal_usd": 0.0022,
          "observed_usd": {
            "min": 0.00015,
            "p50": 0.0022,
            "p95": 0.00255,
            "max": 0.0204
          },
          "cost_drivers": [
            {
              "param": "result count",
              "effect": "charge scales with number of tweets/users returned"
            }
          ],
          "cost_tier": "variable",
          "note": "nominal_usd is a static reference, NOT a guaranteed minimum; actual charge = provider_cost x multiplier and can be higher or lower"
        },
        "tags": [
          "https://docs.twitterapi.io/api-reference/endpoint/get_tweet_reply"
        ],
        "summary": "Get Tweet Replies",
        "operationId": "get_twitter_tweet_replies",
        "description": "Get the direct replies to a tweet, cursor-paginated. Use this to read the discussion under a post — sentiment, corrections, or follow-up questions. Returns full tweet objects with engagement counts. Prefer `get_twitter_tweet_replies_v2` when you want to control ordering (Relevance, Latest, or Likes); this v1 endpoint returns the default order only. To follow a conversation upward to its root instead of downward, use `get_twitter_tweet_thread_context`.",
        "parameters": [
          {
            "name": "tweetId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The tweet ID to get replies for."
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Cursor for pagination."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "has_next_page": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "tweets": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Tweet"
                      },
                      "description": "Array of reply tweets."
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/twitter/tweet/quotes": {
      "get": {
        "x-aisa-pricing": {
          "model": "dynamic",
          "currency": "USD",
          "basis": "provider_cost x 2",
          "nominal_usd": 0.0022,
          "observed_usd": {
            "min": 0.00015,
            "p50": 0.0022,
            "p95": 0.0039,
            "max": 0.006
          },
          "cost_drivers": [
            {
              "param": "result count",
              "effect": "charge scales with number of tweets/users returned"
            }
          ],
          "cost_tier": "variable",
          "note": "nominal_usd is a static reference, NOT a guaranteed minimum; actual charge = provider_cost x multiplier and can be higher or lower"
        },
        "tags": [
          "https://docs.twitterapi.io/api-reference/endpoint/get_tweet_quote"
        ],
        "summary": "Get Tweet Quotations",
        "operationId": "get_twitter_tweet_quotes",
        "description": "Get quote tweets of a given tweet — posts that embedded it with added commentary — cursor-paginated. Use this to see how a post is being reframed or argued about, which is often more revealing than plain replies. Returns full tweet objects with engagement counts. For direct replies use `get_twitter_tweet_replies_v2`; for accounts that amplified it without comment use `get_twitter_tweet_retweeters`.",
        "parameters": [
          {
            "name": "tweetId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The tweet ID to get quotes for."
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Cursor for pagination."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tweets": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Tweet"
                      }
                    },
                    "has_next_page": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/twitter/tweet/retweeters": {
      "get": {
        "x-aisa-pricing": {
          "model": "dynamic",
          "currency": "USD",
          "basis": "provider_cost x 2",
          "nominal_usd": 0.0022,
          "observed_usd": {
            "min": 0.0022,
            "p50": 0.0022,
            "p95": 0.0072,
            "max": 0.0072
          },
          "cost_drivers": [
            {
              "param": "result count",
              "effect": "charge scales with number of tweets/users returned"
            }
          ],
          "cost_tier": "variable",
          "note": "nominal_usd is a static reference, NOT a guaranteed minimum; actual charge = provider_cost x multiplier and can be higher or lower"
        },
        "tags": [
          "https://docs.twitterapi.io/api-reference/endpoint/get_tweet_retweeter"
        ],
        "summary": "Get Tweet Retweeters",
        "operationId": "get_twitter_tweet_retweeters",
        "description": "List the accounts that retweeted a given tweet, cursor-paginated. Use this to map who amplified a message and how influential they are. Returns user objects (handle, name, bio, follower count, verification) — not tweets. For retweets that added commentary use `get_twitter_tweet_quotes`.",
        "parameters": [
          {
            "name": "tweetId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The tweet ID to get retweeters for."
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Cursor for pagination."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "users": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/User"
                      }
                    },
                    "has_next_page": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
