# Twitter 帖子搜索 v2

Search public Twitter posts with a full business response and returned-item pricing.

ID: native-http:social.twitter.post.search.v2 · Region: cn · Status: available

catalog_version: 5c920c774a55e44d7e8c709143b88a18b8b2afcef91a5d19a8c9ae5d565d9077
updated_at: 2026-10-21T12:06:16.523771+00:00

Search public Twitter posts with a full business response and returned-item pricing.

历史数据以数据集发布版本定义覆盖周期；实时读取反映请求时资料，不保证覆盖全部记录。

Docs: https://docs.asklear.cn/capabilities/native-http%3Asocial.twitter.post.search.v2

## POST /v2/native/social/twitter/posts/search

native · available · api_key

REST 需要客户 API Key；MCP 需要已开放的服务及现有授权；CLI 需要已发布且包含该命令的客户端。

Search public Twitter posts with a full business response and returned-item pricing.

按实际返回帖子数计费：ceil(0.336 × 帖子数) Credits；成功空结果为 0。费用受批准报价及 max_credits 限制。

恢复同一次原生请求时复用原 Idempotency-Key。

等待态响应提供结果/状态引用。先读取原结果；超时或结果不明时禁止自动重新提交付费执行。401/403/422 应先修正鉴权、权限或输入。

### Input schema / 输入契约

```json
{
  "$defs": {
    "Schema1": {}
  },
  "additionalProperties": false,
  "properties": {
    "input": {
      "additionalProperties": false,
      "properties": {
        "cursor": {
          "description": "Copy next_cursor from the prior page, using the same query/type / 使用上一页 next_cursor，并保持 query/type 一致",
          "maxLength": 8192,
          "minLength": 1,
          "pattern": "^[\\x20-\\x7e]+$",
          "type": "string"
        },
        "query": {
          "description": "Search expression, including date/time operators when needed / 搜索表达式，可包含日期及时间运算符",
          "maxLength": 500,
          "minLength": 1,
          "type": "string"
        },
        "type": {
          "default": "Latest",
          "description": "Latest or Top; default Latest / 排序方式，默认 Latest",
          "enum": [
            "Latest",
            "Top"
          ],
          "type": "string"
        }
      },
      "required": [
        "query"
      ],
      "type": "object"
    },
    "max_credits": {
      "anyOf": [
        {
          "maximum": 1000000000,
          "minimum": 0,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "task_query": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional task attribution: when provided, write one concise, self-contained task_query in the user's language and reuse that exact value in every call for the task, including discovery, search, approval retry, results, export, and status checks. For MCP calls, when omitted, Asklear records a generic non-user-specific attribution so compatible clients can still call the tool. REST calls may omit it and remain unattributed. It is a task description, not a task identifier. Do not include hidden reasoning, credentials, or direct personal identifiers such as phone numbers, email addresses, identity numbers, or street addresses.",
          "maxLength": 300
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}
```

### Synthetic request / 合成请求

```json
{
  "input": {
    "query": "example"
  }
}
```

### Response schema / 响应契约

