概览
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
借助 Google Books API 系列中的 API,您可以将 Google 图书功能引入您的网站或应用。
新的 Google Books API 可让您以编程方式执行可在 Google 图书网站上以交互方式执行的大部分操作。借助 Embedded Viewer API,您可以将内容直接嵌入到自己的网站中。
在 Google,我们一直致力于为尽可能多的用户提供信息,因此我们的 API 在设计时就考虑到了这一目标。不过,我们使用的大部分数据是为 Google 图书提供支持的,因此,我们并不能按照自己的选择分发这些数据。
该 API 不能用于替代商业服务。这些服务很有价值,Google 也依靠它们为公众构建我们自己的 API。
如需查看有关使用这些 API 的 Google 服务条款,请访问 https://developer.google.com/books/terms.html。如果用户违反了服务条款,并且在 Google 发出违规行为通知后未采取措施纠正违规行为,我们会暂停该用户对 API 的访问权限。
Books API v1(实验性)
新的 Google Books API v1 可让您以编程方式访问 Google 图书网站上提供的许多操作。您可以使用它创建功能强大的应用,以便与 Google 图书进行更深入的集成。该 API 提供的部分主要功能包括:
- 搜索和浏览符合指定查询的图书列表。
- 查看图书相关信息(包括元数据、库存状况和价格),以及指向预览页面的链接。
- 管理自己的书架
若要了解该 API,您首先应该查看使用入门页面。它解释了该 API 使用的基本概念,并说明了该 API 遵循的基本交互原则。有关该 API 支持的所有操作的全面说明,请参阅使用 API 页面。
嵌入式查看器 API
借助 Embedded Viewer API,您可以使用 JavaScript 将 Google 图书中的图书内容直接嵌入到您的网页中。借助该工具,您可以围绕图书预览打造自己的用户体验。
向您的网站添加图书预览功能相对简单,但需要具备一些 HTML 和 JavaScript 知识。开发者指南介绍了如何使用 Google AJAX 加载器加载该 API,以及如何将其绘制到您网页上的特定容器中。
将嵌入式查看器添加到网页后,即可使用 JavaScript 函数对其进行控制。这使您可以通过点击控件来执行类似于用户可执行的操作:您可以转到下一页、放大或缩小、突出显示搜索字词等。您还可以获取当前页码,让您的代码在用户浏览图书时做出反应。
|
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-06-28。
[null,null,["最后更新时间 (UTC):2024-06-28。"],[[["\u003cp\u003eThe Google Books APIs allow you to integrate Google Books features, such as searching, browsing, and embedding book content, into your website or application.\u003c/p\u003e\n"],["\u003cp\u003eThe Books API provides programmatic access to book information, including metadata, availability, and pricing, enabling you to build book-related applications.\u003c/p\u003e\n"],["\u003cp\u003eThe Embedded Viewer API enables you to embed book previews directly into your web pages, offering customizable user experiences around book content.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Books APIs are subject to the Google Terms of Service, and misuse may lead to suspension of access.\u003c/p\u003e\n"]]],[],null,["# Overview\n\nThe APIs in the Google Books API Family let you bring [Google Books](https://books.google.com/) features to your site or application.\n\nThe new [Google Books API](#books_api_v1) lets you perform programmatically most of the operations that you can do interactively on the\nGoogle Books website. The [Embedded Viewer API](#embedded_viewer_api) lets you embed the content directly into your site.\n\nAt Google, we're constantly striving to make information available to as\nmany people as possible, and our APIs were designed with that goal in mind.\nHowever, we license much of the data that we use to power Google Books, so\nit's not ours to distribute however we choose.\n\nThe API is not intended to be used as a replacement for commercial services.\nThese services are valuable and Google also relies upon them to build our\nown APIs for the general public.\n\nThe Google Terms of Service for use of the APIs is available at [https://developer.google.com/books/terms.html](/books/terms). We will suspend a user's access to the APIs if a user violates the Terms of Service and does not take action to remedy the violation after notice of violation by Google.\n\nBooks API v1 (Experimental)\n---------------------------\n\nThe new Google Books API v1 gives you programmatic access to many of the operations available on Google Books website. You can use it to\ncreate powerful applications that provide deeper integration with Google Books. Some of the main features that the API provides are:\n\n- search and browse through the list of books that match a given query.\n- view information about a book, including metadata, availability and price, links to the preview page.\n- manage your own bookshelves.\n\nA good first step in learning about the API is the [Getting Started](/books/docs/v1/getting_started) page. It explains the basic\nconcepts that the API uses and describes the basic interaction principles that the API follows. A comprehensive description of all the operations\nsupported by the API is given in the [Using the API](/books/docs/v1/using) page.\n\nEmbedded Viewer API\n-------------------\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------|\n| The Embedded Viewer API lets you embed book content from Google Books directly in your web pages with JavaScript. It allows you to build your own user experience around book previews. Adding book preview functionality to your site is relatively simple, though it does require some knowledge of HTML and JavaScript. The [Developer's Guide](/books/docs/viewer/developers_guide) explains how the API can be loaded using the Google AJAX loader and drawn into a particular container on your page. Once the embedded viewer has been added to a webpage, it can be controlled using [JavaScript functions](/books/docs/viewer/reference). This allows you to perform actions similar to what the user can do by clicking on the controls: you can go to the next page, zoom in or out, highlight search terms, and so on. You are also able to get the current page number, allowing your code react as the user navigates through the book. | [](/books/docs/viewer/examples/book-simple) |"]]