题
有没有一种方法可以使用亚马逊产品广告API根据其ISBN查找一本书的各种版本?
而且,更一般而言,在书中查找元数据的各种选择是什么?我肯定只知道一个来自WorldCat的XISBN API
在我的网站上,当人们搜索书籍时,我们有一个“更多版本”按钮。因此,我会进行很多查询(并缓存它们)。
解决方案
看一眼 https://sourceforge.net/projects/isbntools/files/latest/download. 。命令 isbn editions ISBN
会给你想要的...
如果您是开发人员,那么 https://pypi.python.org/pypi/isbntools.
其他提示
您可以使用OCLC的 XISBN API - 给它一个ISBN,它为您提供一组与“工作”相同的ISBN,其他版本,翻译等。它将为您提供类似的东西:
<?xml version="1.0" encoding="UTF-8"?>
<rsp xmlns="http://worldcat.org/xid/isbn/" stat="ok">
<isbn form="BA" year="2004" lang="eng" ed="2nd ed.">0596002815</isbn>
<isbn form="BA DA" year="1999" lang="eng">1565928938</isbn>
<isbn form="BA" year="1999" lang="eng" ed="1st ed.">1565924649</isbn>
</rsp>
不幸的是,它不是免费的。 这是定价.
这个问题是古老的,但是为了完整,我补充说,亚马逊产品广告API确实提供了一种查找书籍的其他版本(和ISBN数字)的方法,但这涉及两个 ItemLookup
查询:
- 亚马逊呼叫的第一个查询以获取父级的ASIN 权威不可买到;这是一个没有产品页面的虚拟产品,只是儿童产品的容器。
- 第二个查询以列出此父母的子项目。
两个查询都必须包括以下参数:
ResponseGroup=RelatedItems,ItemAttributes
RelationshipType=AuthorityTitle
带有ISBN号码的第一个查询看起来像:
...&IdType=ISBN&ItemId=9780345803481
<RelatedItems>
<Relationship>Parents</Relationship>
<RelationshipType>AuthorityTitle</RelationshipType>
<RelatedItemCount>1</RelatedItemCount>
<RelatedItemPageCount>1</RelatedItemPageCount>
<RelatedItemPage>1</RelatedItemPage>
<RelatedItem>
<Item>
<ASIN>B0058NLWEC</ASIN>
...
</Item>
</RelatedItem>
</RelatedItems>
第二个查询是与第一个查询返回的父母ASIN一起执行的, B0058NLWEC
:
...&IdType=ASIN&ItemId=B0058NLWEC
<RelatedItems>
<Relationship>Children</Relationship>
<RelationshipType>AuthorityTitle</RelationshipType>
<RelatedItemCount>42</RelatedItemCount>
<RelatedItemPageCount>5</RelatedItemPageCount>
<RelatedItemPage>1</RelatedItemPage>
<RelatedItem>
<Item>
<ASIN>1445026570</ASIN>
<ItemAttributes>
<EAN>9781445026572</EAN>
<ISBN>1445026570</ISBN>
...
</ItemAttributes>
...
</Item>
</RelatedItem>
<RelatedItem>
<Item>
<ASIN>1471305015</ASIN>
<ItemAttributes>
<EAN>9781471305016</EAN>
<ISBN>1471305015</ISBN>
...
</ItemAttributes>
...
</Item>
</RelatedItem>
...
</RelatedItems>
这列出了本书的所有版本,如亚马逊:精装,平装,Kindle,Audiobook,...
ISBN DB提供 远程访问API 这将返回以XML格式的各种元数据。从其网站上的浏览条目中,一些ISBN条目还包括版本信息。
查看此API示例响应:
<?xml version="1.0" encoding="UTF-8"?>
<ISBNdb server_time="2005-07-29T03:02:22">
<BookList total_results="1">
<BookData book_id="paul_laurence_dunbar" isbn="0766013502">
<Title>Paul Laurence Dunbar</Title>
<TitleLong>Paul Laurence Dunbar: portrait of a poet</TitleLong>
<AuthorsText>Catherine Reef</AuthorsText>
<PublisherText publisher_id="enslow_publishers">
Berkeley Heights, NJ: Enslow Publishers, c2000.
</PublisherText>
<Summary>
A biography of the poet who faced racism and devoted himself
to depicting the black experience in America.
</Summary>
<Notes>
"Works by Paul Laurence Dunbar": p. 113-114.
Includes bibliographical references (p. 124) and index.
</Notes>
<UrlsText></UrlsText>
<AwardsText></AwardsText>
<Prices>
<Price store_id="alibris" is_in_stock="1" is_new="0"
check_time="2005-07-29T01:18:18" price="14.92"/>
<Price store_id="amazon" is_in_stock="1" is_new="1"
check_time="2005-07-29T01:18:20" price="26.60" />
</Prices>
</BookData>
</BookList>
</ISBNdb>
另外,这是 具体文档 关于“书籍收集”响应XML中的属性。
1)搜索标题是相同的2)在响应列表上迭代(对于大多数书籍来说,这应该是5-10个结果,带有通用标题的书籍,例如Say“ Python编程”,将导致很多结果,因此可能无法实现) 3)请参见ISBN编号 +发布日期的差异
我不记得有同样的直接API。