指定したWOEIDのトレンド情報が使用できる場合、そのトレンドトピックのトップ10を取得します。
応答は、トレンドトピックの名前と Twitter Searchでトピックを検索するのに使われるクエリパラメータとTwitter 検索URLをエンコードした “trend”オブジェクトを配列でまとめたものになります。
この情報は5分間キャッシュされます。 Requesting more frequently than that will not return any more data, and will count against your rate limit usage.
GET trends/
|
https://api.twitter.com/1.1/trends/place.json
Resource URL
|
Resource Information
Response formats
JSON
Requires authentication?
Yes
Rate limited?
Yes
Requests / 15-min window (user auth)
15
Requests / 15-min window (app auth)
15
|
これにhashtagsを設定すると、設定した全てのハッシュタグはトレンド一覧から除外されます。
Parameters
id
required
The Yahoo! Where On Earth ID of the location to return trending information for. Global information is available by using Example Values:
exclude
optional
Setting this equal to |
ログイン して登録アプリケーションの一覧を参照してください。
OAuth Signature GeneratorSign in to see a list of your registered applications. |
GET
https://api.twitter.com/1.1/trends/place.json?id=1
Example RequestGET
|
[
{
"as_of": "2012-08-24T23:25:43Z",
"created_at": "2012-08-24T23:24:14Z",
"locations": [
{
"name": "Worldwide",
"woeid": 1
}
],
"trends": [
{
"events": null,
"name": "#GanaPuntosSi",
"promoted_content": null,
"query": "%23GanaPuntosSi",
"url": "http://twitter.com/search/?q=%23GanaPuntosSi"
},
{
"events": null,
"name": "#WordsThatDescribeMe",
"promoted_content": null,
"query": "%23WordsThatDescribeMe",
"url": "http://twitter.com/search/?q=%23WordsThatDescribeMe"
},
{
"events": null,
"name": "#10PersonasQueExtrañoMucho",
"promoted_content": null,
"query": "%2310PersonasQueExtra%C3%B1oMucho",
"url": "http://twitter.com/search/?q=%2310PersonasQueExtra%C3%B1oMucho"
},
{
"events": null,
"name": "Apple $1.5",
"promoted_content": null,
"query": "%22Apple%20$1.5%22",
"url": "http://twitter.com/search/?q=%22Apple%20$1.5%22"
},
{
"events": null,
"name": "Zelko",
"promoted_content": null,
"query": "Zelko",
"url": "http://twitter.com/search/?q=Zelko"
},
{
"events": null,
"name": "LWWY",
"promoted_content": null,
"query": "LWWY",
"url": "http://twitter.com/search/?q=LWWY"
},
{
"events": null,
"name": "Lance Armstrong",
"promoted_content": null,
"query": "%22Lance%20Armstrong%22",
"url": "http://twitter.com/search/?q=%22Lance%20Armstrong%22"
},
{
"events": null,
"name": "Gonzo",
"promoted_content": null,
"query": "Gonzo",
"url": "http://twitter.com/search/?q=Gonzo"
},
{
"events": null,
"name": "Premium Rush",
"promoted_content": null,
"query": "%22Premium%20Rush%22",
"url": "http://twitter.com/search/?q=%22Premium%20Rush%22"
},
{
"events": null,
"name": "Sweet Dreams",
"promoted_content": null,
"query": "%22Sweet%20Dreams%22",
"url": "http://twitter.com/search/?q=%22Sweet%20Dreams%22"
}
]
}
]
Example Result[
{
"as_of": "2012-08-24T23:25:43Z",
"created_at": "2012-08-24T23:24:14Z",
"locations": [
{
"name": "Worldwide",
"woeid": 1
}
],
"trends": [
{
"events": null,
"name": "#GanaPuntosSi",
"promoted_content": null,
"query": "%23GanaPuntosSi",
"url": "http://twitter.com/search/?q=%23GanaPuntosSi"
},
{
"events": null,
"name": "#WordsThatDescribeMe",
"promoted_content": null,
"query": "%23WordsThatDescribeMe",
"url": "http://twitter.com/search/?q=%23WordsThatDescribeMe"
},
{
"events": null,
"name": "#10PersonasQueExtrañoMucho",
"promoted_content": null,
"query": "%2310PersonasQueExtra%C3%B1oMucho",
"url": "http://twitter.com/search/?q=%2310PersonasQueExtra%C3%B1oMucho"
},
{
"events": null,
"name": "Apple $1.5",
"promoted_content": null,
"query": "%22Apple%20$1.5%22",
"url": "http://twitter.com/search/?q=%22Apple%20$1.5%22"
},
{
"events": null,
"name": "Zelko",
"promoted_content": null,
"query": "Zelko",
"url": "http://twitter.com/search/?q=Zelko"
},
{
"events": null,
"name": "LWWY",
"promoted_content": null,
"query": "LWWY",
"url": "http://twitter.com/search/?q=LWWY"
},
{
"events": null,
"name": "Lance Armstrong",
"promoted_content": null,
"query": "%22Lance%20Armstrong%22",
"url": "http://twitter.com/search/?q=%22Lance%20Armstrong%22"
},
{
"events": null,
"name": "Gonzo",
"promoted_content": null,
"query": "Gonzo",
"url": "http://twitter.com/search/?q=Gonzo"
},
{
"events": null,
"name": "Premium Rush",
"promoted_content": null,
"query": "%22Premium%20Rush%22",
"url": "http://twitter.com/search/?q=%22Premium%20Rush%22"
},
{
"events": null,
"name": "Sweet Dreams",
"promoted_content": null,
"query": "%22Sweet%20Dreams%22",
"url": "http://twitter.com/search/?q=%22Sweet%20Dreams%22"
}
]
}
]
|