卷:list
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
执行图书搜索。
立即试用。
请求
HTTP 请求
GET https://www.googleapis.com/books/v1/volumes?q={search terms}
参数
参数名称 |
值 |
说明 |
必需参数 |
q |
string |
全文搜索查询字符串。
|
可选参数 |
download |
string |
根据下载可用性限制到卷。
可接受的值包括:
|
filter |
string |
过滤搜索结果。
可接受的值包括:
- “
ebooks ”- 所有 Google 电子书。
- “
free-ebooks ”- 可查看整本图书文本的 Google 电子书。
- “
full ”- 公众可以查看整卷文本。
- “
paid-ebooks ”- 带有价格的 Google 电子书。
- “
partial ”- 公众可以看到部分文字。
|
langRestrict |
string |
将结果限制为使用此语言代码的图书。
|
libraryRestrict |
string |
将搜索范围限制在此用户的书库中。
可接受的值包括:
- “
my-library ”- 仅限用户的媒体库、任何搁架。
- “
no-restrict ”- 不根据用户的内容库进行限制。
|
maxResults |
unsigned integer |
返回的结果数上限。
可接受的值为 0 到 40 (含)。
|
orderBy |
string |
对搜索结果进行排序。
可接受的值包括:
- “
newest ”- 最近发布的版本。
- “
relevance ”- 与搜索字词的相关性。
|
partner |
string |
限制合作伙伴 ID 的结果并为其添加品牌标识。
|
printType |
string |
仅限于图书或杂志。
可接受的值包括:
- “
all ”- 所有卷内容类型。
- “
books ”- 仅限图书。
- “
magazines ”- 仅限杂志。
|
projection |
string |
限制返回给一组选定字段的信息。
可接受的值包括:
- “
full ”- 包含所有音量数据。
- “
lite ”- 包含 volumeInfo 和 accessInfo 中的部分字段。
|
showPreorders |
boolean |
设为 true 即可显示可供预订的图书。默认值为 false。
|
source |
string |
用于标识此请求发起者的字符串。
|
startIndex |
unsigned integer |
要返回的第一个结果的索引(从 0 开始)
|
请求正文
使用此方法时请勿提供请求正文。
响应
如果成功,此方法将返回以下结构的响应正文:
{
"kind": "books#volumes",
"items": [
volume Resource
],
"totalItems": (value)
}
属性名称 |
值 |
说明 |
备注 |
kind |
string |
资源类型。 |
|
items[] |
list |
卷列表。 |
|
totalItems |
integer |
找到的卷总数。如果结果已分页,此值可能会大于此响应中返回的卷数。 |
|
试试看!
使用下面的 Explorer 对实际数据调用此方法,然后查看响应。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-11-08。
[null,null,["最后更新时间 (UTC):2024-11-08。"],[[["\u003cp\u003eSearches for books based on a provided query string.\u003c/p\u003e\n"],["\u003cp\u003eAllows filtering by criteria such as availability, format, language, and publication type.\u003c/p\u003e\n"],["\u003cp\u003eOffers control over the number of results, sorting order, and specific data fields returned.\u003c/p\u003e\n"],["\u003cp\u003eCan be used to retrieve information about books, including volume details and access options.\u003c/p\u003e\n"],["\u003cp\u003eSupports pagination to handle large result sets.\u003c/p\u003e\n"]]],[],null,["# Volume: list\n\nPerforms a book search.\n[Try it now](#try-it).\n\nRequest\n-------\n\n### HTTP Request\n\n GET https://www.googleapis.com/books/v1/volumes?q={search terms}\n\n### Parameters\n\n| Parameter Name | Value | Description |\n|-------------------|--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Required Parameters** |||\n| `q` | `string` | Full-text search query string. |\n| **Optional Parameters** |||\n| `download` | `string` | Restrict to volumes by download availability. \u003cbr /\u003e \u003cbr /\u003e Acceptable values are: - \"`epub`\" - All volumes with epub. |\n| `filter` | `string` | Filter search results. \u003cbr /\u003e \u003cbr /\u003e Acceptable values are: - \"`ebooks`\" - All Google eBooks. - \"`free-ebooks`\" - Google eBook with full volume text viewability. - \"`full`\" - Public can view entire volume text. - \"`paid-ebooks`\" - Google eBook with a price. - \"`partial`\" - Public able to see parts of text. |\n| `langRestrict` | `string` | Restrict results to books with this language code. |\n| `libraryRestrict` | `string` | Restrict search to this user's library. \u003cbr /\u003e \u003cbr /\u003e Acceptable values are: - \"`my-library`\" - Restrict to the user's library, any shelf. - \"`no-restrict`\" - Do not restrict based on user's library. |\n| `maxResults` | `unsigned integer` | Maximum number of results to return. Acceptable values are `0` to `40`, inclusive. |\n| `orderBy` | `string` | Sort search results. \u003cbr /\u003e \u003cbr /\u003e Acceptable values are: - \"`newest`\" - Most recently published. - \"`relevance`\" - Relevance to search terms. |\n| `partner` | `string` | Restrict and brand results for partner ID. |\n| `printType` | `string` | Restrict to books or magazines. \u003cbr /\u003e \u003cbr /\u003e Acceptable values are: - \"`all`\" - All volume content types. - \"`books`\" - Just books. - \"`magazines`\" - Just magazines. |\n| `projection` | `string` | Restrict information returned to a set of selected fields. \u003cbr /\u003e \u003cbr /\u003e Acceptable values are: - \"`full`\" - Includes all volume data. - \"`lite`\" - Includes a subset of fields in volumeInfo and accessInfo. |\n| `showPreorders` | `boolean` | Set to true to show books available for preorder. Defaults to false. |\n| `source` | `string` | String to identify the originator of this request. |\n| `startIndex` | `unsigned integer` | Index of the first result to return (starts at 0) |\n\n### Request Body\n\nDo not supply a request body with this method.\n\nResponse\n--------\n\nIf successful, this method returns a response body with the following structure:\n\n {\n \"kind\": \"books#volumes\",\n \"items\": [\n volume Resource\n ],\n \"totalItems\": (value)\n }\n\n| Property Name | Value | Description | Notes |\n|---------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------|-------|\n| `kind` | `string` | Resource type. | |\n| `items[]` | `list` | A list of volumes. | |\n| `totalItems` | `integer` | Total number of volumes found. This might be greater than the number of volumes returned in this response if results have been paginated. | |\n\nTry It!\n-------\n\n\nUse the explorer below to call this method on live data and see the response."]]