跳到主要内容
微博 全部接口
搜索微博帖子 · 搜索

微博实时搜索

按关键词和页码搜索按时间倒序排列的最新公开微博。

POST/v1/weibo/posts/search

英文名称: Weibo realtime search · Post · Search Search the latest public Weibo posts for a keyword, newest first, by page.
weibo.posts.search@v1

按次价格

¥0.02/ 次

非空完整结果收费;空结果、部分结果和失败不收费。

正在核验实时状态

在线试用

登录后用真实参数调用一次,结果和扣费会显示在这里。

安全验证

正在加载安全验证…

正在确认实时执行状态…

执行结果

// Result

请求参数

keywordstring必填

minLength: 1 · maxLength: 100

示例: "新能源汽车"

pageinteger可选

default: 1 · minimum: 1 · maximum: 50

示例: 1

search_typestring可选

enum: "61" · default: "61"

请求 JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "keyword": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "page": {
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    },
    "search_type": {
      "default": "61",
      "type": "string",
      "enum": [
        "61"
      ]
    }
  },
  "required": [
    "keyword"
  ],
  "additionalProperties": false
}

代码示例

安装 SDK:npm i @dataxapi/sdk 或 pip install dataxapi;把 API Key 放进环境变量 DATAXAPI_API_KEY。

curl -X POST https://api.dataxapi.com/v1/weibo/posts/search \
  -H "Authorization: Bearer $DATAXAPI_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"keyword":"新能源汽车","page":1}'

返回示例

200 · application/json
{
  "code": 200,
  "request_id": "req_example_weibo_posts_search",
  "message": "success",
  "data": {
    "items": [
      {
        "idstr": "5092682368025584",
        "mid": "5092682368025584",
        "mblogid": "OtjRk5Xyz",
        "created_at": "Tue Oct 15 10:00:00 +0800 2024",
        "source": "微博网页版",
        "region_name": "发布于 北京",
        "reposts_count": 120,
        "comments_count": 340,
        "attitudes_count": 2800,
        "isLongText": false,
        "pic_num": 1,
        "user": {
          "idstr": "1722594714",
          "screen_name": "公开博主",
          "verified": true
        },
        "text": "公开微博正文"
      }
    ]
  },
  "page": {
    "next_cursor": null
  },
  "warnings": [],
  "meta": {
    "listing_id": "weibo.posts.search",
    "version": "v1",
    "catalog_release_id": "catalog-production-2026-09-19.b069be57",
    "price_book_version": "pricebook-production-2026-09-19.4487e352",
    "result_status": "complete",
    "charged_amount": "0.02",
    "balance_after": "49.98",
    "currency": "CNY"
  }
}
返回字段说明
codenumber
const: 200
request_idstring
messagestring
const: "success"
dataobject
pageobject
warningsarray
metaobject
返回 JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "const": 200
    },
    "request_id": {
      "type": "string"
    },
    "message": {
      "type": "string",
      "const": "success"
    },
    "data": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "idstr": {},
              "mid": {},
              "mblogid": {},
              "created_at": {},
              "source": {},
              "region_name": {},
              "reposts_count": {},
              "comments_count": {},
              "attitudes_count": {},
              "isLongText": {},
              "pic_num": {},
              "user": {},
              "text": {}
            },
            "additionalProperties": false
          }
        }
      },
      "required": [
        "items"
      ],
      "additionalProperties": false
    },
    "page": {
      "type": "object",
      "properties": {
        "next_cursor": {
          "type": "null"
        }
      },
      "required": [
        "next_cursor"
      ],
      "additionalProperties": false
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "meta": {
      "type": "object",
      "properties": {
        "listing_id": {
          "type": "string",
          "const": "weibo.posts.search"
        },
        "version": {
          "type": "string",
          "const": "v1"
        },
        "catalog_release_id": {
          "type": "string",
          "minLength": 1
        },
        "price_book_version": {
          "type": "string",
          "minLength": 1
        },
        "result_status": {
          "type": "string",
          "enum": [
            "complete",
            "empty",
            "partial"
          ]
        },
        "charged_amount": {
          "type": "string"
        },
        "balance_after": {
          "type": "string"
        },
        "currency": {
          "type": "string",
          "const": "CNY"
        }
      },
      "required": [
        "listing_id",
        "version",
        "catalog_release_id",
        "price_book_version",
        "result_status",
        "charged_amount",
        "balance_after",
        "currency"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "code",
    "request_id",
    "message",
    "data",
    "page",
    "warnings",
    "meta"
  ],
  "additionalProperties": false
}

使用说明

适合

  • 需要追踪某个关键词在微博上的最新讨论。

不适合

  • 不用于热门排序搜索、用户搜索或历史全量回溯。

已知限制

  • 结果大致按发布时间倒序,不按热度排序;正文在 text 字段,长微博可能被截断。
  • 按页码翻页,相邻页之间可能出现重复或遗漏。
  • 已删除、私密或受限内容不会返回。
  • 作者等嵌套对象按上游返回,仅剔除令牌、绑定状态、隐私设置和埋点字段;其中的头像和媒体链接可能过期。

计费规则

¥0.02 / 次。非空完整结果收费;空结果、部分结果和失败不收费。

查看全部价格 →