```json
{
  "$defs": {
    "Schema1": {},
    "Schema2": {
      "properties": {
        "api_name": {
          "type": "string"
        },
        "credits_charged": {
          "minimum": 0,
          "type": "integer"
        },
        "latency_ms": {
          "minimum": 0,
          "type": "integer"
        },
        "next_input": {
          "anyOf": [
            {
              "additionalProperties": false,
              "properties": {
                "cursor": {
                  "maxLength": 8192,
                  "minLength": 1,
                  "pattern": "^[\\x20-\\x7e]+$",
                  "type": "string"
                },
                "query": {
                  "maxLength": 500,
                  "minLength": 1,
                  "type": "string"
                },
                "type": {
                  "default": "Latest",
                  "enum": [
                    "Latest",
                    "Top"
                  ],
                  "type": "string"
                }
              },
              "required": [
                "query"
              ],
              "type": "object"
            },
            {
              "type": "null"
            }
          ]
        },
        "request_id": {
          "type": "string"
        }
      },
      "required": [
        "api_name",
        "request_id",
        "latency_ms",
        "credits_charged",
        "next_input"
      ],
      "type": "object"
    }
  },
  "properties": {
    "data": {
      "additionalProperties": true,
      "description": "Known optional fields from sanitized offline fixtures; conditional fields may be null. Additional business fields are retained.",
      "properties": {
        "next_cursor": {
          "maxLength": 8192,
          "minLength": 1,
          "pattern": "^[\\x20-\\x7e]+$",
          "type": [
            "string",
            "null"
          ]
        },
        "tweets": {
          "items": {
            "additionalProperties": true,
            "properties": {
              "bookmark_count": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "community_id_str": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "community_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "entities": {
                "additionalProperties": true,
                "properties": {
                  "hashtags": {
                    "items": {
                      "additionalProperties": true,
                      "properties": {
                        "indices": {
                          "items": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "text": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "media": {
                    "items": {
                      "additionalProperties": true,
                      "properties": {
                        "height": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "indices": {
                          "items": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "media_url_https": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "width": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "symbols": {
                    "items": {
                      "additionalProperties": true,
                      "properties": {
                        "indices": {
                          "items": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "text": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "urls": {
                    "items": {
                      "additionalProperties": true,
                      "properties": {
                        "display_url": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "expanded_url": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "indices": {
                          "items": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "url": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "user_mentions": {
                    "items": {
                      "additionalProperties": true,
                      "properties": {
                        "id_str": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "indices": {
                          "items": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "screen_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  }
                },
                "type": [
                  "object",
                  "null"
                ]
              },
              "favorite_count": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "full_text": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id_str": {
                "pattern": "^[0-9]+$",
                "type": "string"
              },
              "in_reply_to_screen_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "in_reply_to_user_id_str": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_pinned": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "is_quote_status": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "lang": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "quote_count": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "quoted_status": {
                "additionalProperties": true,
                "properties": {
                  "full_text": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "id_str": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "user": {
                    "additionalProperties": true,
                    "properties": {
                      "id_str": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "screen_name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "type": [
                      "object",
                      "null"
                    ]
                  }
                },
                "type": [
                  "object",
                  "null"
                ]
              },
              "quoted_status_id_str": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reply_count": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "retweet_count": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "retweeted_status": {
                "additionalProperties": true,
                "properties": {
                  "full_text": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "id_str": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "user": {
                    "additionalProperties": true,
                    "properties": {
                      "id_str": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "screen_name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "type": [
                      "object",
                      "null"
                    ]
                  }
                },
                "type": [
                  "object",
                  "null"
                ]
              },
              "source": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "text": {
                "description": "Observed as null; the non-null type is not established."
              },
              "truncated": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "tweet_created_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "user": {
                "additionalProperties": true,
                "properties": {
                  "can_dm": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "created_at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "followers_count": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "friends_count": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "id_str": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "location": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "profile_banner_url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "profile_image_url_https": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "screen_name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "verified": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  }
                },
                "type": [
                  "object",
                  "null"
                ]
              },
              "views_count": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "maxItems": 100,
          "type": "array"
        }
      },
      "required": [
        "tweets"
      ],
      "type": "object"
    },
    "meta": {
      "$ref": "#/$defs/Schema2"
    }
  },
  "required": [
    "data",
    "meta"
  ],
  "type": "object"
}
```

### Synthetic response / 合成响应

