{
  "openapi": "3.0.1",
  "info": {
    "title": "TwitterAPI.io the most stable/fastest/cheapest twitter api.",
    "description": "Provide the most stable/fastest/cheapest twitter api.",
    "license": {
      "name": "MIT"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.twitterapi.io"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/twitter/user/info": {
      "get": {
        "description": "Get user info by screen name",
        "parameters": [
          {
            "name": "userName",
            "in": "query",
            "description": "The screen name of the user",
            "schema": {
              "type": "string",
              "format": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User info",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/UserInfo"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "error"]
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },



    "/twitter/user_about": {
      "get": {
        "description": "Get user profile about by screen name",
        "parameters": [
          {
            "name": "userName",
            "in": "query",
            "description": "The screen name of the user",
            "schema": {
              "type": "string",
              "format": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User info",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/UserAbout"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "error"]
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },




    "/twitter/spaces/detail": {
      "get": {
        "description": "Get spaces detail by space id",
        "parameters": [
          {
            "name": "space_id",
            "in": "query",
            "description": "The id of the space",
            "schema": {
              "type": "string",
              "format": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Spaces detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SpacesDetail"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "error"]
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },

    "/twitter/user/search": {
      "get": {
        "description": "Search user by keyword",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "description": "The keyword to search",
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "The cursor to paginate through the results. First page is \"\".",
            "schema": {
              "type": "string",
              "format": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User info",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "users": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UserInfo"
                      },
                      "description": "Array of users"
                    },
                    "has_next_page": {
                      "type": "boolean",
                      "description": "Indicates if there are more results available"
                    },
                    "next_cursor": {
                      "type": "string",
                      "description": "Cursor for fetching the next page of results"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "error"]
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },


    "/twitter/trends": {
      "get": {
        "description": "Get trends by woeid",
        "parameters": [
          {
            "name": "woeid",
            "in": "query",
            "required": true,
            "description": "The woeid of the location. eg. 2418046. Woeid list: https://gist.github.com/tedyblood/5bb5a9f78314cc1f478b3dd7cde790b9",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "The number of trends to return. Default is 30. Min is 30.",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Trends",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "trends": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Trend"
                      },
                      "description": "Array of trends"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "error"]
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },



    "/twitter/user/batch_info_by_ids": {
      "get": {
        "description": "Batch get user info by user ids. Pricing:\n\n- Single user request: 18 credits per user\n- Bulk request (100+ users): 10 credits per user\n\nNote: For cost optimization, we recommend batching requests when fetching multiple user profiles.",
        "parameters": [
          {
            "name": "userIds",
            "in": "query",
            "description": "The user ids to get.eg. 1234567890,1234567891,1234567892. Use comma to separate multiple user ids",
            "required": true,
            "schema": {
              "type": "string",
              "format": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User infos",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "users": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UserInfo"
                      },
                      "description": "Array of user infos"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "error"]
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },


    "/twitter/user/last_tweets": {
      "get": {
        "description": "Retrieve tweets by user name.Sort by created_at. Results are paginated, with each page returning up to 20 tweets.If you only need to fetch the latest tweets from a single user very frequently, do not use this API—it will cost you a lot. Instead, please refer to https://twitterapi.io/blog/how-to-monitor-twitter-accounts-for-new-tweets-in-real-time. If you have more than 20 Twitter accounts requiring real-time tweet updates, use https://twitterapi.io/twitter-stream which is the most cost-effective solution.",
        "parameters": [
          {
            "name": "userId",
            "in": "query",
            "description": "user id of the user.userId is recommended, could be more stable and faster than userName.userId and userName are mutually exclusive. If both are provided, userId will be used.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "name": "userName",
            "in": "query",
            "description": "screen name of the user.userId and userName are mutually exclusive. If both are provided, userId will be used.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "string"
            }
          }, 
          {
            "name": "cursor",
            "in": "query",
            "description": "The cursor to paginate through the results. First page is \"\".",
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "name": "includeReplies",
            "in": "query",
            "description": "Whether to include replies in the results. Default is False.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tweets response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tweets": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Tweet"
                      },
                      "description": "Array of tweets"
                    },
                    "has_next_page": {  
                      "type": "boolean",
                      "description": "Indicates if there are more results available"
                    },
                    "next_cursor": {
                      "type": "string",
                      "description": "Cursor for fetching the next page of results"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "error"]
                    },
                    "message": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                   
                  },
                  "required": ["tweets", "status", "message", "has_next_page", "next_cursor"]
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },

    
    "/twitter/tweets": {
      "get": {
        "description": "get tweet by tweet ids",
        "parameters": [ 
          {
            "name": "tweet_ids",
            "in": "query",
            "description": "The tweet ids to get.eg. 1846987139428634858,1866332309399781537,1868244766405870076. Use comma to separate multiple tweet ids",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tweets response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tweets": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Tweet"
                      },
                      "description": "Array of tweets"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "error"]
                    },
                    "message": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  },
                  "required": ["tweets", "status", "message"]
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }, 



    "/twitter/article": {
      "get": {
        "description": "get article by tweet id. cost 100 credit per article",
        "parameters": [ 
          {
            "name": "tweet_id",
            "in": "query",
            "description": "The tweet id of the article.eg. 1905545699552375179",
            "required": true,
            "schema": {
              "type": "string",
              "format": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Article response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "article": {
                      "type": "object",
                      "properties": {
                        "author": {
                          "$ref": "#/components/schemas/UserInfo",
                          "description": "The user who posted the tweet"
                        },
                        "replyCount": {
                          "type": "integer",
                          "description": "The number of replies to the tweet"
                        },
                        "likeCount": {
                          "type": "integer",
                          "description": "The number of retweets of the tweet"
                        },
                        "quoteCount": {
                          "type": "integer",
                          "description": "The number of quotes of the tweet"
                        },
                        "viewCount": {
                          "type": "integer",
                          "description": "The number of views of the tweet"
                        },
                        "createdAt": {
                          "type": "string",
                          "description": "The time when the tweet was posted.eg.Fri Mar 28 09:01:12 +0000 2025"
                        },
                        "title": {
                          "type": "string",
                          "description": "The title of the article"
                        },
                        "preview_text": {
                          "type": "string",
                          "description": "The preview text of the article.eg."
                        },
                        "cover_media_img_url": {
                          "type": "string",
                          "description": "The url of the cover media image.eg.https://pbs.twimg.com/media/GnHXrznXUAEs-v5.jpg"
                        },
                        "contents": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "text": {
                                "type": "string",
                                "description": "The text of the content"
                              }
                            }
                          }
                        }
                      }
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "failed"]
                    },
                    "message": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }, 


    "/twitter/tweet/replies": {
      "get": {
        "description": "get tweet replies by tweet id.Each page returns up to 20 replies(Sometimes less than 20,because we will filter out ads or other not  tweets). Use cursor for pagination. Order by reply time desc",
        "parameters": [ 
          {
            "name": "tweetId",
            "in": "query",
            "description": "The tweet ID to get. Must be an original tweet (not a reply to another tweet) and should be the first tweet in a thread.. eg. 1846987139428634858",
            "required": true,
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "name": "sinceTime",
            "in": "query",
            "description": "On or after a specified unix timestamp in seconds.",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "required": false
          },
          {
            "name": "untilTime",
            "in": "query",
            "description": "Before a specified unix timestamp in seconds.",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "required": false
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "The cursor to paginate through the results. First page is \"\".",
            "schema": {
              "type": "string",
              "format": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tweet replies response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "replies": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Tweet"
                      },
                      "description": "Array of tweets"
                    },
                    "has_next_page": {
                      "type": "boolean",
                      "description": "Indicates if there are more results available. If true, use next_cursor to fetch the next page. Warning: Due to Twitter API inconsistency, has_more might return true even when no additional data exists. In such cases, subsequent requests will return empty results - this is a known platform limitation."
                    },
                    "next_cursor": {
                      "type": "string",
                      "description": "Cursor for fetching the next page of results"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "error"]
                    },
                    "message": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }, 


    "/twitter/tweet/thread_context": {
      "get": {
        "description": "Get the thread context of a tweet.Suppose a tweet thread consists of t1, t2 (replying to t1), t3 (replying to t2), and t4, t5, t6 (all replying to t3). If we provide an API where you input t3 and receive t1, t2, t3, t4, t5, t6.Pagination is supported.The pagination size cannot be set (due to Twitter's limitations), and the data returned per page is not fixed.",
        "parameters": [ 
          {
            "name": "tweetId",
            "in": "query",
            "description": "The tweet ID to get. Can be a reply tweet or a original tweet.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "The cursor to paginate through the results. First page is \"\".",
            "schema": {
              "type": "string",
              "format": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tweet replies response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "replies": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Tweet"
                      },
                      "description": "Array of tweets"
                    },
                    "has_next_page": {
                      "type": "boolean",
                      "description": "Indicates if there are more results available. If true, use next_cursor to fetch the next page. Warning: Due to Twitter API inconsistency, has_more might return true even when no additional data exists. In such cases, subsequent requests will return empty results - this is a known platform limitation."
                    },
                    "next_cursor": {
                      "type": "string",
                      "description": "Cursor for fetching the next page of results"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "error"]
                    },
                    "message": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }, 


    "/twitter/tweet/quotes": {
      "get": {
        "description": "get tweet quotes by tweet id.Each page returns exactly 20 quotes. Use cursor for pagination. Order by quote time desc",
        "parameters": [ 
          {
            "name": "tweetId",
            "in": "query",
            "description": "The tweet ID to get. eg. 1846987139428634858",
            "required": true,
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "name": "sinceTime",
            "in": "query",
            "description": "On or after a specified unix timestamp in seconds.",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "required": false
          },
          {
            "name": "untilTime",
            "in": "query",
            "description": "Before a specified unix timestamp in seconds.",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "required": false
          },
          {
            "name": "includeReplies",
            "in": "query",
            "description": "Whether to include replies in the results. Default is True.",
            "schema": {
              "type": "boolean",
              "default": true
            },
            "required": false
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "The cursor to paginate through the results. First page is \"\".",
            "schema": {
              "type": "string",
              "format": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tweet quotes response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tweets": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Tweet"
                      },
                      "description": "Array of tweets"
                    },
                    "has_next_page": {
                      "type": "boolean",
                      "description": "Indicates if there are more results available. If true, use next_cursor to fetch the next page. Warning: Due to Twitter API inconsistency, has_more might return true even when no additional data exists. In such cases, subsequent requests will return empty results - this is a known platform limitation."
                    },
                    "next_cursor": {
                      "type": "string",
                      "description": "Cursor for fetching the next page of results"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "error"]
                    },
                    "message": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }, 



    "/twitter/user/mentions": {
      "get": {
        "description": "get tweet mentions by user screen name.Each page returns exactly 20 mentions. Use cursor for pagination. Order by mention time desc",
        "parameters": [ 
          {
            "name": "userName",
            "in": "query",
            "description": "The user screen name to get. eg. kaitoEasyApi",
            "required": true,
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "name": "sinceTime",
            "in": "query",
            "description": "On or after a specified unix timestamp in seconds.",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "required": false
          },
          {
            "name": "untilTime",
            "in": "query",
            "description": "Before a specified unix timestamp in seconds.",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "required": false
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "The cursor to paginate through the results. First page is \"\".",
            "schema": {
              "type": "string",
              "format": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tweet quotes response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tweets": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Tweet"
                      },
                      "description": "Array of tweets"
                    },
                    "has_next_page": {
                      "type": "boolean",
                      "description": "Indicates if there are more results available. If true, use next_cursor to fetch the next page. Warning: Due to Twitter API inconsistency, has_more might return true even when no additional data exists. In such cases, subsequent requests will return empty results - this is a known platform limitation."
                    },
                    "next_cursor": {
                      "type": "string",
                      "description": "Cursor for fetching the next page of results"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "error"]
                    },
                    "message": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }, 


    "/twitter/list/tweets": {
      "get": {
        "description": "get tweets by list id.Each page returns exactly 20 tweets. Use cursor for pagination. Order by tweet time desc",
        "parameters": [ 
          {
            "name": "listId",
            "in": "query",
            "description": "The list ID to get eg. 1846987139428634858",
            "required": true,
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "name": "sinceTime",
            "in": "query",
            "description": "On or after a specified unix timestamp in seconds.",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "required": false
          },
          {
            "name": "untilTime",
            "in": "query",
            "description": "Before a specified unix timestamp in seconds.",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "required": false
          },
          {
            "name": "includeReplies",
            "in": "query",
            "description": "Whether to include replies in the results. Default is True.",
            "schema": {
              "type": "boolean",
              "default": true
            },
            "required": false
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "The cursor to paginate through the results. First page is \"\".",
            "schema": {
              "type": "string",
              "format": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tweet quotes response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tweets": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Tweet"
                      },
                      "description": "Array of tweets"
                    },
                    "has_next_page": {
                      "type": "boolean",
                      "description": "Indicates if there are more results available. If true, use next_cursor to fetch the next page. Warning: Due to Twitter API inconsistency, has_more might return true even when no additional data exists. In such cases, subsequent requests will return empty results - this is a known platform limitation."
                    },
                    "next_cursor": {
                      "type": "string",
                      "description": "Cursor for fetching the next page of results"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "error"]
                    },
                    "message": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }, 

    "/twitter/tweet/retweeters": {
      "get": {
        "description": "get tweet retweeters by tweet id.Each page returns about 100 retweeters. Use cursor for pagination. Order by retweet time desc",
        "parameters": [ 
          {
            "name": "tweetId",
            "in": "query",
            "description": "The tweet ID to get. eg. 1846987139428634858",
            "required": true,
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "The cursor to paginate through the results. First page is \"\".",
            "schema": {
              "type": "string",
              "format": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tweet retweeters response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "users": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UserInfo"
                      },
                      "description": "Array of users"
                    },
                    "has_next_page": {
                      "type": "boolean",
                      "description": "Indicates if there are more results available. If true, use next_cursor to fetch the next page. Warning: Due to Twitter API inconsistency, has_more might return true even when no additional data exists. In such cases, subsequent requests will return empty results - this is a known platform limitation."
                    },
                    "next_cursor": {
                      "type": "string",
                      "description": "Cursor for fetching the next page of results"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "error"]
                    },
                    "message": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }, 

    "/twitter/user/followers": {
      "get": {
        "description": "Get user followers in reverse chronological order (newest first). Returns exactly 200 followers per page, sorted by follow date. Most recent followers appear on the first page. Use cursor for pagination through the complete followers list.",
        "parameters": [
          {
            "name": "userName",
            "in": "query",
            "description": "screen name of the user",
            "required": true,
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "The cursor to paginate through the results. First page is \"\".",
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "The number of followings to return per page. Default is 200.min 20,max 200",
            "schema": {
              "type": "integer",
              "default": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User info",
            "content": {

              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "followers": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UserInfo"
                      },
                      "description": "Array of followers"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "error"]
                    },
                    "message": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },


    "/twitter/user/verifiedFollowers": {
      "get": {
        "description": "Get user verified followers in reverse chronological order (newest first). Returns exactly 20 verified followers per page, sorted by follow date. Most recent followers appear on the first page. Use cursor for pagination through the complete followers list.$0.3 per 1000 followers",
        "parameters": [
          {
            "name": "user_id",
            "in": "query",
            "description": "user_id of the user",
            "required": true,
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "The cursor to paginate through the results. First page is \"\".",
            "schema": {
              "type": "string",
              "format": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User info",
            "content": {

              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "followers": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UserInfo"
                      },
                      "description": "Array of followers"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "error"]
                    },
                    "message": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },



    


    "/twitter/user/followings": {
      "get": {
        "description": "Get user followings. Each page returns exactly 200 followings. Use cursor for pagination.Sorted by follow date. Most recent followings appear on the first page. ",
        "parameters": [
          {
            "name": "userName",
            "in": "query",
            "description": "screen name of the user",
            "required": true,
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "The cursor to paginate through the results. First page is \"\".",
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "The number of followings to return per page. Default is 200.min 20,max 200",
            "schema": {
              "type": "integer",
              "default": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User followings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "followings": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UserInfo"
                      },
                      "description": "Array of followings"
                    }, 
                    "has_next_page": {
                      "type": "boolean",
                      "description": "Indicates if there are more results available"
                    },
                    "next_cursor": {
                      "type": "string",
                      "description": "Cursor for fetching the next page of results"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "error"]
                    },
                    "message": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },


    "/twitter/user/check_follow_relationship": {
      "get": {
        "description": "Check if the user is following/followed by the target user. Trial operation price: 100 credits per call.",
        "parameters": [
          {
            "name": "source_user_name",
            "in": "query",
            "description": "screen name of the source user",
            "required": true,
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "name": "target_user_name",
            "in": "query",
            "description": "screen name of the target user",
            "schema": {
              "type": "string",
              "format": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Check follow relationship response",
            "content": {

              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "following": {
                          "type": "boolean",
                          "description": "Whether the source user is following the target user"
                        },
                        "followed_by": {
                          "type": "boolean",
                          "description": "Whether the source user is followed by the target user"
                        }
                      }
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "error"]
                    },
                    "message": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },


    "/twitter/tweet/advanced_search": {
      "get": {
        "description": "Advanced search for tweets.Each page returns up to 20 replies(Sometimes less than 20,because we will filter out ads or other not  tweets). Use cursor for pagination.",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "description": "The query to search for.eg.  \"AI\"  OR \"Twitter\" from:elonmusk since:2021-12-31_23:59:59_UTC . Get more examples from https://github.com/igorbrigadir/twitter-advanced-search ",
            "required": true,
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "name": "queryType",
            "in": "query",
            "description": "The query type to search for.eg.  \"Latest\"  OR \"Top\"",
            "required": true,
            "schema": {
              "type": "string",
              "enum": ["Latest", "Top"],
              "default": "Latest"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "The cursor to paginate through the results. First page is \"\".",
            "schema": {
              "type": "string",
              "format": "string"
            }
          }

        ],
        "responses": {
          "200": {
            "description": "Tweets response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tweets": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Tweet"
                      },
                      "description": "Array of tweets"
                    },
                    "has_next_page": {
                      "type": "boolean",
                      "description": "Indicates if there are more results available"
                    },
                    "next_cursor": {
                      "type": "string",
                      "description": "Cursor for fetching the next page of results"
                    }
                  },
                  "required": ["tweets", "has_next_page", "next_cursor"]
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },

    "/twitter/community/get_tweets_from_all_community": {
      "get": {
        "description": "get tweets from all communities,each page returns up to 20 tweets. Use cursor for pagination.",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "description": "The query to search for.eg.  only support search by keyword.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "name": "queryType",
            "in": "query",
            "description": "The query type to search for.eg.  \"Latest\"  OR \"Top\"",
            "required": true,
            "schema": {
              "type": "string",
              "enum": ["Latest", "Top"],
              "default": "Latest"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "The cursor to paginate through the results. First page is \"\".",
            "schema": {
              "type": "string",
              "format": "string"
            }
          }

        ],
        "responses": {
          "200": {
            "description": "Tweets response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tweets": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Tweet"
                      },
                      "description": "Array of tweets"
                    },
                    "has_next_page": {
                      "type": "boolean",
                      "description": "Indicates if there are more results available"
                    },
                    "next_cursor": {
                      "type": "string",
                      "description": "Cursor for fetching the next page of results"
                    }
                  },
                  "required": ["tweets", "has_next_page", "next_cursor"]
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },



    "/twitter/login_by_email_or_username": {
      "post": {
        "description": "Login Step 1: by email or username.Recommend to use email.Trial operation price: $0.003 per call. Please read the guide: https://twitterapi.io/blog/twitter-login-and-post-api-guide",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["username_or_email", "password", "proxy"],
                "properties": {
                  "username_or_email": {
                    "type": "string",
                    "description": "User name or email.If you can't log in with your email, use your username. If you can't log in with your username, use your email instead.ref:https://twitterapi.io/blog/twitter-login-and-post-api-guide"
                  },
                  "password": {
                    "type": "string",
                    "description": "The password of the user"
                  },
                  "proxy": {
                    "type": "string",
                    "description": "The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port . You can get proxy from: https://www.webshare.io/?referral_code=4e0q1n00a504"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Login response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "hint": {
                      "type": "string",
                      "description": "Hint of the login.eg. \"Please use second endpoint /login_2fa to continue login.\""
                    },
                    "login_data": {
                      "type": "string",
                      "description": "Use this data to call /twitter/login_2fa to continue login."
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error"
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },

    "/twitter/login_by_2fa": {
      "post": {
        "description": "Deprecated soon. Please use login V2 instead, as it is more stable.Login Step 2: by 2fa code.Trial operation price: $0.003 per call. ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["login_data", "2fa_code", "proxy"],
                "properties": {
                  "login_data": {
                    "type": "string",
                    "description": "The login data returned by /twitter/login_by_email_or_username"
                  },
                  "2fa_code": {
                    "type": "string",
                    "description": "The 2fa code of the user. get 2fa code from https://2fa.fb.rip/"
                  },
                  "proxy": {
                    "type": "string",
                    "description": "The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port .You can get proxy from: https://www.webshare.io/?referral_code=4e0q1n00a504"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Login Step 2(2fa) response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session": {
                      "type": "string",
                      "description": "The session of the login.Use this session to call other endpoints.eg. /twitter/create_tweet /twitter/like_tweet"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error"
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    },
                    "user":{
                      "type": "object",
                      "description": "The user info of the login.",
                      "properties": {
                        "id_str": {
                          "type": "string",
                          "description": "The id of the user"
                        },
                        "screen_name": {
                          "type": "string",
                          "description": "The screen name of the user"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the user"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },


    "/twitter/create_tweet": {
      "post": {
        "description": "Create a tweet.Need to login first.Trial operation price: $0.001 per call.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["auth_session", "tweet_text", "proxy"],
                "properties": {
                  "auth_session": {
                    "type": "string",
                    "description": "The session of the login. It's returned by /twitter/login_by_2fa"
                  },
                  "tweet_text": {
                    "type": "string",
                    "description": "The text of the tweet."
                  },
                  "quote_tweet_id": {
                    "type": "string",
                    "description": "The id of the tweet to quote.Optional"
                  },
                  "in_reply_to_tweet_id": {
                    "type": "string",
                    "description": "The id of the tweet to reply to.Optional"
                  },
                  "media_id": {
                    "type": "string",
                    "description": "The id of the media to attach.Optional"
                  },
                  "proxy": {
                    "type": "string",
                    "description": "The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port.You can get proxy from: https://www.webshare.io/?referral_code=4e0q1n00a504"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create tweet response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error"
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    },
                    "data":{
                      "type": "object",
                      "description": "The data of the tweet",
                      "properties": {
                        "create_tweet": {
                          "type": "object",
                          "description": "The data of the tweet",
                          "properties": {
                            "tweet_result": {
                              "type": "object",
                              "description": "The result of the tweet",
                              "properties": {
                                "result": {
                                  "type": "object",
                                  "description": "The result of the tweet",
                                  "properties": {
                                    "rest_id": {
                                      "type": "string",
                                      "description": "The id of the tweet"
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },

    "/twitter/like_tweet": {
      "post": {
        "description": "Like a tweet.Need to login first. Trial operation price: $0.001 per call.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["auth_session", "tweet_id", "proxy"],
                "properties": {
                  "auth_session": {
                    "type": "string",
                    "description": "The session of the login. It's returned by /twitter/login_by_2fa"
                  },
                  "tweet_id": {
                    "type": "string",
                    "description": "The id of the tweet to like"
                  },
                  "proxy": {
                    "type": "string",
                    "description": "The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port.You can get proxy from: https://www.webshare.io/?referral_code=4e0q1n00a504"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Like tweet response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error"
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },



    "/twitter/retweet_tweet": {
      "post": {
        "description": "Retweet a tweet.Need to login first. Trial operation price: $0.001 per call.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["auth_session", "tweet_id", "proxy"],
                "properties": {
                  "auth_session": {
                    "type": "string",
                    "description": "The session of the login. It's returned by /twitter/login_by_2fa"
                  },
                  "tweet_id": {
                    "type": "string",
                    "description": "The id of the tweet to retweet"
                  },
                  "proxy": {
                    "type": "string",
                    "description": "The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port.You can get proxy from: https://www.webshare.io/?referral_code=4e0q1n00a504"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Retweet tweet response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error"
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },


    "/twitter/list/add_member": {
      "post": {
        "description": "add member to a list.Need to login first. Trial operation price: $0.001 per call.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["auth_session", "list_id","proxy"],
                "properties": {
                  "auth_session": {
                    "type": "string",
                    "description": "The session of the login. It's returned by /twitter/login_by_2fa"
                  },
                  "list_id": {
                    "type": "string",
                    "description": "The id of the list"
                  },
                  "user_id": {
                    "type": "string",
                    "description": "The id of the user to add.user_id and user_name must be set at least one."
                  },
                  "user_name": {
                    "type": "string",
                    "description": "The name of the user to add.user_id and user_name must be set at least one."
                  },
                  "proxy": {
                    "type": "string",
                    "description": "The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Add user to list response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error"
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },

    "/twitter/list/remove_member": {
      "post": {
        "description": "remove member from a list.Need to login first. Trial operation price: $0.001 per call.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["auth_session", "list_id","proxy"],
                "properties": {
                  "auth_session": {
                    "type": "string",
                    "description": "The session of the login. It's returned by /twitter/login_by_2fa"
                  },
                  "list_id": {
                    "type": "string",
                    "description": "The id of the list"
                  },
                  "user_id": {
                    "type": "string",
                    "description": "The id of the user to add.user_id and user_name must be set at least one."
                  },
                  "user_name": {
                    "type": "string",
                    "description": "The name of the user to add.user_id and user_name must be set at least one."
                  },
                  "proxy": {
                    "type": "string",
                    "description": "The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Remove user from list response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error"
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },



    "/twitter/upload_image": {
      "post": {
        "description": "upload image to twitter.Need to login first. Trial operation price: $0.001 per call.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["auth_session", "list_id","proxy"],
                "properties": {
                  "auth_session": {
                    "type": "string",
                    "description": "The session of the login. It's returned by /twitter/login_by_2fa"
                  },
                  "image_url": {
                    "type": "string",
                    "description": "The url of the image to upload"
                  },
                  "proxy": {
                    "type": "string",
                    "description": "The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Upload image response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error"
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    },
                    "media_id": {
                      "type": "string",
                      "description": "The id of the uploaded image"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },


    "/twitter/user_login_v2": {
      "post": {
        "description": "Log in directly using your email, username, password, and 2FA secret key. And obtain the Login_cookie,  to post tweets, etc. Please note that the Login_cookie obtained through login_v2 can only be used for APIs with the \"v2\" suffix, such as create_tweet_v2. Trial operation price: $0.003 per call. ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["user_name", "email","password","proxy"],
                "properties": {
                  "user_name": {
                    "type": "string",
                    "description": "User name.Must be set"
                  },
                  "email": {
                    "type": "string",
                    "description": "Email.Must be set"
                  },
                  "password": {
                    "type": "string",
                    "description": "The password of the user"
                  },
                  "totp_secret": {
                    "type": "string",
                    "description": "The totp secret of the user.If you don't have it, you can get it from the user's profile page.This field is required because it will make your login more reliable and less likely to be banned."
                  },
                  "proxy": {
                    "type": "string",
                    "description": "The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port . You can get proxy from: https://www.webshare.io/?referral_code=4e0q1n00a504"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Login response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "login_cookie": {
                      "type": "string",
                      "description": "The login cookie of the user.Use this cookie to post tweets, etc.You can only call v2 APIs with this cookie.If your account is in good standing and you're using residential proxies, the cookies will generally remain valid indefinitely."
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error"
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },



    "/twitter/create_tweet_v2": {
      "post": {
        "description": "Create a tweet.You must set the login_cookie.You can get the login_cookie from /twitter/user_login_v2.Trial operation price: $0.003 per call. ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["login_cookies","tweet_text","proxy"],
                
                "properties": {
                  "login_cookies": {
                    "type": "string",
                    "description": "The login cookies of the user.You can get the login_cookie from /twitter/user_login_v2.Must be set"
                  },
                  "tweet_text": {
                    "type": "string",
                    "description": "The text of the tweet.Must be set"
                  },
                  "reply_to_tweet_id": {
                    "type": "string",
                    "description": "The id of the tweet to reply to.Optional"
                  },
                  "attachment_url": {
                    "type": "string",
                    "description": "The url of quote tweet.Optional.eg.https://x.com/sama/status/1947640330318156074"
                  },
                  "community_id": {
                    "type": "string",
                    "description": "The id of the community to post to.Optional"
                  },
                  "is_note_tweet": {
                    "type": "boolean",
                    "description": "If this option is set to True, tweets longer than 280 characters can be posted (Twitter Premium only)."
                  },
                  "media_ids": {
                    "type": "array",
                    "description": "The ids of the media to post.Optional.You can get the media_ids from /twitter/upload_image_v2 (to be developed)"
                  },
                  "proxy": {
                    "type": "string",
                    "description": "The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port . You can get proxy from: https://www.webshare.io/?referral_code=4e0q1n00a504"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Login response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tweet_id": {
                      "type": "string",
                      "description": "The id of the created tweet."
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error"
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    



    "/twitter/upload_media_v2": {
      "post": {
        "description": "Upload media to twitter.You must set the login_cookie.You can get the login_cookie from /twitter/user_login_v2.Trial operation price: $0.003 per call. ",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["login_cookies", "proxy","file"],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The media file to upload (image, video, etc.)"
                  },
                  "proxy": {
                    "type": "string",
                    "description": "The proxy to use.Please use high-quality residential proxies and avoid free proxies. Required. Example: http://username:password@ip:port . You can get proxy from: https://www.webshare.io/?referral_code=4e0q1n00a504"
                  },
                  "login_cookies": {
                    "type": "string",
                    "description": "The login cookies of the user. You can get the login_cookie from /twitter/user_login_v2. Optional for media upload, required for posting tweets"
                  },
                  "is_long_video":{
                    "type": "boolean",
                    "description": "If this is True, videos longer than 2:20 can be uploaded.(Twitter Premium only)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Upload media response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "media_id": {
                      "type": "string",
                      "description": "The id of the uploaded media."
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error"
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },



    "/twitter/like_tweet_v2": {
      "post": {
        "description": "Like a tweet.You must set the login_cookie.You can get the login_cookie from /twitter/user_login_v2.Trial operation price: $0.002 per call. ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["login_cookies","tweet_id","proxy"],
                
                "properties": {
                  "login_cookies": {
                    "type": "string",
                    "description": "The login cookies of the user.You can get the login_cookie from /twitter/user_login_v2.Must be set"
                  },
                  "tweet_id": {
                    "type": "string",
                    "description": "The id of the tweet to like.Must be set"
                  },
                  "proxy": {
                    "type": "string",
                    "description": "The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port . You can get proxy from: https://www.webshare.io/?referral_code=4e0q1n00a504"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Login response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error"
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },


    "/twitter/unlike_tweet_v2": {
      "post": {
        "description": "Unlike a tweet.You must set the login_cookie.You can get the login_cookie from /twitter/user_login_v2.Trial operation price: $0.002 per call. ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["login_cookies","tweet_id","proxy"],
                
                "properties": {
                  "login_cookies": {
                    "type": "string",
                    "description": "The login cookies of the user.You can get the login_cookie from /twitter/user_login_v2.Must be set"
                  },
                  "tweet_id": {
                    "type": "string",
                    "description": "The id of the tweet to unlike.Must be set"
                  },
                  "proxy": {
                    "type": "string",
                    "description": "The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port . You can get proxy from: https://www.webshare.io/?referral_code=4e0q1n00a504"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Login response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error"
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },


    "/twitter/delete_tweet_v2": {
      "post": {
        "description": "Delete a tweet.You must set the login_cookie.You can get the login_cookie from /twitter/user_login_v2.Trial operation price: $0.002 per call. ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["login_cookies","tweet_id","proxy"],
                
                "properties": {
                  "login_cookies": {
                    "type": "string",
                    "description": "The login cookies of the user.You can get the login_cookie from /twitter/user_login_v2.Must be set"
                  },
                  "tweet_id": {
                    "type": "string",
                    "description": "The id of the tweet to delete.Must be set"
                  },
                  "proxy": {
                    "type": "string",
                    "description": "The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port . You can get proxy from: https://www.webshare.io/?referral_code=4e0q1n00a504"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Login response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error"
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },


    "/twitter/retweet_tweet_v2": {
      "post": {
        "description": "Retweet a tweet.You must set the login_cookie.You can get the login_cookie from /twitter/user_login_v2.Trial operation price: $0.002 per call. ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["login_cookies","tweet_id","proxy"],
                
                "properties": {
                  "login_cookies": {
                    "type": "string",
                    "description": "The login cookies of the user.You can get the login_cookie from /twitter/user_login_v2.Must be set"
                  },
                  "tweet_id": {
                    "type": "string",
                    "description": "The id of the tweet to retweet.Must be set"
                  },
                  "proxy": {
                    "type": "string",
                    "description": "The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port . You can get proxy from: https://www.webshare.io/?referral_code=4e0q1n00a504"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Login response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error"
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },


    "/twitter/follow_user_v2": {
      "post": {
        "description": "Follow a user.You must set the login_cookie.You can get the login_cookie from /twitter/user_login_v2.Trial operation price: $0.002 per call. ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["login_cookies","user_id","proxy"],
                
                "properties": {
                  "login_cookies": {
                    "type": "string",
                    "description": "The login cookies of the user.You can get the login_cookie from /twitter/user_login_v2.Must be set"
                  },
                  "user_id": {
                    "type": "string",
                    "description": "The id of the user to follow.Must be set"
                  },
                  "proxy": {
                    "type": "string",
                    "description": "The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port . You can get proxy from: https://www.webshare.io/?referral_code=4e0q1n00a504"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Login response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error"
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },


    "/twitter/unfollow_user_v2": {
      "post": {
        "description": "Unfollow a user.You must set the login_cookie.You can get the login_cookie from /twitter/user_login_v2.Trial operation price: $0.002 per call. ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["login_cookies","user_id","proxy"],
                
                "properties": {
                  "login_cookies": {
                    "type": "string",
                    "description": "The login cookies of the user.You can get the login_cookie from /twitter/user_login_v2.Must be set"
                  },
                  "user_id": {
                    "type": "string",
                    "description": "The id of the user to unfollow.Must be set"
                  },
                  "proxy": {
                    "type": "string",
                    "description": "The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port . You can get proxy from: https://www.webshare.io/?referral_code=4e0q1n00a504"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Login response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error"
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },

    "/twitter/get_dm_history_by_user_id": {
      "get": {
        "description": "Get the direct message history with a user.",
        "parameters": [
          {
            "name": "login_cookies",
            "in": "query",
            "description": "The login cookies of the user.You can get the login_cookie from /twitter/user_login_v2.Must be set",
            "required": true,
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "name": "user_id",
            "in": "query",
            "description": "The id of the user to get the direct message history with.Must be set",
            "required": true,
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "name": "proxy",
            "in": "query",
            "description": "The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port . You can get proxy from: https://www.webshare.io/?referral_code=4e0q1n00a504",
            "schema": {
              "type": "string",
              "format": "string"
            }
          }

        ],
        "responses": {
          "200": {
            "description": "Messages response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "messages": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "ID of the message"
                              },
                              "recipient_id": {
                                "type": "string",
                                "description": "ID of the recipient user"
                              },
                              "sender_id": {
                                "type": "string",
                                "description": "ID of the sender user"
                              },
                              "text": {
                                "type": "string",
                                "description": "Content of the message"
                              },
                              "time": {
                                "type": "string",
                                "description": "Timestamp of the message in milliseconds (Unix epoch)"
                              }
                            }
                          },
                          "description": "Array of messages"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error"
                    },
                    "message": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },



    "/twitter/send_dm_to_user": {
      "post": {
        "description": "Send a direct message to a user.You must set the login_cookie..You can get the login_cookie from /twitter/user_login_v2.You can only send DMs to those who have enabled DMs. Sometimes it may fail, so be prepared to retry.Trial operation price: $0.003 per call. ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["login_cookies","user_id","text","proxy"],
                
                "properties": {
                  "login_cookies": {
                    "type": "string",
                    "description": "The login cookie of the user.You can get the login_cookies from /twitter/user_login_v2.Must be set"
                  },
                  "user_id": {
                    "type": "string",
                    "description": "The id of the user to send the direct message to.Must be set"
                  },
                  "text": {
                    "type": "string",
                    "description": "The text of the direct message.Must be set"
                  },
                  
                  "media_ids": {
                    "type": "array",
                    "description": "The ids of the media to post.Optional.You can get the media_ids from /twitter/upload_image_v2 (to be developed)"
                  },
                  "proxy": {
                    "type": "string",
                    "description": "The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port . You can get proxy from: https://www.webshare.io/?referral_code=4e0q1n00a504"
                  },
                  "reply_to_message_id":{
                    "type": "string",
                    "description": "The id of the message to reply to.Optional"
                  }

                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Login response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message_id": {
                      "type": "string",
                      "description": "The id of the sent direct message."
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error"
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },


    "/twitter/create_community_v2": {
      "post": {
        "description": "Create a community.You must set the login_cookies.You can get the login_cookies from /twitter/user_login_v2.Trial operation price: $0.003 per call. ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["login_cookies","name","description","proxy"],
                
                "properties": {
                  "login_cookies": {
                    "type": "string",
                    "description": "The login cookies of the user.You can get the login_cookies from /twitter/user_login_v2.Must be set"
                  },
                  "name": {
                    "type": "string",
                    "description": "The name of the community.Must be set"
                  },
                  "description": {
                    "type": "string",
                    "description": "The description of the community.Must be set"
                  },
                  
                  "proxy": {
                    "type": "string",
                    "description": "The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port . You can get proxy from: https://www.webshare.io/?referral_code=4e0q1n00a504"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Login response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "community_id": {
                      "type": "string",
                      "description": "The id of the created community."
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error"
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },

    "/twitter/delete_community_v2": {
      "post": {
        "description": "Delete a community.You must set the login_cookie.You can get the login_cookie from /twitter/user_login_v2.Trial operation price: $0.003 per call. ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["login_cookie","community_id","community_name","proxy"],
                
                "properties": {
                  "login_cookie": {
                    "type": "string",
                    "description": "The login cookie of the user.You can get the login_cookie from /twitter/user_login_v2.Must be set"
                  },
                  "community_id": {
                    "type": "string",
                    "description": "The id of the community to join.Must be set"
                  },
                  "community_name":{
                    "type": "string",
                    "description": "The name of the community to delete.Must be set"
                  },
                  
                  "proxy": {
                    "type": "string",
                    "description": "The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port . You can get proxy from: https://www.webshare.io/?referral_code=4e0q1n00a504"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Login response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error"
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },


    "/twitter/join_community_v2": {
      "post": {
        "description": "Join a community.You must set the login_cookie.You can get the login_cookie from /twitter/user_login_v2.Trial operation price: $0.003 per call. ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["login_cookie","community_id","proxy"],
                
                "properties": {
                  "login_cookie": {
                    "type": "string",
                    "description": "The login cookie of the user.You can get the login_cookie from /twitter/user_login_v2.Must be set"
                  },
                  "community_id": {
                    "type": "string",
                    "description": "The id of the community to join.Must be set"
                  },
                  
                  
                  "proxy": {
                    "type": "string",
                    "description": "The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port . You can get proxy from: https://www.webshare.io/?referral_code=4e0q1n00a504"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Login response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "community_id": {
                      "type": "string",
                      "description": "The id of the joined community."
                    },
                    "community_name":{
                      "type": "string",
                      "description": "The name of the joined community."
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error"
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },

    "/twitter/leave_community_v2": {
      "post": {
        "description": "Leave a community.You must set the login_cookie.You can get the login_cookie from /twitter/user_login_v2.Trial operation price: $0.003 per call. ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["login_cookie","community_id","proxy"],
                
                "properties": {
                  "login_cookie": {
                    "type": "string",
                    "description": "The login cookie of the user.You can get the login_cookie from /twitter/user_login_v2.Must be set"
                  },
                  "community_id": {
                    "type": "string",
                    "description": "The id of the community to leave.Must be set"
                  },
                  
                  
                  "proxy": {
                    "type": "string",
                    "description": "The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port . You can get proxy from: https://www.webshare.io/?referral_code=4e0q1n00a504"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Login response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "community_id": {
                      "type": "string",
                      "description": "The id of the joined community."
                    },
                    "community_name":{
                      "type": "string",
                      "description": "The name of the joined community."
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error"
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },

    




    "/plants/{id}": {
      "delete": {
        "description": "Deletes a single plant based on the ID supplied",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of plant to delete",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Plant deleted",
            "content": {}
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },


    "/oapi/tweet_filter/get_rules": {
      "get": {
        "description": "Get all tweet filter rules.Rule can be used in webhook and websocket.You can also modify the rule in our web page.",
        "responses": {
          "200": {
            "description": "Tweet filter rules response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rules": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TweetFilterRule"
                      },
                      "description": "Array of tweet filter rules"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "error"]
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  },
                  "required": ["rules", "status"]
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },

    "/oapi/x_user_stream/add_user_to_monitor_tweet": {
      "post": {
        "description": "Add a user to monitor real-time tweets.Monitor tweets from specified accounts, including directly sent tweets, quoted tweets, reply tweets, and retweeted tweets. Please ref:https://twitterapi.io/twitter-stream",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
            "schema": {
              "type": "object",
              "required": ["x_user_name"],
              "properties": {
                  "x_user_name": {
                    "type": "string",
                    "description": "The twitter(x) handle name to monitor.Must be set."
                  }
                  
              } 
            }
          }
        }
      },
        "responses": {
          "200": {
            "description": "Tweet filter rule add response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "error"]
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  },
                  "required": ["status", "msg"]
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },

    "/oapi/x_user_stream/remove_user_to_monitor_tweet": {
      "post": {
        "description": "Remove a user from monitor real-time tweets.Please ref:https://twitterapi.io/twitter-stream",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
            "schema": {
              "type": "object",
              "required": ["id_for_user"],
              "properties": {
                  "id_for_user": {
                    "type": "string",
                    "description": "Get it from get_user_to_monitor_tweet api (TBD)"
                  }
                  
              } 
            }
          }
        }
      },
        "responses": {
          "200": {
            "description": "x_user_stream remove user response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "error"]
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  },
                  "required": ["status", "msg"]
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },


    "/oapi/tweet_filter/add_rule": {
      "post": {
        "description": "Add a tweet filter rule. Default rule is not activated.You must call update_rule to activate the rule.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
            "schema": {
              "type": "object",
              "required": ["tag", "value", "interval_seconds"],
              "properties": {
                  "tag": {
                    "type": "string",
                    "description": "Custom tag to identify the rule.Must be set.Max length is 255"
                  },
                  "value": {
                    "type": "string",
                    "description": "Rule to filter tweets.eg \"from:elonmusk OR from:kaitoeasyapi\".Must be set.Max length is 255"
                  },
                  "interval_seconds": {
                    "type": "number",
                    "description": "Interval to check tweets.Must be set.Min value is 100.Max value is 86400 ()"
                  }
                }
              } 
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tweet filter rule add response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rule_id": {
                      "type": "string",
                      "description": "ID of the added rule"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "error"]
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  },
                  "required": ["rule_id", "status", "msg"]
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },


    "/oapi/tweet_filter/update_rule": {
      "post": {
        "description": "Update a tweet filter rule. You must set all parameters.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["rule_id", "tag", "value", "interval_seconds"],
                "properties": {
                  "rule_id": {
                  "type": "string",
                  "description": "ID of the rule to update.Must be set"
                  },
                  "tag": {
                    "type": "string",
                    "description": "Custom tag to identify the rule.Must be set.Max length is 255"
                  },
                  "value": {
                    "type": "string",
                    "description": "Rule to filter tweets.eg \"from:elonmusk OR from:kaitoeasyapi\".Must be set.Max length is 255"
                  },
                  "interval_seconds": {
                    "type": "number",
                    "description": "Interval to check tweets.Must be set.Min value is 0.1.Max value is 86400 ()"
                  },
                  "is_effect": {
                    "type": "integer",
                    "description": "Whether the rule is effective.Must be set.1 means effective, 0 means not effective.Default value is 0",
                    "enum": [0, 1]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tweet filter rule update response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "error"]
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  },
                  "required": ["rule_id", "status", "msg"]
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },

    "/oapi/tweet_filter/delete_rule": {
      "delete": {
        "description": "Delete a tweet filter rule. You must set all parameters.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": { 
                "type": "object",
                "properties": {
                  "rule_id": {
                    "type": "string",
                    "description": "ID of the rule to delete.Must be set"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tweet filter rule delete response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the request.success or error",
                      "enum": ["success", "error"]
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request.error message"
                    }
                  },
                  "required": ["status"]
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },



    "/twitter/community/info": {
      "get": {
        "description": "Get community info by community id. Price: 20 credits per call. Note: This API is a bit slow, we are still optimizing it.",
        "parameters": [
          {
            "name": "community_id",
            "in": "query",
            "description": "id of the community",
            "required": true,
            "schema": {
              "type": "string",
              "format": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Community info response",
            "content": {

              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "community_info": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "ID of the community"
                        },
                        "name": {
                          "type": "string",
                          "description": "Name of the community"
                        },
                        "description": {
                          "type": "string",
                          "description": "Description of the community"
                        },
                        "question": {
                          "type": "string",
                          "description": "Community question"
                        },
                        "member_count": {
                          "type": "integer",
                          "description": "Number of members in the community"
                        },
                        "moderator_count": {
                          "type": "integer",
                          "description": "Number of moderators in the community"
                        },
                        "created_at": {
                          "type": "string",
                          "description": "Creation date of the community"
                        },
                        "join_policy": {
                          "type": "string",
                          "description": "Join policy of the community"
                        },
                        "invites_policy": {
                          "type": "string",
                          "description": "Invites policy of the community"
                        },
                        "is_nsfw": {
                          "type": "boolean",
                          "description": "Whether the community is NSFW"
                        },
                        "is_pinned": {
                          "type": "boolean",
                          "description": "Whether the community is pinned"
                        },
                        "role": {
                          "type": "string",
                          "description": "User's role in the community"
                        },
                        "primary_topic": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "ID of the primary topic"
                            },
                            "name": {
                              "type": "string",
                              "description": "Name of the primary topic"
                            }
                          }
                        },
                        "banner_url": {
                          "type": "string",
                          "description": "URL of the community banner"
                        },
                        "search_tags": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Search tags for the community"
                        },
                        "rules": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "ID of the rule"
                              },
                              "name": {
                                "type": "string",
                                "description": "Name of the rule"
                              },
                              "description": {
                                "type": "string",
                                "description": "Description of the rule"
                              }
                            }
                          },
                          "description": "Community rules"
                        },
                        "creator": {
                          "$ref": "#/components/schemas/UserInfo"
                        },
                        "admin": {
                          "$ref": "#/components/schemas/UserInfo"
                        },
                        "members_preview": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "description": "Member information with same structure as creator"
                          },
                          "description": "Preview of community members"
                        }
                      }
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request: success or error",
                      "enum": ["success", "error"]
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request, error message if status is error"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },

    "/twitter/community/members": {
      "get": {
        "description": "Get members of a community. Page size is 20.",
        "parameters": [
          {
            "name": "community_id",
            "in": "query",
            "description": "id of the community",
            "required": true,
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "cursor of the page",
            "required": false,
            "schema": {
              "type": "string",
              "format": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Community members response",
            "content": {

              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "members": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UserInfo"
                      },
                      "description": "Members of the community"
                    },
                    "has_next_page": {
                      "type": "boolean",
                      "description": "Whether there is a next page"
                    },
                    "next_cursor": {
                      "type": "string",
                      "description": "Cursor of the next page"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request: success or error",
                      "enum": ["success", "error"]
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request, error message if status is error"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },

    "/twitter/community/moderators": {
      "get": {
        "description": "Get moderators of a community. Page size is 20.",
        "parameters": [
          {
            "name": "community_id",
            "in": "query",
            "description": "id of the community",
            "required": true,
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "cursor of the page",
            "required": false,
            "schema": {
              "type": "string",
              "format": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Community moderator response",
            "content": {

              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "members": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UserInfo"
                      },
                      "description": "Moderators of the community"
                    },
                    "has_next_page": {
                      "type": "boolean",
                      "description": "Whether there is a next page"
                    },
                    "next_cursor": {
                      "type": "string",
                      "description": "Cursor of the next page"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request: success or error",
                      "enum": ["success", "error"]
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request, error message if status is error"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },


    "/twitter/community/tweets": {
      "get": {
        "description": "Get tweets of a community. Page size is 20. Order by creation time desc. ",
        "parameters": [
          {
            "name": "community_id",
            "in": "query",
            "description": "id of the community",
            "required": true,
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "cursor of the page",
            "required": false,
            "schema": {
              "type": "string",
              "format": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Community info response",
            "content": {

              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tweets": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Tweet"
                      },
                      "description": "Tweets of the community"
                    },
                    "has_next_page": {
                      "type": "boolean",
                      "description": "Whether there is a next page"
                    },
                    "next_cursor": {
                      "type": "string",
                      "description": "Cursor of the next page"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request: success or error",
                      "enum": ["success", "error"]
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request, error message if status is error"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },


    "/twitter/list/members": {
      "get": {
        "description": "Get members of a list. Page size is 20.",
        "parameters": [
          {
            "name": "list_id",
            "in": "query",
            "description": "id of the list",
            "required": true,
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "name":"cursor",
            "in": "query",
            "description": "cursor of the page",
            "required": false,
            "schema": {
              "type": "string",
              "format": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List members response",
            "content": {

              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "members": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UserInfo"
                      },
                      "description": "Members of the list"
                    },
                    "has_next_page": {  
                      "type": "boolean",
                      "description": "Indicates if there are more results available"
                    },
                    "next_cursor": {
                      "type": "string",
                      "description": "Cursor for fetching the next page of results"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request: success or error",
                      "enum": ["success", "error"]
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request, error message if status is error"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },

    "/twitter/list/followers": {
      "get": {
        "description": "Get followers of a list. Page size is 20.",
        "parameters": [
          {
            "name": "list_id",
            "in": "query",
            "description": "id of the list",
            "required": true,
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "name":"cursor",
            "in": "query",
            "description": "cursor of the page",
            "required": false,
            "schema": {
              "type": "string",
              "format": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List followers of the list",
            "content": {

              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "followers": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UserInfo"
                      },
                      "description": "Members of the list"
                    },
                    "has_next_page": {
                      "type": "boolean",
                      "description": "Indicates if there are more results available"
                    },
                    "next_cursor": {
                      "type": "string",
                      "description": "Cursor for fetching the next page of results"
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the request: success or error",
                      "enum": ["success", "error"]
                    },
                    "msg": {
                      "type": "string",
                      "description": "Message of the request, error message if status is error"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },


    "/oapi/my/info": {
      "get": {
        "description": "Get my info",
        "responses": {
          "200": {
            "description": "My info response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "recharge_credits": {
                      "type": "integer",
                      "description": "Remaining credits"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }

  },


  "components": {
    "schemas": {
      "Plant": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "description": "The name of the plant",
            "type": "string"
          },
          "tag": {
            "description": "Tag to specify the type",
            "type": "string"
          }
        }
      },

      "UserInfo": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": ["user"]
          },
          "userName": {
            "type": "string",
            "description": "The username of the Twitter user"
          },
          "url": {
            "type": "string",
            "description": "The x.com URL of the user's profile"
          },
          "id": {
            "type": "string",
            "description": "The unique identifier of the user"
          },
          "name": {
            "type": "string",
            "description": "The display name of the user"
          },
          "isBlueVerified": {
            "type": "boolean",
            "description": "Whether the user has Twitter Blue verification"
          },
          "verifiedType": {
            "type": "string",
            "description": "The type of verification. eg. \"government\" ,can be empty"
          },
          "profilePicture": {
            "type": "string",
            "description": "URL of the user's profile picture"
          },
          "coverPicture": {
            "type": "string",
            "description": "URL of the user's cover picture"
          },
          "description": {
            "type": "string",
            "description": "The user's profile description"
          },
          "location": {
            "type": "string",
            "description": "The user's location.for example: 東京の端っこ . may be empty"
          },
          "followers": {
            "type": "integer",
            "description": "Number of followers"
          },
          "following": {
            "type": "integer",
            "description": "Number of accounts following"
          },
          "canDm": {
            "type": "boolean",
            "description": "Whether the user can receive DMs"
          },
          "createdAt": {
            "type": "string",
            "description": "When the account was created.for example: Thu Dec 13 08:41:26 +0000 2007"
          },
          "favouritesCount": {
            "type": "integer",
            "description": "Number of favorites"
          },
          "hasCustomTimelines": {
            "type": "boolean",
            "description": "Whether the user has custom timelines"
          },
          "isTranslator": {
            "type": "boolean",
            "description": "Whether the user is a translator"
          },
          "mediaCount": {
            "type": "integer",
            "description": "Number of media posts"
          },
          "statusesCount": {
            "type": "integer",
            "description": "Number of status updates"
          },
          "withheldInCountries": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Countries where the account is withheld"
          },
          "affiliatesHighlightedLabel": {
            "type": "object"
          },
          "possiblySensitive": {
            "type": "boolean",
            "description": "Whether the account may contain sensitive content"
          },
          "pinnedTweetIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of pinned tweets"
          },
          "isAutomated": {
            "type": "boolean",
            "description": "Whether the account is automated"
          },  
          "automatedBy": {
            "type": "string",
            "description": "The account that automated the account"
          },
          "unavailable": {
            "type": "boolean",
            "description": "Whether the account is unavailable"
          },
          "message": {
            "type": "string",
            "description": "The message of the account.eg. \"This account is unavailable\" or \"This account is suspended\""
          },
          "unavailableReason": {
            "type": "string",
            "description": "The reason the account is unavailable.eg. \"suspended\" "
          },
          "profile_bio": {
            "type": "object",
            "properties": {
              "description": {
                "type": "string"
              },
              "entities": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "object",
                    "properties": {
                      "urls": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "display_url": {
                              "type": "string"
                            },
                            "expanded_url": {
                              "type": "string"
                            },
                            "indices": {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            "url": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  },
                  "url": {
                    "type": "object",
                    "properties": {
                      "urls": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "display_url": {
                              "type": "string"
                            },
                            "expanded_url": {
                              "type": "string"
                            },
                            "indices": {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            "url": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },


      "UserAbout": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier of the user"
          },
          "name": {
            "type": "string",
            "description": "The display name of the user"
          },
          "userName": {
            "type": "string",
            "description": "The username (handle) of the user"
          },
          "createdAt": {
            "type": "string",
            "description": "When the account was created. Example: 2006-07-16T22:01:55.000000Z"
          },
          "isBlueVerified": {
            "type": "boolean",
            "description": "Whether the user has Twitter Blue verification"
          },
          "protected": {
            "type": "boolean",
            "description": "Whether the user's tweets are protected"
          },
          "affiliates_highlighted_label": {
            "type": "object",
            "description": "Highlighted business/affiliate label (e.g., OpenAI badge)",
            "properties": {
              "label": {
                "type": "object",
                "properties": {
                  "badge": {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string",
                        "description": "Badge image URL"
                      }
                    }
                  },
                  "description": {
                    "type": "string",
                    "description": "Label text, e.g. organization name"
                  },
                  "url": {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string",
                        "description": "Deep link to the organization profile"
                      },
                      "urlType": {
                        "type": "string",
                        "description": "Type of link, e.g. DeepLink"
                      }
                    }
                  },
                  "userLabelDisplayType": {
                    "type": "string",
                    "description": "Display type of the label, e.g. Badge"
                  },
                  "userLabelType": {
                    "type": "string",
                    "description": "Type of label, e.g. BusinessLabel"
                  }
                }
              }
            }
          },
          "about_profile": {
            "type": "object",
            "description": "New Twitter/X 'About' section information for the account",
            "properties": {
              "account_based_in": {
                "type": "string",
                "description": "Account-based-in country/region, e.g. 'United States'"
              },
              "location_accurate": {
                "type": "boolean",
                "description": "Whether the location is accurate"
              },
              "learn_more_url": {
                "type": "string",
                "description": "URL for more information about verified accounts or about section"
              },
              "affiliate_username": {
                "type": "string",
                "description": "Affiliate username, e.g. organization account handle"
              },
              "source": {
                "type": "string",
                "description": "Source of the about information, e.g. 'Web'"
              },
              "username_changes": {
                "type": "object",
                "description": "Information about username change history",
                "properties": {
                  "count": {
                    "type": "string",
                    "description": "Number of username changes"
                  }
                }
              }
            }
          },
          "identity_profile_labels_highlighted_label": {
            "type": "object",
            "description": "Highlighted identity/business label information (similar to affiliates_highlighted_label)",
            "properties": {
              "label": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "description": "Label text, e.g. 'OpenAI'"
                  },
                  "badge": {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string",
                        "description": "Badge image URL"
                      }
                    }
                  },
                  "url": {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string",
                        "description": "Deep link to the organization profile"
                      },
                      "urlType": {
                        "type": "string",
                        "description": "Type of link, e.g. DeepLink"
                      }
                    }
                  },
                  "userLabelDisplayType": {
                    "type": "string",
                    "description": "Display type of the label, e.g. Badge"
                  },
                  "userLabelType": {
                    "type": "string",
                    "description": "Type of label, e.g. BusinessLabel"
                  }
                }
              }
            }
          }
        }
      },

      
      "SpacesDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Space ID"
          },
          "title": {
            "type": "string",
            "description": "Title of the Space"
          },
          "state": {
            "type": "string",
            "description": "State of the Space, e.g. NotStarted/Live/Ended"
          },
          "created_at": {
            "type": "string",
            "description": "When the Space was created. Example: 2025-12-13T05:54:20.327000Z"
          },
          "scheduled_start": {
            "type": "string",
            "description": "Scheduled start time of the Space"
          },
          "updated_at": {
            "type": "string",
            "description": "When the Space was last updated"
          },
          "media_key": {
            "type": "string",
            "description": "Media key associated with the Space"
          },
          "is_subscribed": {
            "type": "boolean",
            "description": "Whether the current user is subscribed to the Space"
          },
          "settings": {
            "type": "object",
            "description": "Settings of the Space",
            "properties": {
              "conversation_controls": {
                "type": "integer",
                "description": "Conversation control type"
              },
              "disallow_join": {
                "type": "boolean",
                "description": "Whether users are disallowed from joining"
              },
              "is_employee_only": {
                "type": "boolean",
                "description": "Whether only employees can join"
              },
              "is_locked": {
                "type": "boolean",
                "description": "Whether the Space is locked"
              },
              "is_muted": {
                "type": "boolean",
                "description": "Whether the Space is muted"
              },
              "is_space_available_for_clipping": {
                "type": "boolean",
                "description": "Whether the Space is available for clipping"
              },
              "is_space_available_for_replay": {
                "type": "boolean",
                "description": "Whether the Space is available for replay"
              },
              "no_incognito": {
                "type": "boolean",
                "description": "Whether incognito mode is disabled"
              },
              "narrow_cast_space_type": {
                "type": "integer",
                "description": "Narrow cast space type"
              },
              "max_guest_sessions": {
                "type": "integer",
                "description": "Maximum number of guest sessions allowed"
              },
              "max_admin_capacity": {
                "type": "integer",
                "description": "Maximum number of admins allowed"
              }
            }
          },
          "stats": {
            "type": "object",
            "description": "Statistics of the Space",
            "properties": {
              "total_replay_watched": {
                "type": "integer",
                "description": "Total number of replay views"
              },
              "total_live_listeners": {
                "type": "integer",
                "description": "Total number of live listeners"
              },
              "total_participants": {
                "type": "integer",
                "description": "Total number of participants"
              }
            }
          },
          "creator": {
            "type": "object",
            "description": "Creator of the Space",
            "properties": {
              "id": {
                "type": "string",
                "description": "User ID of the creator"
              },
              "name": {
                "type": "string",
                "description": "Display name of the creator"
              },
              "userName": {
                "type": "string",
                "description": "Username (handle) of the creator"
              },
              "location": {
                "type": "string",
                "description": "Location of the creator"
              },
              "url": {
                "type": "string",
                "description": "URL in creator profile, may be null"
              },
              "description": {
                "type": "string",
                "description": "Profile description of the creator"
              },
              "protected": {
                "type": "boolean",
                "description": "Whether the creator's tweets are protected"
              },
              "isVerified": {
                "type": "boolean",
                "description": "Whether the creator is legacy verified"
              },
              "isBlueVerified": {
                "type": "boolean",
                "description": "Whether the creator has Twitter Blue verification"
              },
              "verifiedType": {
                "type": "string",
                "description": "Type of verification, may be null"
              },
              "followers": {
                "type": "integer",
                "description": "Number of followers"
              },
              "following": {
                "type": "integer",
                "description": "Number of following"
              },
              "favouritesCount": {
                "type": "integer",
                "description": "Number of favorites"
              },
              "statusesCount": {
                "type": "integer",
                "description": "Number of status updates"
              },
              "mediaCount": {
                "type": "integer",
                "description": "Number of media posts"
              },
              "createdAt": {
                "type": "string",
                "description": "When the creator account was created"
              },
              "coverPicture": {
                "type": "string",
                "description": "URL of the cover picture"
              },
              "profilePicture": {
                "type": "string",
                "description": "URL of the profile picture"
              },
              "canDm": {
                "type": "boolean",
                "description": "Whether the creator can receive DMs"
              },
              "affiliatesHighlightedLabel": {
                "type": "object",
                "description": "Affiliate label information, may be empty object"
              },
              "isAutomated": {
                "type": "boolean",
                "description": "Whether the account is automated"
              },
              "automatedBy": {
                "type": "string",
                "description": "The account that automated this account, if any"
              }
            }
          },
          "participants": {
            "type": "object",
            "description": "Participants of the Space grouped by role",
            "properties": {
              "admins": {
                "type": "array",
                "items": {
                  "type": "object",
                  "description": "Admin participant",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "User ID of the participant, may be null"
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name of the participant"
                    },
                    "userName": {
                      "type": "string",
                      "description": "Username (handle) of the participant"
                    },
                    "location": {
                      "type": "string",
                      "description": "Location of the participant, may be null"
                    },
                    "url": {
                      "type": "string",
                      "description": "URL in participant profile, may be null"
                    },
                    "description": {
                      "type": "string",
                      "description": "Profile description, may be null"
                    },
                    "protected": {
                      "type": "boolean",
                      "description": "Whether the participant's tweets are protected"
                    },
                    "isVerified": {
                      "type": "boolean",
                      "description": "Whether the participant is legacy verified"
                    },
                    "isBlueVerified": {
                      "type": "boolean",
                      "description": "Whether the participant has Twitter Blue verification"
                    },
                    "verifiedType": {
                      "type": "string",
                      "description": "Type of verification, may be null"
                    },
                    "followers": {
                      "type": "integer",
                      "description": "Number of followers"
                    },
                    "following": {
                      "type": "integer",
                      "description": "Number of following"
                    },
                    "favouritesCount": {
                      "type": "integer",
                      "description": "Number of favorites"
                    },
                    "statusesCount": {
                      "type": "integer",
                      "description": "Number of status updates"
                    },
                    "mediaCount": {
                      "type": "integer",
                      "description": "Number of media posts"
                    },
                    "createdAt": {
                      "type": "string",
                      "description": "When the participant account was created, may be null"
                    },
                    "coverPicture": {
                      "type": "string",
                      "description": "URL of the cover picture, may be null"
                    },
                    "profilePicture": {
                      "type": "string",
                      "description": "URL of the profile picture"
                    },
                    "canDm": {
                      "type": "boolean",
                      "description": "Whether the participant can receive DMs"
                    },
                    "affiliatesHighlightedLabel": {
                      "type": "object",
                      "description": "Affiliate label information, may be empty object"
                    },
                    "isAutomated": {
                      "type": "boolean",
                      "description": "Whether the account is automated"
                    },
                    "automatedBy": {
                      "type": "string",
                      "description": "The account that automated this account, if any"
                    },
                    "participant_info": {
                      "type": "object",
                      "description": "Space-specific participant information",
                      "properties": {
                        "periscope_user_id": {
                          "type": "string",
                          "description": "Periscope user ID of the participant"
                        },
                        "start_time": {
                          "type": "string",
                          "description": "When this participant joined the Space"
                        },
                        "is_muted_by_admin": {
                          "type": "boolean",
                          "description": "Whether the participant is muted by an admin"
                        },
                        "is_muted_by_guest": {
                          "type": "boolean",
                          "description": "Whether the participant is muted by themselves"
                        }
                      }
                    }
                  }
                }
              },
              "speakers": {
                "type": "array",
                "description": "Speaker participants (same structure as admins)",
                "items": {
                  "type": "object",
                  "description": "Admin participant",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "User ID of the participant, may be null"
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name of the participant"
                    },
                    "userName": {
                      "type": "string",
                      "description": "Username (handle) of the participant"
                    }
                  }
                }
              },
              "listeners": {
                "type": "array",
                "description": "Listener participants (same structure as admins)",
                "items": {
                  "type": "object",
                  "description": "Listener participant",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "User ID of the participant, may be null"
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name of the participant"
                    }
                  }
                }
              }
            }
          }
        }
      },


      "Trend": {
        "type": "object",
        "properties": {
         
          "name": {
            "type": "string",
            "description": "The name of the trend"
          },
          "target": {
            "type": "object",
            "properties": {
              "query": {
                "type": "string",
                "description": "The query of the target. eg. \"#elonmusk\""
              }
            }
          },
          "rank": {
            "type": "integer",
            "description": "The rank of the trend"
          },  
          "meta_description": {
            "type": "string",
            "description": "The meta description of the trend.eg. \"17.7K posts\".may be empty."
          }
        }
      },

      "Tweet": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": ["tweet"]
          },
          "id": {
            "type": "string",
            "description": "The ID of the tweet"
          },
          "url": {
            "type": "string",
            "description": "The URL of the tweet"
          },
          "text": {
            "type": "string",
            "description": "The text of the tweet"
          },
          "source": {
            "type": "string",
            "description": "The source of the tweet.eg. \"Twitter for iPhone\""
          },
          "retweetCount": {
            "type": "integer",
            "description": "The number of times the tweet has been retweeted"
          },
          "replyCount": {
            "type": "integer",
            "description": "The number of times the tweet has been replied to"
          },
          "likeCount": {
            "type": "integer",
            "description": "The number of times the tweet has been liked"
          },
          "quoteCount": {
            "type": "integer",
            "description": "The number of times the tweet has been quoted"
          },
          "viewCount": {
            "type": "integer",
            "description": "The number of times the tweet has been viewed"
          },
          "createdAt": {
            "type": "string",
            "description": "The date and time the tweet was created.eg. Tue Dec 10 07:00:30 +0000 2024"
          },
          "lang": {
            "type": "string",
            "description": "The language of the tweet.eg. \"en\".may be empty"
          },
          "bookmarkCount": {
            "type": "integer",
            "description": "The number of times the tweet has been bookmarked"
          },
          "isReply": {
            "type": "boolean",
            "description": "Indicates if the tweet is a reply"
          },
          "inReplyToId": {
            "type": "string",
            "description": "The ID of the tweet being replied to.may be empty"
          },
          "conversationId": {
            "type": "string",
            "description": "The ID of the conversation the tweet is part of.may be empty"
          },
          "displayTextRange": {
            "type": "array",
            "description": "specifies the UTF-16 code unit indices in full_text that define the visible portion of a Tweet.eg\"@jack Thanks for the update!\",display_text_range is [6, 28]",
            "items": {
              "type": "integer"
            }
          },
          "inReplyToUserId": {
            "type": "string",
            "description": "The ID of the user being replied to.may be empty"
          },
          "inReplyToUsername": {
            "type": "string",
            "description": "The username of the user being replied to.may be empty"
          },
          "author": {
            "$ref": "#/components/schemas/UserInfo",
            "description": "The user who posted the tweet"
          },
          "entities": {
            "$ref": "#/components/schemas/TweetEntities",
            "description": "The entities in the tweet.eg. hashtags,urls,mentions"
          },
          "quoted_tweet": {
            "$ref": "#/components/schemas/Tweet",
            "description": "The tweet being quoted.may be null"
          },
          "retweeted_tweet": {
            "$ref": "#/components/schemas/Tweet",
            "description": "The tweet being retweeted.may be null"
          },
          "isLimitedReply": {
            "type": "boolean",
            "description": "Whether the tweet is a limited reply. Possible restrictions: only mentioned users, verified users, or followed accounts can reply"
          }
        }
      },
      "TweetEntities": {
        "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",
                  "description": "The ID of the user being mentioned"
                },
                "name": {
                  "type": "string",
                  "description": "The name of the user being mentioned"
                },
                "screen_name": {
                  "type": "string",
                  "description": "The screen name of the user being mentioned"
                }
              }
            }
          }
        }
      },
      "NewPlant": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Plant"
          },
          {
            "required": [
              "id"
            ],
            "type": "object",
            "properties": {
              "id": {
                "description": "Identification number of the plant",
                "type": "integer",
                "format": "int64"
              }
            }
          }
        ]
      },


      "TweetFilterRule": {
        "type": "object",
        "properties": {
          "rule_id": {
            "type": "string",
            "description": "ID of the rule"
          },
          "tag": {
            "type": "string",
            "description": "Custom tag to identify the rule.Max length is 255"
          },
          "value": {
            "type": "string",
            "description": "Rule to filter tweets.eg \"from:elonmusk OR from:kaitoeasyapi\".Max length is 255"
          },
          "interval_seconds": {
            "type": "number",
            "description": "Interval to check tweets.Min value is 100.Max value is 86400"
          }
        }
      },

     


      "Error": {
        "required": [
          "error",
          "message"
        ],
        "type": "object",
        "properties": {
          "error": {
            "type": "integer",
            "format": "int32"
          },
          "message": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  }
}