Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Search

import type { Search } from "https://googleapis.deno.dev/v1/customsearch:v1.ts";

Response to a custom search request.

interface Search {
context?: {
[key: string]: any;
}
;
items?: Result[];
kind?: string;
promotions?: Promotion[];
queries?: {
nextPage?: {
count?: number;
cr?: string;
cx?: string;
dateRestrict?: string;
disableCnTwTranslation?: string;
exactTerms?: string;
excludeTerms?: string;
fileType?: string;
filter?: string;
gl?: string;
googleHost?: string;
highRange?: string;
hl?: string;
hq?: string;
imgColorType?: string;
imgDominantColor?: string;
imgSize?: string;
imgType?: string;
inputEncoding?: string;
language?: string;
linkSite?: string;
lowRange?: string;
orTerms?: string;
outputEncoding?: string;
relatedSite?: string;
rights?: string;
safe?: string;
searchTerms?: string;
searchType?: string;
siteSearch?: string;
siteSearchFilter?: string;
sort?: string;
startIndex?: number;
startPage?: number;
title?: string;
totalResults?: bigint;
}
[]
;
previousPage?: {
count?: number;
cr?: string;
cx?: string;
dateRestrict?: string;
disableCnTwTranslation?: string;
exactTerms?: string;
excludeTerms?: string;
fileType?: string;
filter?: string;
gl?: string;
googleHost?: string;
highRange?: string;
hl?: string;
hq?: string;
imgColorType?: string;
imgDominantColor?: string;
imgSize?: string;
imgType?: string;
inputEncoding?: string;
language?: string;
linkSite?: string;
lowRange?: string;
orTerms?: string;
outputEncoding?: string;
relatedSite?: string;
rights?: string;
safe?: string;
searchTerms?: string;
searchType?: string;
siteSearch?: string;
siteSearchFilter?: string;
sort?: string;
startIndex?: number;
startPage?: number;
title?: string;
totalResults?: bigint;
}
[]
;
request?: {
count?: number;
cr?: string;
cx?: string;
dateRestrict?: string;
disableCnTwTranslation?: string;
exactTerms?: string;
excludeTerms?: string;
fileType?: string;
filter?: string;
gl?: string;
googleHost?: string;
highRange?: string;
hl?: string;
hq?: string;
imgColorType?: string;
imgDominantColor?: string;
imgSize?: string;
imgType?: string;
inputEncoding?: string;
language?: string;
linkSite?: string;
lowRange?: string;
orTerms?: string;
outputEncoding?: string;
relatedSite?: string;
rights?: string;
safe?: string;
searchTerms?: string;
searchType?: string;
siteSearch?: string;
siteSearchFilter?: string;
sort?: string;
startIndex?: number;
startPage?: number;
title?: string;
totalResults?: bigint;
}
[]
;
}
;
searchInformation?: {
formattedSearchTime?: string;
formattedTotalResults?: string;
searchTime?: number;
totalResults?: string;
}
;
spelling?: {
correctedQuery?: string;
htmlCorrectedQuery?: string;
}
;
url?: {
template?: string;
type?: string;
}
;
}

§Properties

§
context?: {
[key: string]: any;
}
[src]

Metadata and refinements associated with the given search engine, including: * The name of the search engine that was used for the query. * A set of facet objects (refinements) you can use for refining a search.

§
items?: Result[]
[src]

The current set of custom search results.

§
kind?: string
[src]

Unique identifier for the type of current object. For this API, it is customsearch#search.

§
promotions?: Promotion[]
[src]

The set of promotions. Present only if the custom search engine's configuration files define any promotions for the given query.

§
queries?: {
nextPage?: {
count?: number;
cr?: string;
cx?: string;
dateRestrict?: string;
disableCnTwTranslation?: string;
exactTerms?: string;
excludeTerms?: string;
fileType?: string;
filter?: string;
gl?: string;
googleHost?: string;
highRange?: string;
hl?: string;
hq?: string;
imgColorType?: string;
imgDominantColor?: string;
imgSize?: string;
imgType?: string;
inputEncoding?: string;
language?: string;
linkSite?: string;
lowRange?: string;
orTerms?: string;
outputEncoding?: string;
relatedSite?: string;
rights?: string;
safe?: string;
searchTerms?: string;
searchType?: string;
siteSearch?: string;
siteSearchFilter?: string;
sort?: string;
startIndex?: number;
startPage?: number;
title?: string;
totalResults?: bigint;
}
[]
;
previousPage?: {
count?: number;
cr?: string;
cx?: string;
dateRestrict?: string;
disableCnTwTranslation?: string;
exactTerms?: string;
excludeTerms?: string;
fileType?: string;
filter?: string;
gl?: string;
googleHost?: string;
highRange?: string;
hl?: string;
hq?: string;
imgColorType?: string;
imgDominantColor?: string;
imgSize?: string;
imgType?: string;
inputEncoding?: string;
language?: string;
linkSite?: string;
lowRange?: string;
orTerms?: string;
outputEncoding?: string;
relatedSite?: string;
rights?: string;
safe?: string;
searchTerms?: string;
searchType?: string;
siteSearch?: string;
siteSearchFilter?: string;
sort?: string;
startIndex?: number;
startPage?: number;
title?: string;
totalResults?: bigint;
}
[]
;
request?: {
count?: number;
cr?: string;
cx?: string;
dateRestrict?: string;
disableCnTwTranslation?: string;
exactTerms?: string;
excludeTerms?: string;
fileType?: string;
filter?: string;
gl?: string;
googleHost?: string;
highRange?: string;
hl?: string;
hq?: string;
imgColorType?: string;
imgDominantColor?: string;
imgSize?: string;
imgType?: string;
inputEncoding?: string;
language?: string;
linkSite?: string;
lowRange?: string;
orTerms?: string;
outputEncoding?: string;
relatedSite?: string;
rights?: string;
safe?: string;
searchTerms?: string;
searchType?: string;
siteSearch?: string;
siteSearchFilter?: string;
sort?: string;
startIndex?: number;
startPage?: number;
title?: string;
totalResults?: bigint;
}
[]
;
}
[src]

Query metadata for the previous, current, and next pages of results.

§
searchInformation?: {
formattedSearchTime?: string;
formattedTotalResults?: string;
searchTime?: number;
totalResults?: string;
}
[src]

Metadata about a search operation.

§
spelling?: {
correctedQuery?: string;
htmlCorrectedQuery?: string;
}
[src]

Spell correction information for a query.

§
url?: {
template?: string;
type?: string;
}
[src]

OpenSearch template and URL.