{"id":30039269,"url":"https://github.com/goferito/node-bing-api","last_synced_at":"2025-08-07T01:39:40.076Z","repository":{"id":20906921,"uuid":"24194650","full_name":"goferito/node-bing-api","owner":"goferito","description":"Node.js module for the Bing Search API (Cognitive Services)","archived":false,"fork":false,"pushed_at":"2021-04-03T12:57:30.000Z","size":82,"stargazers_count":56,"open_issues_count":5,"forks_count":24,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-25T06:59:33.234Z","etag":null,"topics":["cognitive-services","composite","javascript","market","subscription","video"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goferito.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-18T15:54:20.000Z","updated_at":"2024-01-09T07:51:08.000Z","dependencies_parsed_at":"2022-08-26T17:01:25.314Z","dependency_job_id":null,"html_url":"https://github.com/goferito/node-bing-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/goferito/node-bing-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goferito%2Fnode-bing-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goferito%2Fnode-bing-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goferito%2Fnode-bing-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goferito%2Fnode-bing-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goferito","download_url":"https://codeload.github.com/goferito/node-bing-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goferito%2Fnode-bing-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269185716,"owners_count":24374626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-06T02:00:09.910Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cognitive-services","composite","javascript","market","subscription","video"],"created_at":"2025-08-07T01:39:32.744Z","updated_at":"2025-08-07T01:39:40.063Z","avatar_url":"https://github.com/goferito.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NPM downloads per month][npm-downloads-img]][npm-url]\n[![NPM version][npm-version-img]][npm-url]\n[![NPM license][npm-license-img]][npm-url]\n\n# Node Bing API\nNode.js lib for the Microsoft Cognitive Services Bing Web Search API\n\n## Changelog v4\nUse Cognitive V7. Apparently new registrations can use that version only. Upgrade with care!\n\n## Changelog v3\nThanks to the contribution of [@franciscofsales](https://github.com/franciscofsales), version 3 supports the new API (Cognitive Services).\n\n## Changelog v2\nIn order to follow JavaScript best practices and allow the library to\nbe promisified, the callback function is now the last parameter.\n\n## Installation\n````\nnpm install node-bing-api\n````\n\n## Usage\n\nRequire the library and initialize it with your account key:\n\n```js\nvar Bing = require('node-bing-api')({ accKey: \"your-account-key\" });\n```\n\n## Promises\n\nThis API provdes callbacks by default, but users of node 8 and newer can make the library return Promises with `util.promisify()`. For example, to use `Bing.web`:\n\n```js\nvar util = require('util'),\n  Bing = require('node-bing-api')({ accKey: 'someKey' }),\n  searchBing = util.promisify(Bing.web.bind(Bing));\n```\n\n#### Web Search (same as Composite):\n\n```js\nBing.web(\"Pizza\", {\n    count: 10,  // Number of results (max 50)\n    offset: 3   // Skip first 3 results\n  }, function(error, res, body){\n\n    // body has more useful information besides web pages\n    // (image search, related search, news, videos)\n    // but for this example we are just\n    // printing the first two web page results\n    console.log(body.webPages.value[0]);\n    console.log(body.webPages.value[1]);\n  });\n```\n\n#### Composite Search (same as Web):\n```js\nBing.composite(\"Playstation 4 Pro\", {\n    count: 10,  // Number of results (max 15 for news, max 50 if other)\n    offset: 3   // Skip first 3 results\n  }, function(error, res, body){\n    console.log(body.news);\n  });\n```\n\n#### News Search:\n```js\nBing.news(\"Anonymous\", {\n    count: 10,  // Number of results (max 15)\n    offset: 3   // Skip first 3 results\n  }, function(error, res, body){\n    console.log(body);\n  });\n```\n\n#### Video Search:\n```js\nBing.video(\"monkey vs frog\", {\n    count: 10,  // Number of results (max 50)\n    offset: 3   // Skip first 3 result\n  }, function(error, res, body){\n    console.log(body);\n  });\n```\n\n#### Images Search:\n```js\nBing.images(\"Ninja Turtles\", {\n  count: 15,   // Number of results (max 50)\n  offset: 3    // Skip first 3 result\n  }, function(error, res, body){\n    console.log(body);\n  });\n```\n\n#### Related Search (same as Web):\n```js\nBing.relatedSearch('berlin'\n, { market: 'en-US' }\n, (err, res, body) =\u003e {\n    const suggestions = body.relatedSearches.value.map(r =\u003e r.displayText)\n    console.log(suggestions.join('\\n'))\n  })\n```\n\n#### Spelling Suggestions:\n```js\nBing.spelling('awsome spell', function (err, res, body) {\n  console.log(body.flaggedTokens.suggestions[0].suggestion); //awesome spell\n});\n```\n\nRequires specific Account key\n\nAvailable Options:\n* mode:\\\u003cProof | Spell\\\u003e\n* preContextText:\\\u003c*String*\\\u003e\n* postContextText:\\\u003c*String*\\\u003e\n\n### request() options\n\n* maxSockets: integer (default: Infinity)\n* reqTimeout: ms\n\n#### Specify Market\nGetting spanish results:\n```js\nBing.images(\"Ninja Turtles\"\n          , {count: 5, market: 'es-ES'}\n          , function(error, res, body){\n\n  console.log(body);\n});\n```\n\nFull list of supported markets:\nes-AR,en-AU,de-AT,nl-BE,fr-BE,pt-BR,en-CA,fr-CA,es-CL,da-DK,fi-FI,fr-FR,\nde-DE,zh-HK,en-IN,en-ID,en-IE,it-IT,ja-JP,ko-KR,en-MY,es-MX,nl-NL,en-NZ,\nno-NO,zh-CN,pl-PL,pt-PT,en-PH,ru-RU,ar-SA,en-ZA,es-ES,sv-SE,fr-CH,de-CH,\nzh-TW,tr-TR,en-GB,en-US,es-US\n\n\n#### Adult Filter\n```js\nBing.images('Kim Kardashian'\n          , {market: 'en-US', adult: 'Strict'}\n          , function(error, res, body){\n\n  console.log(body.value);\n});\n```\nAccepted values: \"Off\", \"Moderate\", \"Strict\".\n\n*Moderate level should not include results with sexually explicit images\nor videos, but may include sexually explicit text.*\n\n#### Web Only API Subscriptions\nTo use this library with a web only subscription, you can require and initialize it with an alternate root url:\n```js\nvar Bing = require('node-bing-api')\n            ({\n              accKey: \"your-account-key\",\n              rootUri: \"https://api.datamarket.azure.com/Bing/SearchWeb/v1/\"\n            });\n```\n\n## Running Tests\nIn order to run the tests, the integration tests require to create a `secrets.js` file\nfrom the provided `secrets.js.example` example, and fill it in with a valid access key.\n\nThen just `mocha`.\n\n\n## License\nMIT\n\n[npm-url]: https://npmjs.org/package/node-bing-api\n[npm-downloads-img]: https://img.shields.io/npm/dm/node-bing-api.svg\n[npm-version-img]: https://badge.fury.io/js/node-bing-api.svg\n[npm-license-img]: https://img.shields.io/npm/l/node-bing-api.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoferito%2Fnode-bing-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoferito%2Fnode-bing-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoferito%2Fnode-bing-api/lists"}