```json
{
  "data": {
    "next_cursor": "fixture-next",
    "tweets": [
      {
        "bookmark_count": 19,
        "community_id_str": "33",
        "community_name": "Robotics",
        "entities": {
          "hashtags": [
            {
              "indices": [
                30
              ],
              "text": "robotics"
            }
          ],
          "media": [
            {
              "height": 480,
              "indices": [
                45
              ],
              "media_url_https": "https://pbs.twimg.com/media/x.jpg",
              "type": "photo",
              "width": 640
            }
          ],
          "symbols": [
            {
              "indices": [
                40
              ],
              "text": "ROB"
            }
          ],
          "urls": [
            {
              "display_url": "example.com/post",
              "expanded_url": "https://example.com/post",
              "indices": [
                6
              ],
              "url": "https://t.co/x"
            }
          ],
          "user_mentions": [
            {
              "id_str": "99",
              "indices": [
                0
              ],
              "name": "Reply User",
              "screen_name": "reply_user"
            }
          ]
        },
        "favorite_count": 977,
        "full_text": "fixture full text",
        "id_str": "1734810168053956719",
        "in_reply_to_screen_name": "reply_user",
        "in_reply_to_user_id_str": "99",
        "is_pinned": true,
        "is_quote_status": true,
        "lang": "en",
        "quote_count": 11,
        "quoted_status": {
          "full_text": "quoted text",
          "id_str": "22",
          "user": {
            "id_str": "23",
            "name": "Quoted",
            "screen_name": "quoted"
          }
        },
        "quoted_status_id_str": "22",
        "reply_count": 156,
        "retweet_count": 78,
        "retweeted_status": {
          "full_text": "retweeted text",
          "id_str": "44",
          "user": {
            "id_str": "45",
            "name": "Retweeted",
            "screen_name": "retweeted"
          }
        },
        "source": "Twitter for iPhone",
        "text": null,
        "truncated": false,
        "tweet_created_at": "2023-12-13T05:39:09.000000Z",
        "user": {
          "can_dm": false,
          "created_at": "2009-06-02T20:12:29.000000Z",
          "description": "public bio",
          "followers_count": 10,
          "friends_count": 11,
          "id_str": "44196397",
          "location": "Mars",
          "name": "Elon Musk",
          "profile_banner_url": "https://pbs.twimg.com/banner.jpg",
          "profile_image_url_https": "https://pbs.twimg.com/profile.jpg",
          "screen_name": "elonmusk",
          "url": "https://example.com/elon",
          "verified": true
        },
        "views_count": 32377
      }
    ]
  },
  "meta": {
    "api_name": "social.twitter.post.search.v2",
    "credits_charged": 1,
    "latency_ms": 12,
    "next_input": null,
    "request_id": "asklear-example"
  }
}
```

