814 lines
18 KiB
JSON
814 lines
18 KiB
JSON
{
|
|
"kind": "discovery#restDescription",
|
|
"etag": "\"FrPV2U6xXFUq8eRv_PO3IoAURkc/KsgpNVP8dzFmgPzAjDdH7uBJP_M\"",
|
|
"discoveryVersion": "v1",
|
|
"id": "customsearch:v1",
|
|
"name": "customsearch",
|
|
"version": "v1",
|
|
"revision": "20131205",
|
|
"title": "CustomSearch API",
|
|
"description": "Lets you search over a website or collection of websites",
|
|
"ownerDomain": "google.com",
|
|
"ownerName": "Google",
|
|
"icons": {
|
|
"x16": "http://www.google.com/images/icons/product/search-16.gif",
|
|
"x32": "http://www.google.com/images/icons/product/search-32.gif"
|
|
},
|
|
"documentationLink": "https://developers.google.com/custom-search/v1/using_rest",
|
|
"protocol": "rest",
|
|
"baseUrl": "https://www.googleapis.com/customsearch/",
|
|
"basePath": "/customsearch/",
|
|
"rootUrl": "https://www.googleapis.com/",
|
|
"servicePath": "customsearch/",
|
|
"batchPath": "batch",
|
|
"parameters": {
|
|
"alt": {
|
|
"type": "string",
|
|
"description": "Data format for the response.",
|
|
"default": "json",
|
|
"enum": [
|
|
"atom",
|
|
"json"
|
|
],
|
|
"enumDescriptions": [
|
|
"Responses with Content-Type of application/atom+xml",
|
|
"Responses with Content-Type of application/json"
|
|
],
|
|
"location": "query"
|
|
},
|
|
"fields": {
|
|
"type": "string",
|
|
"description": "Selector specifying which fields to include in a partial response.",
|
|
"location": "query"
|
|
},
|
|
"key": {
|
|
"type": "string",
|
|
"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
|
|
"location": "query"
|
|
},
|
|
"oauth_token": {
|
|
"type": "string",
|
|
"description": "OAuth 2.0 token for the current user.",
|
|
"location": "query"
|
|
},
|
|
"prettyPrint": {
|
|
"type": "boolean",
|
|
"description": "Returns response with indentations and line breaks.",
|
|
"default": "true",
|
|
"location": "query"
|
|
},
|
|
"quotaUser": {
|
|
"type": "string",
|
|
"description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.",
|
|
"location": "query"
|
|
},
|
|
"userIp": {
|
|
"type": "string",
|
|
"description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
|
|
"location": "query"
|
|
}
|
|
},
|
|
"schemas": {
|
|
"Context": {
|
|
"id": "Context",
|
|
"type": "object",
|
|
"properties": {
|
|
"facets": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"anchor": {
|
|
"type": "string"
|
|
},
|
|
"label": {
|
|
"type": "string"
|
|
},
|
|
"label_with_op": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"Promotion": {
|
|
"id": "Promotion",
|
|
"type": "object",
|
|
"properties": {
|
|
"bodyLines": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"htmlTitle": {
|
|
"type": "string"
|
|
},
|
|
"link": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"displayLink": {
|
|
"type": "string"
|
|
},
|
|
"htmlTitle": {
|
|
"type": "string"
|
|
},
|
|
"image": {
|
|
"type": "object",
|
|
"properties": {
|
|
"height": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"source": {
|
|
"type": "string"
|
|
},
|
|
"width": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
}
|
|
}
|
|
},
|
|
"link": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"Query": {
|
|
"id": "Query",
|
|
"type": "object",
|
|
"properties": {
|
|
"count": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"cr": {
|
|
"type": "string"
|
|
},
|
|
"cref": {
|
|
"type": "string"
|
|
},
|
|
"cx": {
|
|
"type": "string"
|
|
},
|
|
"dateRestrict": {
|
|
"type": "string"
|
|
},
|
|
"disableCnTwTranslation": {
|
|
"type": "string"
|
|
},
|
|
"exactTerms": {
|
|
"type": "string"
|
|
},
|
|
"excludeTerms": {
|
|
"type": "string"
|
|
},
|
|
"fileType": {
|
|
"type": "string"
|
|
},
|
|
"filter": {
|
|
"type": "string"
|
|
},
|
|
"gl": {
|
|
"type": "string"
|
|
},
|
|
"googleHost": {
|
|
"type": "string"
|
|
},
|
|
"highRange": {
|
|
"type": "string"
|
|
},
|
|
"hl": {
|
|
"type": "string"
|
|
},
|
|
"hq": {
|
|
"type": "string"
|
|
},
|
|
"imgColorType": {
|
|
"type": "string"
|
|
},
|
|
"imgDominantColor": {
|
|
"type": "string"
|
|
},
|
|
"imgSize": {
|
|
"type": "string"
|
|
},
|
|
"imgType": {
|
|
"type": "string"
|
|
},
|
|
"inputEncoding": {
|
|
"type": "string"
|
|
},
|
|
"language": {
|
|
"type": "string"
|
|
},
|
|
"linkSite": {
|
|
"type": "string"
|
|
},
|
|
"lowRange": {
|
|
"type": "string"
|
|
},
|
|
"orTerms": {
|
|
"type": "string"
|
|
},
|
|
"outputEncoding": {
|
|
"type": "string"
|
|
},
|
|
"relatedSite": {
|
|
"type": "string"
|
|
},
|
|
"rights": {
|
|
"type": "string"
|
|
},
|
|
"safe": {
|
|
"type": "string"
|
|
},
|
|
"searchTerms": {
|
|
"type": "string"
|
|
},
|
|
"searchType": {
|
|
"type": "string"
|
|
},
|
|
"siteSearch": {
|
|
"type": "string"
|
|
},
|
|
"siteSearchFilter": {
|
|
"type": "string"
|
|
},
|
|
"sort": {
|
|
"type": "string"
|
|
},
|
|
"startIndex": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"startPage": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"totalResults": {
|
|
"type": "string",
|
|
"format": "int64"
|
|
}
|
|
}
|
|
},
|
|
"Result": {
|
|
"id": "Result",
|
|
"type": "object",
|
|
"properties": {
|
|
"cacheId": {
|
|
"type": "string"
|
|
},
|
|
"displayLink": {
|
|
"type": "string"
|
|
},
|
|
"fileFormat": {
|
|
"type": "string"
|
|
},
|
|
"formattedUrl": {
|
|
"type": "string"
|
|
},
|
|
"htmlFormattedUrl": {
|
|
"type": "string"
|
|
},
|
|
"htmlSnippet": {
|
|
"type": "string"
|
|
},
|
|
"htmlTitle": {
|
|
"type": "string"
|
|
},
|
|
"image": {
|
|
"type": "object",
|
|
"properties": {
|
|
"byteSize": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"contextLink": {
|
|
"type": "string"
|
|
},
|
|
"height": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"thumbnailHeight": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"thumbnailLink": {
|
|
"type": "string"
|
|
},
|
|
"thumbnailWidth": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"width": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
}
|
|
}
|
|
},
|
|
"kind": {
|
|
"type": "string",
|
|
"default": "customsearch#result"
|
|
},
|
|
"labels": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"displayName": {
|
|
"type": "string"
|
|
},
|
|
"label_with_op": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"link": {
|
|
"type": "string"
|
|
},
|
|
"mime": {
|
|
"type": "string"
|
|
},
|
|
"pagemap": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "any"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"snippet": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"Search": {
|
|
"id": "Search",
|
|
"type": "object",
|
|
"properties": {
|
|
"context": {
|
|
"$ref": "Context"
|
|
},
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "Result"
|
|
}
|
|
},
|
|
"kind": {
|
|
"type": "string",
|
|
"default": "customsearch#search"
|
|
},
|
|
"promotions": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "Promotion"
|
|
}
|
|
},
|
|
"queries": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "Query"
|
|
}
|
|
}
|
|
},
|
|
"searchInformation": {
|
|
"type": "object",
|
|
"properties": {
|
|
"formattedSearchTime": {
|
|
"type": "string"
|
|
},
|
|
"formattedTotalResults": {
|
|
"type": "string"
|
|
},
|
|
"searchTime": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"totalResults": {
|
|
"type": "string",
|
|
"format": "int64"
|
|
}
|
|
}
|
|
},
|
|
"spelling": {
|
|
"type": "object",
|
|
"properties": {
|
|
"correctedQuery": {
|
|
"type": "string"
|
|
},
|
|
"htmlCorrectedQuery": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"type": "object",
|
|
"properties": {
|
|
"template": {
|
|
"type": "string",
|
|
"default": "https://www.googleapis.com/customsearch/v1?q={searchTerms}&num={count?}&start={startIndex?}&lr={language?}&safe={safe?}&cx={cx?}&cref={cref?}&sort={sort?}&filter={filter?}&gl={gl?}&cr={cr?}&googlehost={googleHost?}&c2coff={disableCnTwTranslation?}&hq={hq?}&hl={hl?}&siteSearch={siteSearch?}&siteSearchFilter={siteSearchFilter?}&exactTerms={exactTerms?}&excludeTerms={excludeTerms?}&linkSite={linkSite?}&orTerms={orTerms?}&relatedSite={relatedSite?}&dateRestrict={dateRestrict?}&lowRange={lowRange?}&highRange={highRange?}&searchType={searchType}&fileType={fileType?}&rights={rights?}&imgSize={imgSize?}&imgType={imgType?}&imgColorType={imgColorType?}&imgDominantColor={imgDominantColor?}&alt=json"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"default": "application/json"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"resources": {
|
|
"cse": {
|
|
"methods": {
|
|
"list": {
|
|
"id": "search.cse.list",
|
|
"path": "v1",
|
|
"httpMethod": "GET",
|
|
"description": "Returns metadata about the search performed, metadata about the custom search engine used for the search, and the search results.",
|
|
"parameters": {
|
|
"c2coff": {
|
|
"type": "string",
|
|
"description": "Turns off the translation between zh-CN and zh-TW.",
|
|
"location": "query"
|
|
},
|
|
"cr": {
|
|
"type": "string",
|
|
"description": "Country restrict(s).",
|
|
"location": "query"
|
|
},
|
|
"cref": {
|
|
"type": "string",
|
|
"description": "The URL of a linked custom search engine",
|
|
"location": "query"
|
|
},
|
|
"cx": {
|
|
"type": "string",
|
|
"description": "The custom search engine ID to scope this search query",
|
|
"location": "query"
|
|
},
|
|
"dateRestrict": {
|
|
"type": "string",
|
|
"description": "Specifies all search results are from a time period",
|
|
"location": "query"
|
|
},
|
|
"exactTerms": {
|
|
"type": "string",
|
|
"description": "Identifies a phrase that all documents in the search results must contain",
|
|
"location": "query"
|
|
},
|
|
"excludeTerms": {
|
|
"type": "string",
|
|
"description": "Identifies a word or phrase that should not appear in any documents in the search results",
|
|
"location": "query"
|
|
},
|
|
"fileType": {
|
|
"type": "string",
|
|
"description": "Returns images of a specified type. Some of the allowed values are: bmp, gif, png, jpg, svg, pdf, ...",
|
|
"location": "query"
|
|
},
|
|
"filter": {
|
|
"type": "string",
|
|
"description": "Controls turning on or off the duplicate content filter.",
|
|
"enum": [
|
|
"0",
|
|
"1"
|
|
],
|
|
"enumDescriptions": [
|
|
"Turns off duplicate content filter.",
|
|
"Turns on duplicate content filter."
|
|
],
|
|
"location": "query"
|
|
},
|
|
"gl": {
|
|
"type": "string",
|
|
"description": "Geolocation of end user.",
|
|
"location": "query"
|
|
},
|
|
"googlehost": {
|
|
"type": "string",
|
|
"description": "The local Google domain to use to perform the search.",
|
|
"location": "query"
|
|
},
|
|
"highRange": {
|
|
"type": "string",
|
|
"description": "Creates a range in form as_nlo value..as_nhi value and attempts to append it to query",
|
|
"location": "query"
|
|
},
|
|
"hl": {
|
|
"type": "string",
|
|
"description": "Sets the user interface language.",
|
|
"location": "query"
|
|
},
|
|
"hq": {
|
|
"type": "string",
|
|
"description": "Appends the extra query terms to the query.",
|
|
"location": "query"
|
|
},
|
|
"imgColorType": {
|
|
"type": "string",
|
|
"description": "Returns black and white, grayscale, or color images: mono, gray, and color.",
|
|
"enum": [
|
|
"color",
|
|
"gray",
|
|
"mono"
|
|
],
|
|
"enumDescriptions": [
|
|
"color",
|
|
"gray",
|
|
"mono"
|
|
],
|
|
"location": "query"
|
|
},
|
|
"imgDominantColor": {
|
|
"type": "string",
|
|
"description": "Returns images of a specific dominant color: yellow, green, teal, blue, purple, pink, white, gray, black and brown.",
|
|
"enum": [
|
|
"black",
|
|
"blue",
|
|
"brown",
|
|
"gray",
|
|
"green",
|
|
"pink",
|
|
"purple",
|
|
"teal",
|
|
"white",
|
|
"yellow"
|
|
],
|
|
"enumDescriptions": [
|
|
"black",
|
|
"blue",
|
|
"brown",
|
|
"gray",
|
|
"green",
|
|
"pink",
|
|
"purple",
|
|
"teal",
|
|
"white",
|
|
"yellow"
|
|
],
|
|
"location": "query"
|
|
},
|
|
"imgSize": {
|
|
"type": "string",
|
|
"description": "Returns images of a specified size, where size can be one of: icon, small, medium, large, xlarge, xxlarge, and huge.",
|
|
"enum": [
|
|
"huge",
|
|
"icon",
|
|
"large",
|
|
"medium",
|
|
"small",
|
|
"xlarge",
|
|
"xxlarge"
|
|
],
|
|
"enumDescriptions": [
|
|
"huge",
|
|
"icon",
|
|
"large",
|
|
"medium",
|
|
"small",
|
|
"xlarge",
|
|
"xxlarge"
|
|
],
|
|
"location": "query"
|
|
},
|
|
"imgType": {
|
|
"type": "string",
|
|
"description": "Returns images of a type, which can be one of: clipart, face, lineart, news, and photo.",
|
|
"enum": [
|
|
"clipart",
|
|
"face",
|
|
"lineart",
|
|
"news",
|
|
"photo"
|
|
],
|
|
"enumDescriptions": [
|
|
"clipart",
|
|
"face",
|
|
"lineart",
|
|
"news",
|
|
"photo"
|
|
],
|
|
"location": "query"
|
|
},
|
|
"linkSite": {
|
|
"type": "string",
|
|
"description": "Specifies that all search results should contain a link to a particular URL",
|
|
"location": "query"
|
|
},
|
|
"lowRange": {
|
|
"type": "string",
|
|
"description": "Creates a range in form as_nlo value..as_nhi value and attempts to append it to query",
|
|
"location": "query"
|
|
},
|
|
"lr": {
|
|
"type": "string",
|
|
"description": "The language restriction for the search results",
|
|
"enum": [
|
|
"lang_ar",
|
|
"lang_bg",
|
|
"lang_ca",
|
|
"lang_cs",
|
|
"lang_da",
|
|
"lang_de",
|
|
"lang_el",
|
|
"lang_en",
|
|
"lang_es",
|
|
"lang_et",
|
|
"lang_fi",
|
|
"lang_fr",
|
|
"lang_hr",
|
|
"lang_hu",
|
|
"lang_id",
|
|
"lang_is",
|
|
"lang_it",
|
|
"lang_iw",
|
|
"lang_ja",
|
|
"lang_ko",
|
|
"lang_lt",
|
|
"lang_lv",
|
|
"lang_nl",
|
|
"lang_no",
|
|
"lang_pl",
|
|
"lang_pt",
|
|
"lang_ro",
|
|
"lang_ru",
|
|
"lang_sk",
|
|
"lang_sl",
|
|
"lang_sr",
|
|
"lang_sv",
|
|
"lang_tr",
|
|
"lang_zh-CN",
|
|
"lang_zh-TW"
|
|
],
|
|
"enumDescriptions": [
|
|
"Arabic",
|
|
"Bulgarian",
|
|
"Catalan",
|
|
"Czech",
|
|
"Danish",
|
|
"German",
|
|
"Greek",
|
|
"English",
|
|
"Spanish",
|
|
"Estonian",
|
|
"Finnish",
|
|
"French",
|
|
"Croatian",
|
|
"Hungarian",
|
|
"Indonesian",
|
|
"Icelandic",
|
|
"Italian",
|
|
"Hebrew",
|
|
"Japanese",
|
|
"Korean",
|
|
"Lithuanian",
|
|
"Latvian",
|
|
"Dutch",
|
|
"Norwegian",
|
|
"Polish",
|
|
"Portuguese",
|
|
"Romanian",
|
|
"Russian",
|
|
"Slovak",
|
|
"Slovenian",
|
|
"Serbian",
|
|
"Swedish",
|
|
"Turkish",
|
|
"Chinese (Simplified)",
|
|
"Chinese (Traditional)"
|
|
],
|
|
"location": "query"
|
|
},
|
|
"num": {
|
|
"type": "integer",
|
|
"description": "Number of search results to return",
|
|
"default": "10",
|
|
"format": "uint32",
|
|
"location": "query"
|
|
},
|
|
"orTerms": {
|
|
"type": "string",
|
|
"description": "Provides additional search terms to check for in a document, where each document in the search results must contain at least one of the additional search terms",
|
|
"location": "query"
|
|
},
|
|
"q": {
|
|
"type": "string",
|
|
"description": "Query",
|
|
"required": true,
|
|
"location": "query"
|
|
},
|
|
"relatedSite": {
|
|
"type": "string",
|
|
"description": "Specifies that all search results should be pages that are related to the specified URL",
|
|
"location": "query"
|
|
},
|
|
"rights": {
|
|
"type": "string",
|
|
"description": "Filters based on licensing. Supported values include: cc_publicdomain, cc_attribute, cc_sharealike, cc_noncommercial, cc_nonderived and combinations of these.",
|
|
"location": "query"
|
|
},
|
|
"safe": {
|
|
"type": "string",
|
|
"description": "Search safety level",
|
|
"default": "off",
|
|
"enum": [
|
|
"high",
|
|
"medium",
|
|
"off"
|
|
],
|
|
"enumDescriptions": [
|
|
"Enables highest level of safe search filtering.",
|
|
"Enables moderate safe search filtering.",
|
|
"Disables safe search filtering."
|
|
],
|
|
"location": "query"
|
|
},
|
|
"searchType": {
|
|
"type": "string",
|
|
"description": "Specifies the search type: image.",
|
|
"enum": [
|
|
"image"
|
|
],
|
|
"enumDescriptions": [
|
|
"custom image search"
|
|
],
|
|
"location": "query"
|
|
},
|
|
"siteSearch": {
|
|
"type": "string",
|
|
"description": "Specifies all search results should be pages from a given site",
|
|
"location": "query"
|
|
},
|
|
"siteSearchFilter": {
|
|
"type": "string",
|
|
"description": "Controls whether to include or exclude results from the site named in the as_sitesearch parameter",
|
|
"enum": [
|
|
"e",
|
|
"i"
|
|
],
|
|
"enumDescriptions": [
|
|
"exclude",
|
|
"include"
|
|
],
|
|
"location": "query"
|
|
},
|
|
"sort": {
|
|
"type": "string",
|
|
"description": "The sort expression to apply to the results",
|
|
"location": "query"
|
|
},
|
|
"start": {
|
|
"type": "integer",
|
|
"description": "The index of the first result to return",
|
|
"format": "uint32",
|
|
"location": "query"
|
|
}
|
|
},
|
|
"parameterOrder": [
|
|
"q"
|
|
],
|
|
"response": {
|
|
"$ref": "Search"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|