Users/search
(→users/search) |
(→URL) |
||
第3行: | 第3行: | ||
=== URL=== | === URL=== | ||
− | http://api.t.sina.com.cn/users/ | + | http://api.t.sina.com.cn/users/searchuser.format |
− | + | ||
=== 格式=== | === 格式=== | ||
xml, json | xml, json |
2010年6月7日 (一) 10:39的版本
目录 |
users/search
返回关键字匹配的微博用户。
URL
http://api.t.sina.com.cn/users/searchuser.format
格式
xml, json
HTTP请求方式
GET
是否需要登录
true
请求数限制
true
请求参数
- q: 选填参数. 查询的关键字。必须进行url encode
- snick: 选填参数. 搜索范围包含昵称 (0是不包含,1为包含)
- sdomain: 选填参数. 搜索范围包含个性域名 (0是不包含,1为包含)
- sintro: 选填参数. 搜索范围包含简介 (0是不包含,1为包含)
- province: 省份ID
- city: 城市ID
- gender: 性别(m为男,f为女)
- comorsch: 公司学校名称
- sort: 排序方式(1为按更新时间,2为按粉丝数)
- page: 页码
- count:分页大小(默认返回10条)
- callback: 可选参数. 仅JSON方式支持,用于JSONP callback作用。
返回结果
XML示例:
<?xml version="1.0" encoding="UTF-8"?> <searchResult> <users> <user> <id>1524469632</id> <screen_name>hustfisher1</screen_name> <name>hustfisher1</name> <province>44</province> <city>1</city> <location>广东 广州</location> <description></description> <profile_image_url>http://tp1.sinaimg.cn/1524469632/50/0</profile_image_url> <domain></domain> <gender></gender> <email></email> <qq></qq> <msn></msn> <followers_count>1</followers_count> <friends_count>0</friends_count> <statuses_count>1</statuses_count> <favourites_count>0</favourites_count> <created_at>Wed Nov 11 00:00:00 +0800 2009</created_at> <following>false</following> <verified>false</verified> <geo_enabled>false</geo_enabled> <status> <created_at>Mon Jan 25 18:44:35 +0800 2010</created_at> <id>2191142</id> <text>测试</text> <source> <a href="http://t.sina.com.cn">新浪微博</a> </source> <favorited>false</favorited> <truncated>false</truncated> <geo/> <in_reply_to_status_id></in_reply_to_status_id> <in_reply_to_user_id></in_reply_to_user_id> <in_reply_to_screen_name></in_reply_to_screen_name> </status> </user> <total_count_maybe>153</total_count_maybe> </users> </searchResult>
使用示例
- xml:
curl http://api.t.sina.com.cn/users/search.xml?q=api
- json: