Skip to content

Commit c8930c9

Browse files
author
dksimpson
committed
Refresh Bing Local Business Search REST API quickstarts
1 parent cd50a59 commit c8930c9

File tree

5 files changed

+36
-37
lines changed

5 files changed

+36
-37
lines changed

articles/cognitive-services/bing-local-business-search/quickstarts/local-quickstart.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,26 @@ manager: nitinme
88
ms.service: cognitive-services
99
ms.subservice: bing-local-business
1010
ms.topic: quickstart
11-
ms.date: 03/24/2020
11+
ms.date: 05/12/2020
1212
ms.author: aahi
1313
---
1414

1515
# Quickstart: Send a query to the Bing Local Business Search API in C#
1616

17-
Use this quickstart to begin sending requests to the Bing Local Business Search API, which is an Azure Cognitive Service. While this simple application is written in C#, the API is a RESTful Web service compatible with any programming language capable of making HTTP requests and parsing JSON.
17+
Use this quickstart to begin sending requests to the Bing Local Business Search API, which is an Azure Cognitive Service. Although this simple application is written in C#, the API is a RESTful Web service compatible with any programming language capable of making HTTP requests and parsing JSON.
1818

19-
This example application gets local response data from the API for the search query `hotel in Bellevue`.
19+
This example application gets local response data from the API for a search query.
2020

2121
## Prerequisites
2222

