You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cognitive-services/bing-local-business-search/quickstarts/local-quickstart.md
+10-11Lines changed: 10 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,26 +8,25 @@ manager: nitinme
8
8
ms.service: cognitive-services
9
9
ms.subservice: bing-local-business
10
10
ms.topic: quickstart
11
-
ms.date: 03/24/2020
11
+
ms.date: 05/12/2020
12
12
ms.author: aahi
13
13
---
14
14
15
15
# Quickstart: Send a query to the Bing Local Business Search API in C#
16
16
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 learn how to send 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.
18
18
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.
20
20
21
21
## Prerequisites
22
22
23
23
* 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/).
25
-
26
-
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/).
24
+
* If you're using Linux/MacOS, this application can be run using [Mono](https://www.mono-project.com/).
25
+
* A [Cognitive Services API account](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account) with Bing Search APIs. For this quickstart, the [free trial](https://azure.microsoft.com/try/cognitive-services/?api=bing-web-search-api) is sufficient. Save the API key that's provided when you activate your free trial. For more information, see [Cognitive Services Pricing - Bing Search API](https://azure.microsoft.com/pricing/details/cognitive-services/search-api/).
27
26
28
27
## Create the request
29
28
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.
29
+
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.
31
30
32
31
```csharp
33
32
// Replace the accessKey string value with your valid access key.
@@ -49,10 +48,10 @@ The following code creates a `WebRequest`, sets the access key header, and adds
49
48
50
49
## Run the complete application
51
50
52
-
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).
51
+
The following code uses the Bing Local Business Search API to return localized search results from the Bing search engine. You can use this code by following these steps:
52
+
1. Create a new console solution in Visual Studio (the Community Edition is sufficient).
54
53
2. Replace Program.cs with the code provided below.
55
-
3. Replace the accessKey value with an access key valid for your subscription.
54
+
3. Replace the `accessKey` value with an access key valid for your subscription.
56
55
4. Run the program.
57
56
58
57
```csharp
@@ -205,5 +204,5 @@ namespace localSearch
205
204
206
205
## Next steps
207
206
-[Local Business Search Java quickstart](local-search-java-quickstart.md)
208
-
-[Local Business Search Node quickstart](local-search-node-quickstart.md)
207
+
-[Local Business Search Node.js quickstart](local-search-node-quickstart.md)
209
208
-[Local Business Search Python quickstart](local-search-python-quickstart.md)
Copy file name to clipboardExpand all lines: articles/cognitive-services/bing-local-business-search/quickstarts/local-search-java-quickstart.md
+10-12Lines changed: 10 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,27 +8,25 @@ manager: nitinme
8
8
ms.service: cognitive-services
9
9
ms.subservice: bing-local-business
10
10
ms.topic: quickstart
11
-
ms.date: 11/29/2019
11
+
ms.date: 05/12/2020
12
12
ms.author: aahi
13
13
---
14
14
15
15
# Quickstart: Send a query to the Bing Local Business Search API using Java
16
16
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 learn how to send 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.
18
18
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.
20
20
21
21
## Prerequisites
22
22
23
-
* The [Java Development Kit(JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
23
+
* The [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html).
24
+
* A [Cognitive Services API account](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account) with Bing Search APIs. For this quickstart, the [free trial](https://azure.microsoft.com/try/cognitive-services/?api=bing-web-search-api) is sufficient. Save the API key that's provided when you activate your free trial. For more information, see [Cognitive Services Pricing - Bing Search API](https://azure.microsoft.com/pricing/details/cognitive-services/search-api/).
24
25
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/).
26
-
27
-
This example application gets local response data from the query for a *hotel in Bellevue*.
28
26
29
27
## Create the request
30
28
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.
29
+
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.
32
30
33
31
```java
34
32
// construct URL of search request (endpoint + query string)
@@ -46,11 +44,11 @@ The following code creates a `WebRequest`, sets the access key header, and adds
46
44
47
45
## Run the complete application
48
46
49
-
The Bing Local Business Search API returns results from the Bing search engine.
47
+
The following code uses the Bing Local Business Search API to return search results from the Bing search engine. Run this code by following these steps:
50
48
1. Download or install the gson library.
51
49
2. Create a new Java project in your favorite IDE or editor.
52
50
3. Add the code provided below.
53
-
4. Replace the subscriptionKey value with an access key valid for your subscription.
51
+
4. Replace the `subscriptionKey` value with an access key valid for your subscription.
Copy file name to clipboardExpand all lines: articles/cognitive-services/bing-local-business-search/quickstarts/local-search-node-quickstart.md
+9-11Lines changed: 9 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,35 +8,33 @@ manager: nitinme
8
8
ms.service: cognitive-services
9
9
ms.subservice: bing-local-business
10
10
ms.topic: quickstart
11
-
ms.date: 03/24/2020
11
+
ms.date: 05/12/2020
12
12
ms.author: aahi
13
13
---
14
14
15
15
# Quickstart: Send a query to the Bing Local Business Search API using Node.js
16
16
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 learn how to send 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.
18
18
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.
20
20
21
21
## Prerequisites
22
22
23
23
* The latest version of [Node.js](https://nodejs.org/en/download/).
24
+
* The [JavaScript Request Library](https://github.com/request/request).
25
+
* A [Cognitive Services API account](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account) with Bing Search APIs. For this quickstart, the [free trial](https://azure.microsoft.com/try/cognitive-services/?api=bing-web-search-api) is sufficient. Save the API key that's provided when you activate your free trial. For more information, see [Cognitive Services Pricing - Bing Search API](https://azure.microsoft.com/pricing/details/cognitive-services/search-api/).
24
26
25
-
* The [JavaScript Request Library](https://github.com/request/request)
26
-
27
-
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/).
28
27
29
28
## Code scenario
30
29
31
-
The following code gets defines and sends the request. It is implemented in the following steps:
30
+
The following code defines and sends the request, which is implemented in the following steps:
32
31
33
32
1. Declare variables to specify the endpoint by host and path.
34
33
2. Specify the query, and add the query parameter.
35
34
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.
35
+
4. Define the Search function that creates the request and adds the `Ocp-Apim-Subscription-Key` header.
36
+
5. Run the search function.
38
37
39
-
The complete code for this demo follows:
40
38
41
39
```javascript
42
40
'use strict';
@@ -89,6 +87,6 @@ Search();
89
87
90
88
## Next steps
91
89
92
-
*[Local Business Search quickstart](local-quickstart.md)
90
+
*[Local Business Search C# quickstart](local-quickstart.md)
93
91
*[Local Business Search Java quickstart](local-search-java-quickstart.md)
94
92
*[Local Business Search Python quickstart](local-search-python-quickstart.md)
Copy file name to clipboardExpand all lines: articles/cognitive-services/bing-local-business-search/quickstarts/local-search-python-quickstart.md
+12-13Lines changed: 12 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,32 +8,31 @@ manager: nitinme
8
8
ms.service: cognitive-services
9
9
ms.subservice: bing-local-business
10
10
ms.topic: quickstart
11
-
ms.date: 11/29/2019
11
+
ms.date: 05/12/2020
12
12
ms.author: aahi
13
13
---
14
14
# Quickstart: Send a query to the Bing Local Business Search API in Python
15
15
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 learn how to send 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.
17
17
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.
19
19
20
20
## Prerequisites
21
21
22
-
*[Python](https://www.python.org/) 2.x or 3.x
23
-
24
-
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/).
22
+
*[Python](https://www.python.org/) 2.x or 3.x.
23
+
* A [Cognitive Services API account](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account) with Bing Search APIs. For this quickstart, the [free trial](https://azure.microsoft.com/try/cognitive-services/?api=bing-web-search-api) is sufficient. Save the API key that's provided when you activate your free trial. For more information, see [Cognitive Services Pricing - Bing Search API](https://azure.microsoft.com/pricing/details/cognitive-services/search-api/).
25
24
26
25
## Run the complete application
27
26
28
-
The following code gets localized results. It is implemented in the following steps:
27
+
The following example gets localized results, which are implemented in the following steps:
29
28
1. Declare variables to specify the endpoint by host and path.
30
29
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.
30
+
3. Define the search function that creates the request and adds the `Ocp-Apim-Subscription-Key` header.
0 commit comments