UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 18.4 kB
{"openapi":"3.0.0","info":{"contact":{"name":"Google","url":"https://google.com"},"description":"Searches over a website or collection of websites","title":"CustomSearch","version":"v1","x-apiClientRegistration":{"url":"https://console.developers.google.com"},"x-apisguru-categories":["search"],"x-logo":{"url":"https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},"x-origin":[{"converter":{"url":"https://github.com/lucybot/api-spec-converter","version":"2.7.18"},"format":"google","url":"https://www.googleapis.com/discovery/v1/apis/customsearch/v1/rest","version":"v1"}],"x-preferred":true,"x-providerName":"googleapis.com","x-serviceName":"customsearch"},"externalDocs":{"url":"https://developers.google.com/custom-search/v1/using_rest"},"tags":[{"name":"cse"}],"paths":{"/v1":{"get":{"description":"Returns metadata about the search performed, metadata about the custom search engine used for the search, and the search results.","operationId":"search.cse.list","parameters":[{"description":"Turns off the translation between zh-CN and zh-TW.","in":"query","name":"c2coff","schema":{"type":"string"}},{"description":"Country restrict(s).","in":"query","name":"cr","schema":{"type":"string"}},{"description":"The custom search engine ID to scope this search query","in":"query","name":"cx","schema":{"type":"string"}},{"description":"Specifies all search results are from a time period","in":"query","name":"dateRestrict","schema":{"type":"string"}},{"description":"Identifies a phrase that all documents in the search results must contain","in":"query","name":"exactTerms","schema":{"type":"string"}},{"description":"Identifies a word or phrase that should not appear in any documents in the search results","in":"query","name":"excludeTerms","schema":{"type":"string"}},{"description":"Returns images of a specified type. Some of the allowed values are: bmp, gif, png, jpg, svg, pdf, ...","in":"query","name":"fileType","schema":{"type":"string"}},{"description":"Controls turning on or off the duplicate content filter.","in":"query","name":"filter","schema":{"type":"string","enum":["0","1"]}},{"description":"Geolocation of end user.","in":"query","name":"gl","schema":{"type":"string"}},{"description":"The local Google domain to use to perform the search.","in":"query","name":"googlehost","schema":{"type":"string"}},{"description":"Creates a range in form as_nlo value..as_nhi value and attempts to append it to query","in":"query","name":"highRange","schema":{"type":"string"}},{"description":"Sets the user interface language.","in":"query","name":"hl","schema":{"type":"string"}},{"description":"Appends the extra query terms to the query.","in":"query","name":"hq","schema":{"type":"string"}},{"description":"Returns black and white, grayscale, or color images: mono, gray, and color.","in":"query","name":"imgColorType","schema":{"type":"string","enum":["color","gray","mono"]}},{"description":"Returns images of a specific dominant color: red, orange, yellow, green, teal, blue, purple, pink, white, gray, black and brown.","in":"query","name":"imgDominantColor","schema":{"type":"string","enum":["black","blue","brown","gray","green","orange","pink","purple","red","teal","white","yellow"]}},{"description":"Returns images of a specified size, where size can be one of: icon, small, medium, large, xlarge, xxlarge, and huge.","in":"query","name":"imgSize","schema":{"type":"string","enum":["huge","icon","large","medium","small","xlarge","xxlarge"]}},{"description":"Returns images of a type, which can be one of: clipart, face, lineart, news, and photo.","in":"query","name":"imgType","schema":{"type":"string","enum":["clipart","face","lineart","news","photo"]}},{"description":"Specifies that all search results should contain a link to a particular URL","in":"query","name":"linkSite","schema":{"type":"string"}},{"description":"Creates a range in form as_nlo value..as_nhi value and attempts to append it to query","in":"query","name":"lowRange","schema":{"type":"string"}},{"description":"The language restriction for the search results","in":"query","name":"lr","schema":{"type":"string","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"]}},{"description":"Number of search results to return","in":"query","name":"num","schema":{"type":"integer","default":10}},{"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","in":"query","name":"orTerms","schema":{"type":"string"}},{"description":"Query","in":"query","name":"q","required":true,"schema":{"type":"string"}},{"description":"Specifies that all search results should be pages that are related to the specified URL","in":"query","name":"relatedSite","schema":{"type":"string"}},{"description":"Filters based on licensing. Supported values include: cc_publicdomain, cc_attribute, cc_sharealike, cc_noncommercial, cc_nonderived and combinations of these.","in":"query","name":"rights","schema":{"type":"string"}},{"description":"Search safety level","in":"query","name":"safe","schema":{"type":"string","enum":["active","high","medium","off"],"default":"off"}},{"description":"Specifies the search type: image.","in":"query","name":"searchType","schema":{"type":"string","enum":["image"]}},{"description":"Specifies all search results should be pages from a given site","in":"query","name":"siteSearch","schema":{"type":"string"}},{"description":"Controls whether to include or exclude results from the site named in the as_sitesearch parameter","in":"query","name":"siteSearchFilter","schema":{"type":"string","enum":["e","i"]}},{"description":"The sort expression to apply to the results","in":"query","name":"sort","schema":{"type":"string"}},{"description":"The index of the first result to return","in":"query","name":"start","schema":{"type":"integer"}}],"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Search"}}}}},"tags":["cse"]},"parameters":[{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/userIp"}]},"/v1/siterestrict":{"get":{"description":"Returns metadata about the search performed, metadata about the custom search engine used for the search, and the search results. Uses a small set of url patterns.","operationId":"search.cse.siterestrict.list","parameters":[{"description":"Turns off the translation between zh-CN and zh-TW.","in":"query","name":"c2coff","schema":{"type":"string"}},{"description":"Country restrict(s).","in":"query","name":"cr","schema":{"type":"string"}},{"description":"The custom search engine ID to scope this search query","in":"query","name":"cx","schema":{"type":"string"}},{"description":"Specifies all search results are from a time period","in":"query","name":"dateRestrict","schema":{"type":"string"}},{"description":"Identifies a phrase that all documents in the search results must contain","in":"query","name":"exactTerms","schema":{"type":"string"}},{"description":"Identifies a word or phrase that should not appear in any documents in the search results","in":"query","name":"excludeTerms","schema":{"type":"string"}},{"description":"Returns images of a specified type. Some of the allowed values are: bmp, gif, png, jpg, svg, pdf, ...","in":"query","name":"fileType","schema":{"type":"string"}},{"description":"Controls turning on or off the duplicate content filter.","in":"query","name":"filter","schema":{"type":"string","enum":["0","1"]}},{"description":"Geolocation of end user.","in":"query","name":"gl","schema":{"type":"string"}},{"description":"The local Google domain to use to perform the search.","in":"query","name":"googlehost","schema":{"type":"string"}},{"description":"Creates a range in form as_nlo value..as_nhi value and attempts to append it to query","in":"query","name":"highRange","schema":{"type":"string"}},{"description":"Sets the user interface language.","in":"query","name":"hl","schema":{"type":"string"}},{"description":"Appends the extra query terms to the query.","in":"query","name":"hq","schema":{"type":"string"}},{"description":"Returns black and white, grayscale, or color images: mono, gray, and color.","in":"query","name":"imgColorType","schema":{"type":"string","enum":["color","gray","mono"]}},{"description":"Returns images of a specific dominant color: red, orange, yellow, green, teal, blue, purple, pink, white, gray, black and brown.","in":"query","name":"imgDominantColor","schema":{"type":"string","enum":["black","blue","brown","gray","green","orange","pink","purple","red","teal","white","yellow"]}},{"description":"Returns images of a specified size, where size can be one of: icon, small, medium, large, xlarge, xxlarge, and huge.","in":"query","name":"imgSize","schema":{"type":"string","enum":["huge","icon","large","medium","small","xlarge","xxlarge"]}},{"description":"Returns images of a type, which can be one of: clipart, face, lineart, news, and photo.","in":"query","name":"imgType","schema":{"type":"string","enum":["clipart","face","lineart","news","photo"]}},{"description":"Specifies that all search results should contain a link to a particular URL","in":"query","name":"linkSite","schema":{"type":"string"}},{"description":"Creates a range in form as_nlo value..as_nhi value and attempts to append it to query","in":"query","name":"lowRange","schema":{"type":"string"}},{"description":"The language restriction for the search results","in":"query","name":"lr","schema":{"type":"string","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"]}},{"description":"Number of search results to return","in":"query","name":"num","schema":{"type":"integer","default":10}},{"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","in":"query","name":"orTerms","schema":{"type":"string"}},{"description":"Query","in":"query","name":"q","required":true,"schema":{"type":"string"}},{"description":"Specifies that all search results should be pages that are related to the specified URL","in":"query","name":"relatedSite","schema":{"type":"string"}},{"description":"Filters based on licensing. Supported values include: cc_publicdomain, cc_attribute, cc_sharealike, cc_noncommercial, cc_nonderived and combinations of these.","in":"query","name":"rights","schema":{"type":"string"}},{"description":"Search safety level","in":"query","name":"safe","schema":{"type":"string","enum":["high","medium","off"],"default":"off"}},{"description":"Specifies the search type: image.","in":"query","name":"searchType","schema":{"type":"string","enum":["image"]}},{"description":"Specifies all search results should be pages from a given site","in":"query","name":"siteSearch","schema":{"type":"string"}},{"description":"Controls whether to include or exclude results from the site named in the as_sitesearch parameter","in":"query","name":"siteSearchFilter","schema":{"type":"string","enum":["e","i"]}},{"description":"The sort expression to apply to the results","in":"query","name":"sort","schema":{"type":"string"}},{"description":"The index of the first result to return","in":"query","name":"start","schema":{"type":"integer"}}],"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Search"}}}}},"tags":["cse"]},"parameters":[{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/userIp"}]}},"servers":[{"url":"https://www.googleapis.com/customsearch"}],"components":{"parameters":{"alt":{"description":"Data format for the response.","in":"query","name":"alt","schema":{"type":"string","enum":["json"],"default":"json"}},"fields":{"description":"Selector specifying which fields to include in a partial response.","in":"query","name":"fields","schema":{"type":"string"}},"key":{"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.","in":"query","name":"key","schema":{"type":"string"}},"oauth_token":{"description":"OAuth 2.0 token for the current user.","in":"query","name":"oauth_token","schema":{"type":"string"}},"prettyPrint":{"description":"Returns response with indentations and line breaks.","in":"query","name":"prettyPrint","schema":{"type":"boolean","default":true}},"quotaUser":{"description":"An opaque string that represents a user for quota purposes. Must not exceed 40 characters.","in":"query","name":"quotaUser","schema":{"type":"string"}},"userIp":{"description":"Deprecated. Please use quotaUser instead.","in":"query","name":"userIp","schema":{"type":"string"}}},"schemas":{"Context":{"properties":{"facets":{"items":{"items":{"properties":{"anchor":{"type":"string"},"label":{"type":"string"},"label_with_op":{"type":"string"}},"type":"object"},"type":"array"},"type":"array"},"title":{"type":"string"}},"type":"object"},"Promotion":{"properties":{"bodyLines":{"items":{"properties":{"htmlTitle":{"type":"string"},"link":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"displayLink":{"type":"string"},"htmlTitle":{"type":"string"},"image":{"properties":{"height":{"format":"int32","type":"integer"},"source":{"type":"string"},"width":{"format":"int32","type":"integer"}},"type":"object"},"link":{"type":"string"},"title":{"type":"string"}},"type":"object"},"Query":{"properties":{"count":{"format":"int32","type":"integer"},"cr":{"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":{"format":"int32","type":"integer"},"startPage":{"format":"int32","type":"integer"},"title":{"type":"string"},"totalResults":{"format":"int64","type":"string"}},"type":"object"},"Result":{"properties":{"cacheId":{"type":"string"},"displayLink":{"type":"string"},"fileFormat":{"type":"string"},"formattedUrl":{"type":"string"},"htmlFormattedUrl":{"type":"string"},"htmlSnippet":{"type":"string"},"htmlTitle":{"type":"string"},"image":{"properties":{"byteSize":{"format":"int32","type":"integer"},"contextLink":{"type":"string"},"height":{"format":"int32","type":"integer"},"thumbnailHeight":{"format":"int32","type":"integer"},"thumbnailLink":{"type":"string"},"thumbnailWidth":{"format":"int32","type":"integer"},"width":{"format":"int32","type":"integer"}},"type":"object"},"kind":{"default":"customsearch#result","type":"string"},"labels":{"items":{"properties":{"displayName":{"type":"string"},"label_with_op":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"link":{"type":"string"},"mime":{"type":"string"},"pagemap":{"additionalProperties":{"items":{"additionalProperties":{},"type":"object"},"type":"array"},"type":"object"},"snippet":{"type":"string"},"title":{"type":"string"}},"type":"object"},"Search":{"properties":{"context":{"$ref":"#/components/schemas/Context"},"items":{"items":{"$ref":"#/components/schemas/Result"},"type":"array"},"kind":{"default":"customsearch#search","type":"string"},"promotions":{"items":{"$ref":"#/components/schemas/Promotion"},"type":"array"},"queries":{"additionalProperties":{"items":{"$ref":"#/components/schemas/Query"},"type":"array"},"type":"object"},"searchInformation":{"properties":{"formattedSearchTime":{"type":"string"},"formattedTotalResults":{"type":"string"},"searchTime":{"format":"double","type":"number"},"totalResults":{"format":"int64","type":"string"}},"type":"object"},"spelling":{"properties":{"correctedQuery":{"type":"string"},"htmlCorrectedQuery":{"type":"string"}},"type":"object"},"url":{"properties":{"template":{"default":"https://www.googleapis.com/customsearch/v1?q={searchTerms}&num={count?}&start={startIndex?}&lr={language?}&safe={safe?}&cx={cx?}&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":"string"},"type":{"default":"application/json","type":"string"}},"type":"object"}},"type":"object"}}}}