How to use Azure Bing Spell Check API using node.js?

Microsoft Cloud Service – Azure provides different Cognitive AI/ML APIs which help solve problems and automate stuff.

The Bing Spell Check API helps you to detect spelling errors in the text which you scan using API. It gives suggestions of words which might be wrong in the sentence.

[Try the demo ]

Let us get started!

Step 1) Get your Spell Check API access keys

Go to Azure Portal and search for Bing Spell Check

Azure Portal – Fill the details to create an Spell Check API

Step 2) Copy your API Key

Once the API resource is created, you will see the below image which show to follow the steps on how use the API. Click on then Step 1 -> Copy Key 1.

Get Keys from Option 1

Step 3) Write you Code

We have written Asynchronous code using Node.js and used Promises as shown below image

Create two files -> spellcheck.js and main.js


(Full Code on my Github – Using Azure API in Node.js )

FIrst Part of spellcheck.js

Second Part of spellcheck.js

(Full Code on my Github – Using Azure API in Node.js )

main.js to consume call theAPI

Output when you run the main.js file

As you can see when I gave “Hellllo Worlld! Howw are you?” as Input it gave spelling suggestions like “Hello, World, How”. 

We have JsonPath to parse raw actual json response the API gives us.

This is end of this lecture, if you have any queries please drop a comment below!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s