hubot-search
Advanced tools
Comparing version 0.0.4 to 0.1.0
{ | ||
"name": "hubot-search", | ||
"description": "An extendable Hubot script for querying several search engine services: Google Custom Search, and Bing Search API.", | ||
"version": "0.0.4", | ||
"version": "0.1.0", | ||
"author": "Ian Lai <os@fyianlai.com>", | ||
"license": "MIT", | ||
"keywords": "hubot, hubot-scripts, search engine, google, duckduckgo, bing, web search", | ||
"keywords": "hubot, hubot-scripts, search engine, google, microsoft, cognitive services, bing, web search, custom search", | ||
"repository": { | ||
@@ -9,0 +9,0 @@ "type": "git", |
@@ -6,7 +6,17 @@ # hubot-search | ||
An extendable Hubot script for querying several search engine services: [Google Custom Search][gcse], and [Bing Search API][bse]. | ||
An extendable Hubot script for querying several search engine services: [Google Custom Search][googlesearch], [Azure Marketplace - Bing Search API v2][azurebing], and [Microsoft Cognitive Services - Bing Search API v5][cognitivebing]. | ||
See [`src/search.coffee`](src/search.coffee) for full documentation. | ||
--- | ||
**Attention:** Azure Marketplace _"Bing Search"_ and _"Bing Search Web Results Only"_ API (v2) [offerings][azurebing] will end of life on **December 15, 2016**. | ||
Currently by default, this script will use [Azure Marketplace - Bing Search API v2][azurebing], and the `BING_SEARCH_API_KEY` environment variable should be the [v2 key][azurebingkey] (from Azure Marketplace). | ||
Nevertheless, we strongly recommend that you use [Microsoft Cognitive Services - Bing Search API v5][cognitivebing] by setting `USE_BING_V5` to `true` in the environment that is using this script, and ensuring the `BING_SEARCH_API_KEY` is the [v5 key][cognitivebingkey] (from Cognitive Services). | ||
`USE_BING_V5` will not be necessary by 2017 when the v2 API is deprecated at end of life. | ||
## Installation via NPM | ||
@@ -36,6 +46,6 @@ | ||
`GOOGLE_API_KEY` | N/A | A unique developer [API key](https://developers.google.com/custom-search/json-api/v1/introduction#identify_your_application_to_google_with_api_key) is required to use Google's Custom Search API | ||
`GOOGLE_CUSTOM_SEARCH` | N/A | The [Google Custom Search][gcse] engine [identifier](https://cse.google.com/cse/all) (the `cx` portion of the custom search engine URL) | ||
`BING_SEARCH_API_KEY` | N/A | The [primary account key](https://datamarket.azure.com/dataset/explore/bing/searchweb) for performing [Bing Search API][bse] queries | ||
`GOOGLE_CUSTOM_SEARCH` | N/A | The [Google Custom Search][googlesearch] engine [identifier](https://cse.google.com/cse/all) (the `cx` portion of the custom search engine URL) | ||
`BING_SEARCH_API_KEY` | N/A | The [API key][cognitivebingkey] for performing [Bing Search API][cognitivebing] queries | ||
### [Google Custom Search][gcse] | ||
### [Google Custom Search][googlesearch] | ||
@@ -64,3 +74,3 @@ The Google Custom Search command listener will not be registered if neither `GOOGLE_API_KEY` nor `GOOGLE_CUSTOM_SEARCH` environment variables are defined. | ||
### [Bing Search API][bse] | ||
### [Azure Marketplace - Bing Search API v2][azurebing] | ||
@@ -71,3 +81,3 @@ The Bing Search API command listener will not be registered if `BING_SEARCH_API_KEY` is not defined. | ||
2. Subscribe for a _"Bing Search API – Web Results Only"_ package / plan (free works fine) | ||
3. [Obtain][bsekey] the primary account key (located at the top of the page under _"Show"_) | ||
3. [Obtain][azurebingkey] the primary account key (located at the top of the page under _"Show"_) | ||
4. Export the API key: | ||
@@ -79,3 +89,17 @@ | ||
### [Microsoft Cognitive Services - Bing Search API v5][azurebing] | ||
The Bing Search API command listener will not be registered if `BING_SEARCH_API_KEY` is not defined. | ||
1. Visit https://www.microsoft.com/cognitive-services/en-us/subscriptions?productId=/products/56ec2de6bca1df083495c610 | ||
2. Subscribe for a _"Bing Web Search"_ package / plan (free works fine) | ||
3. [Obtain][cognitivebingkey] the API key (located in the _"Keys"_ column; click _"Show"_) | ||
4. Export the API key: | ||
```bash | ||
export BING_SEARCH_API_KEY="API KEY HERE" | ||
export USE_BING_V5="true" | ||
``` | ||
## Commands | ||
@@ -99,4 +123,6 @@ | ||
[gcse]: https://cse.google.com/ | ||
[bse]: https://datamarket.azure.com/dataset/bing/searchweb | ||
[bsekey]: https://datamarket.azure.com/dataset/explore/bing/searchweb | ||
[googlesearch]: https://cse.google.com/ | ||
[azurebing]: https://datamarket.azure.com/dataset/bing/searchweb | ||
[azurebingkey]: https://datamarket.azure.com/dataset/explore/bing/searchweb | ||
[cognitivebing]: https://azure.microsoft.com/en-gb/services/cognitive-services/search/ | ||
[cognitivebingkey]: https://www.microsoft.com/cognitive-services/en-US/subscriptions |
Sorry, the diff of this file is not supported yet
14432
122