2
2

More than 5 years have passed since last update.

ニコニ広告のptを取得するAPI

Posted at

こんな感じで、動画IDをカンマ区切りで与えてあげれば、一気に取得できます。

最大600件まで同時に取得できるようです。

レスポンスのJSONP
__jsonp_1(
[
{
idvideo: "sm20177135",
comments: null,
total: 7900,
level: 5,
adflg: 0
},
{
idvideo: "sm9",
comments: null,
total: 383400,
level: 10,
adflg: 0
}
]
)

レスポンスがJSONP形式なので、サーバサイドで利用したい場合はJSON形式に変換してやる必要がありそうです。

callbackパラメータで関数名を指定できます。

パラメータで渡した動画の順番通りには返ってこないようなので注意が必要です。

レスポンスの要素

  • idvideo : 動画ID
  • comments : 提供コメント
  • total : 宣伝pt
  • level : ニコニ広告のレベル(よく知りませんが)
  • adflg : 有効かどうか?
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2