![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
azure-cognitiveservices-search
Advanced tools
Microsoft Azure Cognitive Services Search API Client Library for Node.js
This project provides a Node.js rollup package that makes it easy to work with Microsoft Azure Cognitive Services Entity Search API. Right now it supports:
npm install azure-cognitiveservices-search
const msRestAzure = require('ms-rest-azure');
const CognitiveServicesManagement = require("azure-arm-cognitiveservices");
let client;
let createAccount = msRestAzure.interactiveLogin().then((credentials) => {
client = new CognitiveServicesManagement(credentials, suite.subscriptionId);
return client.accounts.create('groupname', 'accountname', {
sku: {
name: "S1"
},
kind: "Bing.Search",
location: "westus",
properties: {}
});
}).catch((err) => {
console.log('An error ocurred');
console.dir(err, {depth: null, colors: true});
});
let serviceKey;
createAccount.then((result) => {
return client.accounts.listKeys('groupname', 'accountname');
}).then((result) => {
serviceKey = result.key1;
console.log(result.key2);
}).catch((err) => {
console.log('An error ocurred');
console.dir(err, {depth: null, colors: true});
});
const CognitiveServicesCredentials = require('ms-rest-azure').CognitiveServicesCredentials;
let credentials = new CognitiveServicesCredentials(serviceKey);
const search = require('azure-cognitiveservices-search');
let entitySearchApiClient = new search.EntitySearchAPIClient(credentials);
entitySearchApiClient.entitiesOperations.search('seahawks').then((result) => {
console.log(result.queryContext);
console.log(result.entities.value);
console.log(result.entities.value[0].description);
}).catch((err) => {
throw err;
});
const search = require('azure-cognitiveservices-search');
let webSearchApiClient = new search.WebSearchAPIClient(credentials);
webSearchAPIClient.web.search('seahawks').then((result) => {
console.log(result.queryContext);
console.log(result.images.value);
console.log(result.webPages.value);
console.log(result.news.value);
}).catch((err) => {
throw err;
})
https://azure.microsoft.com/en-us/try/cognitive-services/ under "Search"
FAQs
Microsoft Azure Cognitive Services Search API Client Library for Node.js
The npm package azure-cognitiveservices-search receives a total of 6 weekly downloads. As such, azure-cognitiveservices-search popularity was classified as not popular.
We found that azure-cognitiveservices-search demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.