豆瓣API

 

Api V2 索引

图书Api V2

电影Api V2

音乐Api V2

同城Api V2

广播Api V2

用户Api V2

日记Api V2

相册Api V2

线上活动Api V2

论坛Api V2

回复Api V2

我去Api V2

https://developers.douban.com/wiki/?title=api_v2

 

 

搜索图书

GET  https://api.douban.com/v2/book/search
参数 意义 备注
q 查询关键字 q和tag必传其一
tag 查询的tag q和tag必传其一
start 取结果的offset 默认为0
count 取结果的条数 默认为20,最大为100

返回:返回status=200,

{
      "start": 0,
      "count": 10,
      "total": 30,
      "books" : [Book, ]
    }

注:对于登录用户,若搜索结果图书在当前用户的图书收藏中,会在对应搜索结果信息中附加当前用户对此书的收藏信息,改部分的 Book 数据结构如下:

{
    … (图书信息的其他部分)
    "current_user_collection": {
        "status":"read",
        "rating": {
            "max":5,
            "value":"5",
            "min":0
        },
        "updated":"2012-11-2012:08:04",
        "user_id":"33388491",
        "book_id":"6548683",
        "id":605519800
    }
}

 

获取图书信息

GET  https://api.douban.com/v2/book/:id

返回图书信息,返回status=200

对于授权用户,返回数据中会带有该用户对该图书的收藏信息:

{
    … (图书信息的其他部分)
    "current_user_collection": {
        "status":"read",
        "rating": {
            "max":5,
            "value":"5",
            "min":0
        },
        "updated":"2012-11-2012:08:04",
        "user_id":"33388491",
        "book_id":"6548683",
        "id":605519800
    }
}

 

 https://developers.douban.com/wiki/?title=book_v2

 

电影条目搜索


Resources URI

/v2/movie/search?q={text}

Required Scope

movie_basic_r

Example:

GET https://api.douban.com/v2/movie/search?q=张艺谋 GET /v2/movie/search?tag=喜剧

Status:

200 OK

Request Properties:

PropertyDescriptionTypeBasicAdvancePremiumDefault
q query string str Y Y Y -
tag tag query string str Y Y Y -
start start int Y Y Y 0
count count int Y Y Y 20

Resources Properties:

 

PropertyDescriptionTypeBasicAdvancePremiumDefault
start start int Y Y Y 0
count count int Y Y Y 20
total 总数, Basic最多只返回20条记录 int Y Y Y 0
query 搜索字符串 str Y Y Y -
tag 搜索标签 str Y Y Y -
subjects 搜索结果列表,见附录 array Y Y Y -

 

Simple Subject Properties


 

PropertyDescriptionTypeBasicAdvancePremiumDefault
id 条目id str Y Y Y -
title 中文名 str Y Y Y -
original_title 原名 str Y Y Y ''
alt 条目URL float(1) Y Y Y -
images 电影海报图,分别提供288px x 465px(大),96px x 155px(中) 64px x 103px(小)尺寸 dict Y Y Y -
rating 评分,见附录 dict Y Y Y -
pubdates 如果条目类型是电影则为上映日期,如果是电视剧则为首播日期 array N Y Y []
year 年代 str Y Y Y ''
subtype 条目分类, movie或者tv str Y Y Y movie

 

https://developers.douban.com/wiki/?title=movie_v2

 

获取音乐信息

GET  https://api.douban.com/v2/music/:id

返回音乐信息,返回status=200

搜索音乐

GET  https://api.douban.com/v2/music/search
参数 意义 备注
q 查询关键字 q和tag必传其一
tag 查询的tag q和tag必传其一
start 取结果的offset 默认为0
count 取结果的条数  

返回:返回status=200,

{
      "start": 0,
      "count": 10,
      "total": 30,
      "musics" : [Music, ]
    }

https://developers.douban.com/wiki/?title=music_v2#get_music_search

 

posted @   沧海一滴  阅读(1784)  评论(0编辑  收藏  举报
编辑推荐:
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具
历史上的今天:
2016-12-14 Spring Boot flyway的启动时机比较早
2015-12-14 《神秘的程序员们》漫画26~28:《万年坑系列》 I、II、III(转)
2015-12-14 Linux概念架构的理解(转)
2015-12-14 Building Redis for use on Cygwin(转)
2015-12-14 Windows Cygwin Redis 安装(转)
2015-12-14 mysql
2014-12-14 java代码中获取进程process id(转)
点击右上角即可分享
微信分享提示