-
counts(query, [options], callback)
. query
is the search query. options
is a dictionary with permissible values below -- it can be ommitted. callback
takes an error and a results object.
The following options can be provided:
market
sources
defaults to all sources.
Format of results to callback:
{ web: 334,
image: 20400,
video: 33400,
news: 1460 }
-
web(query, [options], callback)
"Web" only search. query
is the search query. options
is a dictionary with permissible values below -- it can be ommitted. callback
takes an error and a results object.
The following options can be provided:
top
default is 50skip
default is 0market
Format of results to callback:
[ { id: '...',
title: '...',
description: '...',
url: '...' },
...
]
-
images(query, [options], callback)
"Image" only search. query
is the search query. options
is a dictionary with permissible values below -- it can be ommitted. callback
takes an error and a results object.
The following options can be provided:
top
default is 50skip
default is 0market
Format of results to callback:
[ { id: '...',
title: '...',
url: 'http://...',
sourceUrl: 'http://...',
displayUrl: '...',
width: 1025,
height: 1600,
size: 136701,
type: 'image/jpeg',
thumbnail:
{ url: 'http://...',
type: 'image/jpg',
width: 192,
height: 300,
size: 6946 }
},
...
]
-
videos(query, [options], callback)
"Video" only search. query
is the search query. options
is a dictionary with permissible values below -- it can be ommitted. callback
takes an error and a results object.
The following options can be provided:
top
default is 50skip
default is 0market
Format of results to callback:
[ { id: '...',
title: '...',
url: 'https://...',
displayUrl: 'http://...',
runtime: 62000,
thumbnail:
{ url: 'http://...',
type: 'image/jpg',
width: 160,
height: 120,
size: 18423 } },
...
]
-
news(query, [options], callback)
"News" only search. query
is the search query. options
is a dictionary with permissible values below -- it can be ommitted. callback
takes an error and a results object.
The following options can be provided:
top
default is 15skip
default is 0market
Format of results to callback:
[ { id: '...',
title: '...',
source: '...',
url: 'http://...',
description: '...',
date: [Date Object] },
...
]
-
related(query, [options], callback)
"RelatedSearch" only search. query
is the search query. options
is a dictionary with permissible values below -- it can be ommitted. callback
takes an error and a results object.
The following options can be provided:
top
default is 50skip
default is 0market
Format of results to callback:
[ { query: '...',
url: 'http://...' },
...
]
-
spelling(query, [options], callback)
"SpellingSuggestions" only search. query
is the search query. options
is a dictionary with permissible values below -- it can be ommitted. callback
takes an error and a results object.
The following options can be provided:
top
default is 50skip
default is 0market
callback
's result is a list of alternate query spellings as strings.
-
composite(query, [options], callback)
"Composite" searches all of the provided sources. query
is the search query. options
is a dictionary with permissible values below -- it can be ommitted. callback
takes an error and a results object.
The following options can be provided:
top
default is 50skip
default is 0sources
defaults to all sourcesmarket
Format of results to callback:
{ web: [ ... ],
images: [ ... ],
videos: [ ... ],
news: [ ... ],
spelling: [ ... ],
related: [ ... ]
}
Each of the sources with in the composite result follows is the same format
returned by each of the individual source searches.