2323
* Any edition of [Visual Studio 2019](https://www.visualstudio.com/downloads/).
24-
* If you are using Linux/MacOS, this application can be run using [Mono](https://www.mono-project.com/).
24+
* If you're using Linux/MacOS, this application can be run using [Mono](https://www.mono-project.com/).
2525

2626
You must have a [Cognitive Services API account](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account) with Bing Search APIs. The [free trial](https://azure.microsoft.com/try/cognitive-services/?api=bing-web-search-api) is sufficient for this quickstart. See also [Cognitive Services Pricing - Bing Search API](https://azure.microsoft.com/pricing/details/cognitive-services/search-api/).
2727

2828
## Create the request
2929

30-
The following code creates a `WebRequest`, sets the access key header, and adds a query string for "restaurant in Bellevue". It then sends the request and assigns the response to a string to contain the JSON text.
30+
The following code creates a `WebRequest`, sets the access key header, and adds a query string for *restaurant in Bellevue*. It then sends the request and assigns the response to a string to contain the JSON text.
3131

3232
```csharp
3333
// Replace the accessKey string value with your valid access key.
@@ -50,9 +50,9 @@ The following code creates a `WebRequest`, sets the access key header, and adds
5050
## Run the complete application
5151

5252
The Bing Local Business Search API returns localized search results from the Bing search engine.
53-
1. Create a new Console solution in Visual Studio (the Community Edition is fine).
53+
1. Create a new console solution in Visual Studio (the Community Edition is sufficient).
5454
2. Replace Program.cs with the code provided below.
55-
3. Replace the accessKey value with an access key valid for your subscription.
55+
3. Replace the `accessKey` value with an access key valid for your subscription.
5656
4. Run the program.
5757

5858
```csharp
@@ -205,5 +205,5 @@ namespace localSearch
205205

206206
## Next steps
207207
- [Local Business Search Java quickstart](local-search-java-quickstart.md)
208-
- [Local Business Search Node quickstart](local-search-node-quickstart.md)
208+
- [Local Business Search Node.js quickstart](local-search-node-quickstart.md)
209209
- [Local Business Search Python quickstart](local-search-python-quickstart.md)

articles/cognitive-services/bing-local-business-search/quickstarts/local-search-java-quickstart.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,26 @@ manager: nitinme
88
ms.service: cognitive-services
99
ms.subservice: bing-local-business
1010
ms.topic: quickstart
11-
ms.date: 11/29/2019
11+
ms.date: 05/12/2020
1212
ms.author: aahi
1313
---
1414

1515
# Quickstart: Send a query to the Bing Local Business Search API using Java
1616

17-
Use this quickstart to begin sending requests to the Bing Local Business Search API, which is an Azure Cognitive Service. While this simple application is written in Java, the API is a RESTful Web service compatible with any programming language capable of making HTTP requests and parsing JSON.
17+
Use this quickstart to begin sending requests to the Bing Local Business Search API, which is an Azure Cognitive Service. Although this simple application is written in Java, the API is a RESTful Web service compatible with any programming language capable of making HTTP requests and parsing JSON.
1818

19-
This example application gets local response data from the API for the search query `hotel in Bellevue`.
19+
This example application gets local response data from the API for a search query.
2020

2121
## Prerequisites
2222

2323
* The [Java Development Kit(JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
2424

25-
You must have a [Cognitive Services API account](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account) with Bing Search APIs. The [free trial](https://azure.microsoft.com/try/cognitive-services/?api=bing-web-search-api) is sufficient for this quickstart. You will need the access key provided when you activate your free trial. See also [Cognitive Services Pricing - Bing Search API](https://azure.microsoft.com/pricing/details/cognitive-services/search-api/).
25+
You must have a [Cognitive Services API account](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account) with Bing Search APIs. The [free trial](https://azure.microsoft.com/try/cognitive-services/?api=bing-web-search-api) is sufficient for this quickstart. You'll need the access key provided when you activate your free trial. See also [Cognitive Services Pricing - Bing Search API](https://azure.microsoft.com/pricing/details/cognitive-services/search-api/).
2626

27-
This example application gets local response data from the query for a *hotel in Bellevue*.
2827

2928
## Create the request
3029

31-
The following code creates a `WebRequest`, sets the access key header, and adds a query string for "hotel in Bellevue". It then sends the request and assigns the response to a string to contain the JSON text.
30+
The following code creates a `WebRequest`, sets the access key header, and adds a query string for *hotel in Bellevue*. It then sends the request and assigns the response to a string to contain the JSON text.
3231

3332
```java
3433
// construct URL of search request (endpoint + query string)
@@ -50,7 +49,7 @@ The Bing Local Business Search API returns results from the Bing search engine.
5049
1. Download or install the gson library.
5150
2. Create a new Java project in your favorite IDE or editor.
5251
3. Add the code provided below.
53-
4. Replace the subscriptionKey value with an access key valid for your subscription.
52+
4. Replace the `subscriptionKey` value with an access key valid for your subscription.
5453
5. Run the program.
5554
5655
```java
@@ -160,6 +159,6 @@ public class LocalSearchCls {
160159
```
161160

162161
## Next steps
163-
- [Local Business Search quickstart](local-quickstart.md)
164-
- [Local Business Search Node quickstart](local-search-node-quickstart.md)
162+
- [Local Business Search C# quickstart](local-quickstart.md)
163+
- [Local Business Search Node.js quickstart](local-search-node-quickstart.md)
165164
- [Local Business Search Python quickstart](local-search-python-quickstart.md)

articles/cognitive-services/bing-local-business-search/quickstarts/local-search-node-quickstart.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,35 @@ manager: nitinme
88
ms.service: cognitive-services
99
ms.subservice: bing-local-business
1010
ms.topic: quickstart
11-
ms.date: 03/24/2020
11+
ms.date: 05/12/2020
1212
ms.author: aahi
1313
---
1414

1515
# Quickstart: Send a query to the Bing Local Business Search API using Node.js
1616

17-
Use this quickstart to begin sending requests to the Bing Local Business Search API, which is an Azure Cognitive Service. While this simple application is written in Node.js, the API is a RESTful Web service compatible with any programming language capable of making HTTP requests and parsing JSON.
17+
Use this quickstart to begin sending requests to the Bing Local Business Search API, which is an Azure Cognitive Service. Although this simple application is written in Node.js, the API is a RESTful Web service compatible with any programming language capable of making HTTP requests and parsing JSON.
1818

19-
This example application gets local response data from the API for the search query `hotel in Bellevue`.
19+
This example application gets local response data from the API for a search query.
2020

2121
## Prerequisites
2222

2323
* The latest version of [Node.js](https://nodejs.org/en/download/).
2424

25-
* The [JavaScript Request Library](https://github.com/request/request)
25+
* The [JavaScript Request Library](https://github.com/request/request).
2626

2727
You must have a [Cognitive Services API account](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account) with Bing APIs. The [free trial](https://azure.microsoft.com/try/cognitive-services/?api=bing-web-search-api) is sufficient for this quickstart. Use the access key provided by the free trial. See also [Cognitive Services Pricing - Bing Search API](https://azure.microsoft.com/pricing/details/cognitive-services/search-api/).
2828

2929
## Code scenario
3030

31-
The following code gets defines and sends the request. It is implemented in the following steps:
31+
The following code defines and sends the request, which is implemented in the following steps:
3232

3333
1. Declare variables to specify the endpoint by host and path.
3434
2. Specify the query, and add the query parameter.
3535
3. Create a handler function for the response.
36-
4. Define the Search function that creates the request and adds the Ocp-Apim-Subscription-Key header.
37-
5. Run the Search function.
36+
4. Define the Search function that creates the request and adds the `Ocp-Apim-Subscription-Key` header.
37+
5. Run the search function.
3838

39-
The complete code for this demo follows:
39+
The complete code for this demo is as follows:
4040

4141
```javascript
4242
'use strict';
@@ -89,6 +89,6 @@ Search();
8989

9090
## Next steps
9191

92-
* [Local Business Search quickstart](local-quickstart.md)
92+
* [Local Business Search C# quickstart](local-quickstart.md)
9393
* [Local Business Search Java quickstart](local-search-java-quickstart.md)
9494
* [Local Business Search Python quickstart](local-search-python-quickstart.md)

articles/cognitive-services/bing-local-business-search/quickstarts/local-search-python-quickstart.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ manager: nitinme
88
ms.service: cognitive-services
99
ms.subservice: bing-local-business
1010
ms.topic: quickstart
11-
ms.date: 11/29/2019
11+
ms.date: 05/12/2020
1212
ms.author: aahi
1313
---
1414
# Quickstart: Send a query to the Bing Local Business Search API in Python
1515

16-
Use this quickstart to begin sending requests to the Bing Local Business Search API, which is an Azure Cognitive Service. While this simple application is written in Python, the API is a RESTful Web service compatible with any programming language capable of making HTTP requests and parsing JSON.
16+
Use this quickstart to begin sending requests to the Bing Local Business Search API, which is an Azure Cognitive Service. Although this simple application is written in Python, the API is a RESTful Web service compatible with any programming language capable of making HTTP requests and parsing JSON.
1717

18-
This example application gets local response data from the API for the search query `hotel in Bellevue`.
18+
This example application gets local response data from the API for a search query.
1919

2020
## Prerequisites
2121

@@ -25,15 +25,15 @@ You must have a [Cognitive Services API account](https://docs.microsoft.com/azur
2525

2626
## Run the complete application
2727

28-
The following code gets localized results. It is implemented in the following steps:
28+
The following code gets localized results, which are implemented in the following steps:
2929
1. Declare variables to specify the endpoint by host and path.
3030
2. Specify the query parameter.
31-
3. Define the Search function that creates the request and adds the Ocp-Apim-Subscription-Key header.
32-
4. Set the Ocp-Apim-Subscription-Key header.
31+
3. Define the search function that creates the request and adds the `Ocp-Apim-Subscription-Key` header.
32+
4. Set the `Ocp-Apim-Subscription-Key` header.
3333
5. Make the connection and send the request.
3434
6. Print the JSON results.
3535

36-
The complete code for this demo follows:
36+
The complete code for this demo is as follows:
3737

3838
```python
3939
import http.client, urllib.parse
@@ -62,6 +62,6 @@ print (json.dumps(json.loads(result), indent=4))
6262
```
6363

6464
## Next steps
65-
- [Local Business Search Java Quickstart](local-search-java-quickstart.md)
66-
- [Local Business Search C# Quickstart](local-quickstart.md)
67-
- [Local Business Search Node Quickstart](local-search-node-quickstart.md)
65+
- [Local Business Search Java quickstart](local-search-java-quickstart.md)
66+
- [Local Business Search C# quickstart](local-quickstart.md)
67+
- [Local Business Search Node.js quickstart](local-search-node-quickstart.md)

articles/cognitive-services/bing-local-business-search/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
href: quickstarts/local-quickstart.md
2020
- name: Using Java
2121
href: quickstarts/local-search-java-quickstart.md
22-
- name: Using Node
22+
- name: Using Node.js
2323
href: quickstarts/local-search-node-quickstart.md
2424
- name: Using Python
2525
href: quickstarts/local-search-python-quickstart.md

0 commit comments

Comments
 (0)