Search/en
目录 |
search
Search for weibos with the keyword
URL
http://api.t.sina.com.cn/search.(json)
Format
json
HTTP Request Method
GET
Requires Authentication
false
See the Authorization Mechanism Statement for authorization details
Requests Count Limitation
true
See the Interface Access Rights Statement for the Request Count Limitaiton details.
Request Parameters
必选 | 类型及范围 | 说明 | |
---|---|---|---|
source | true | string | AppKey for the application to identify it. ( This parameter is not needed when using OAuth) |
q | true | string | keyword, encoded by URL Encode. |
page | false | int | Page.default is 1 |
rpp | false | int, default is 20, max is 200 | Weibos count per page |
callback | false | string | Only support JSON. For JSONP cross site data access. |
geocode | false | string | Returns weibos around the place with the geo data。Geo data format is "longitude, latitude, radius". Radius supports km (kilometer), m (meter), mi (mile) unit. Data should be encoded by URL encode |
Example Request
- json
- curl -u "username:password" "http://api.t.sina.com.cn/search.json?source=appkey&q=王若琳&callback=foo"
Notes
- It returns null if keyword is null
Response
JSON Example without callback parameter
{ "results":[ { "to_user_id":1728647563, "to_user":"kiroro恋", "text":"喜欢坐在你的车里听王若琳的歌", "id":4192745203, "from_user_id":1728647563, "from_user":"kiroro恋", "iso_language_code":"nl", "source":"<a href=\"http://t.sina.com.cn\" rel=\"nofollow\">新浪微博</a>", "profile_image_url":"http://tp4.sinaimg.cn/1728647563/50/1289280876/0", "created_at":"Thu Dec 09 13:57:20 +0800 2010" }, ... ], "since_id":0, "max_id":4192745203, "results_per_page":0, "next_page":"?page=2&max_id=1291869235&q=王若琳", "refresh_url":"?since_id=1291874240&q=王若琳", "completed_in":0.24699999392032623, "page":1,"query":"王若琳" }
JSON Example(callback=foo)
foo( { "results":[ { "to_user_id":1728647563, "to_user":"kiroro恋", "text":"喜欢坐在你的车里听王若琳的歌", "id":4192745203, "from_user_id":1728647563, "from_user":"kiroro恋", "iso_language_code":"nl", "source":"<a href=\"http://t.sina.com.cn\" rel=\"nofollow\">新浪微博</a>", "profile_image_url":"http://tp4.sinaimg.cn/1728647563/50/1289280876/0", "created_at":"Thu Dec 09 13:57:20 +0800 2010" }, ], "since_id":0, "max_id":4192745203, "results_per_page":0, "next_page":"?page=2&max_id=1291869235&q=王若琳", "refresh_url":"?since_id=1291874240&q=王若琳", "completed_in":0.24699999392032623, "page":1,"query":"王若琳" } )
Other
None