TwitterAPI.io Oapi API

The Oapi API from TwitterAPI.io — 8 operation(s) for oapi.

Operations 8

GET /oapi/tweet_filter/get_rules Get oapi tweet filter get rules #
POST /oapi/x_user_stream/add_user_to_monitor_tweet Create oapi x user stream add user to monitor tweet #
POST /oapi/x_user_stream/remove_user_to_monitor_tweet Create oapi x user stream remove user to monitor tweet #
GET /oapi/x_user_stream/get_user_to_monitor_tweet Get oapi x user stream get user to monitor tweet #
POST /oapi/tweet_filter/add_rule Create oapi tweet filter add rule #
POST /oapi/tweet_filter/update_rule Create oapi tweet filter update rule #
DELETE /oapi/tweet_filter/delete_rule Delete oapi tweet filter delete rule #
GET /oapi/my/info Get oapi my info #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/twitterapi-io:twitterapi-io-oapi-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

twitterapi-io-oapi-api-openapi.yml Raw ↑
openapi: 3.2.0
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: []
tags:
- name: Oapi
paths:
  /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'
      tags:
      - Oapi
      summary: Get oapi tweet filter get rules
      x-summary-source: derived
      operationId: getOapiTweetFilterGetRules
      x-operation-id-source: derived
  /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'
      tags:
      - Oapi
      summary: Create oapi x user stream add user to monitor tweet
      x-summary-source: derived
      operationId: postOapiXUserStreamAddUserToMonitorTweet
      x-operation-id-source: derived
  /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
      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'
      tags:
      - Oapi
      summary: Create oapi x user stream remove user to monitor tweet
      x-summary-source: derived
      operationId: postOapiXUserStreamRemoveUserToMonitorTweet
      x-operation-id-source: derived
  /oapi/x_user_stream/get_user_to_monitor_tweet:
    get:
      description: Get the list of users being monitored for real-time tweets. Returns all users that have been added for tweet monitoring. Please ref:https://twitterapi.io/twitter-stream
      responses:
        '200':
          description: List of monitored users
          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
                  data:
                    type: array
                    description: List of monitored users
                    items:
                      type: object
                      properties:
                        id_for_user:
                          type: string
                          description: Unique identifier for this monitoring entry. Use this ID to remove the user from monitoring.
                        x_user_id:
                          type: integer
                          description: Twitter user ID
                        x_user_name:
                          type: string
                          description: Twitter display name
                        x_user_screen_name:
                          type: string
                          description: Twitter handle/screen name
                        is_monitor_tweet:
                          type: integer
                          description: Whether tweet monitoring is enabled (1=yes, 0=no)
                        is_monitor_profile:
                          type: integer
                          description: Whether profile monitoring is enabled (1=yes, 0=no)
                        monitor_tweet_config_status:
                          type: integer
                          description: Tweet monitoring configuration status
                        monitor_profile_config_status:
                          type: integer
                          description: Profile monitoring configuration status
                        created_at:
                          type: string
                          description: When the monitoring was created
                required:
                - status
                - msg
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Oapi
      summary: Get oapi x user stream get user to monitor tweet
      x-summary-source: derived
      operationId: getOapiXUserStreamGetUserToMonitorTweet
      x-operation-id-source: derived
  /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 (in seconds) to check tweets. Min 0.05, max 86400 (24h). Default 60 if omitted.
      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'
      tags:
      - Oapi
      summary: Create oapi tweet filter add rule
      x-summary-source: derived
      operationId: postOapiTweetFilterAddRule
      x-operation-id-source: derived
  /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'
      tags:
      - Oapi
      summary: Create oapi tweet filter update rule
      x-summary-source: derived
      operationId: postOapiTweetFilterUpdateRule
      x-operation-id-source: derived
  /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'
      tags:
      - Oapi
      summary: Delete oapi tweet filter delete rule
      x-summary-source: derived
      operationId: deleteOapiTweetFilterDeleteRule
      x-operation-id-source: derived
  /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'
      tags:
      - Oapi
      summary: Get oapi my info
      x-summary-source: derived
      operationId: getOapiMyInfo
      x-operation-id-source: derived
components:
  schemas:
    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