- data (object): Known optional fields from sanitized offline fixtures; conditional fields may be null. Additional business fields are retained.
- data.next_cursor (string|null): 暂无字段说明
- data.tweets (array): 暂无字段说明
- meta (object): 暂无字段说明
- meta.api_name (string): 暂无字段说明
- meta.request_id (string): 暂无字段说明
- meta.latency_ms (integer): 暂无字段说明
- meta.credits_charged (integer): 暂无字段说明
- meta.next_input (scalar): 暂无字段说明
- data.tweets[].bookmark_count (integer|null): 暂无字段说明
- data.tweets[].community_id_str (string|null): 暂无字段说明
- data.tweets[].community_name (string|null): 暂无字段说明
- data.tweets[].entities (object|null): 暂无字段说明
- data.tweets[].entities.hashtags (array|null): 暂无字段说明
- data.tweets[].entities.hashtags[].indices (array|null): 暂无字段说明
- data.tweets[].entities.hashtags[].text (string|null): 暂无字段说明
- data.tweets[].entities.media (array|null): 暂无字段说明
- data.tweets[].entities.media[].height (integer|null): 暂无字段说明
- data.tweets[].entities.media[].indices (array|null): 暂无字段说明
- data.tweets[].entities.media[].media_url_https (string|null): 暂无字段说明
- data.tweets[].entities.media[].type (string|null): 暂无字段说明
- data.tweets[].entities.media[].width (integer|null): 暂无字段说明
- data.tweets[].entities.symbols (array|null): 暂无字段说明
- data.tweets[].entities.symbols[].indices (array|null): 暂无字段说明
- data.tweets[].entities.symbols[].text (string|null): 暂无字段说明
- data.tweets[].entities.urls (array|null): 暂无字段说明
- data.tweets[].entities.urls[].display_url (string|null): 暂无字段说明
- data.tweets[].entities.urls[].expanded_url (string|null): 暂无字段说明
- data.tweets[].entities.urls[].indices (array|null): 暂无字段说明
- data.tweets[].entities.urls[].url (string|null): 暂无字段说明
- data.tweets[].entities.user_mentions (array|null): 暂无字段说明
- data.tweets[].entities.user_mentions[].id_str (string|null): 暂无字段说明
- data.tweets[].entities.user_mentions[].indices (array|null): 暂无字段说明
- data.tweets[].entities.user_mentions[].name (string|null): 暂无字段说明
- data.tweets[].entities.user_mentions[].screen_name (string|null): 暂无字段说明
- data.tweets[].favorite_count (integer|null): 暂无字段说明
- data.tweets[].full_text (string|null): 暂无字段说明
- data.tweets[].id_str (string): 暂无字段说明
- data.tweets[].in_reply_to_screen_name (string|null): 暂无字段说明
- data.tweets[].in_reply_to_user_id_str (string|null): 暂无字段说明
- data.tweets[].is_pinned (boolean|null): 暂无字段说明
- data.tweets[].is_quote_status (boolean|null): 暂无字段说明
- data.tweets[].lang (string|null): 暂无字段说明
- data.tweets[].quote_count (integer|null): 暂无字段说明
- data.tweets[].quoted_status (object|null): 暂无字段说明
- data.tweets[].quoted_status.full_text (string|null): 暂无字段说明
- data.tweets[].quoted_status.id_str (string|null): 暂无字段说明
- data.tweets[].quoted_status.user (object|null): 暂无字段说明
- data.tweets[].quoted_status.user.id_str (string|null): 暂无字段说明
- data.tweets[].quoted_status.user.name (string|null): 暂无字段说明
- data.tweets[].quoted_status.user.screen_name (string|null): 暂无字段说明
- data.tweets[].quoted_status_id_str (string|null): 暂无字段说明
- data.tweets[].reply_count (integer|null): 暂无字段说明
- data.tweets[].retweet_count (integer|null): 暂无字段说明
- data.tweets[].retweeted_status (object|null): 暂无字段说明
- data.tweets[].retweeted_status.full_text (string|null): 暂无字段说明
- data.tweets[].retweeted_status.id_str (string|null): 暂无字段说明
- data.tweets[].retweeted_status.user (object|null): 暂无字段说明
- data.tweets[].retweeted_status.user.id_str (string|null): 暂无字段说明
- data.tweets[].retweeted_status.user.name (string|null): 暂无字段说明
- data.tweets[].retweeted_status.user.screen_name (string|null): 暂无字段说明
- data.tweets[].source (string|null): 暂无字段说明
- data.tweets[].text (scalar): Observed as null; the non-null type is not established.
- data.tweets[].truncated (boolean|null): 暂无字段说明
- data.tweets[].tweet_created_at (string|null): 暂无字段说明
- data.tweets[].user (object|null): 暂无字段说明
- data.tweets[].user.can_dm (boolean|null): 暂无字段说明
- data.tweets[].user.created_at (string|null): 暂无字段说明
- data.tweets[].user.description (string|null): 暂无字段说明
- data.tweets[].user.followers_count (integer|null): 暂无字段说明
- data.tweets[].user.friends_count (integer|null): 暂无字段说明
- data.tweets[].user.id_str (string|null): 暂无字段说明
- data.tweets[].user.location (string|null): 暂无字段说明
- data.tweets[].user.name (string|null): 暂无字段说明
- data.tweets[].user.profile_banner_url (string|null): 暂无字段说明
- data.tweets[].user.profile_image_url_https (string|null): 暂无字段说明
- data.tweets[].user.screen_name (string|null): 暂无字段说明
- data.tweets[].user.url (string|null): 暂无字段说明
- data.tweets[].user.verified (boolean|null): 暂无字段说明
- data.tweets[].views_count (integer|null): 暂无字段说明
- meta.next_input.cursor (string): 暂无字段说明
- meta.next_input.query (string): 暂无字段说明
- meta.next_input.type (string): 暂无字段说明

Follow up: GET /v1/native/results/{query_id}
读取已保存结果，不重复查询数据或收费。

