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-Custom-Search/call-endpoint-csharp.md
+23-17Lines changed: 23 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,31 +9,37 @@ manager: nitinme
9
9
ms.service: cognitive-services
10
10
ms.subservice: bing-custom-search
11
11
ms.topic: quickstart
12
-
ms.date: 03/24/2020
12
+
ms.date: 05/08/2020
13
13
ms.author: aahi
14
14
---
15
15
16
16
# Quickstart: Call your Bing Custom Search endpoint using C#
17
17
18
-
Use this quickstart to begin requesting search results from your Bing Custom Search instance. While this application is written in C#, the Bing Custom Search API is a RESTful web service compatible with most programming languages. The source code for this sample can be found on [GitHub](https://github.com/Azure-Samples/cognitive-services-REST-api-samples/blob/master/dotnet/Search/BingCustomSearchv7.cs).
18
+
Use this quickstart to learn how to request search results from your Bing Custom Search instance. Although this application is written in C#, the Bing Custom Search API is a RESTful web service compatible with most programming languages. The source code for this sample is available on [GitHub](https://github.com/Azure-Samples/cognitive-services-REST-api-samples/blob/master/dotnet/Search/BingCustomSearchv7.cs).
19
19
20
20
## Prerequisites
21
21
22
-
- A Bing Custom Search instance. See [Quickstart: Create your first Bing Custom Search instance](quick-start.md) for more information.
23
-
- Microsoft [.NET Core](https://www.microsoft.com/net/download/core)
24
-
- Any edition of [Visual Studio 2019 or later](https://www.visualstudio.com/downloads/)
25
-
- If you are using Linux/MacOS, this application can be run using [Mono](https://www.mono-project.com/).
26
-
- The [Bing Custom Search](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.CustomSearch/1.2.0) NuGet package.
27
-
- From **Solution Explorer** in Visual Studio, right-click your project and select **Manage NuGet Packages** from the menu. Install the `Microsoft.Azure.CognitiveServices.Search.CustomSearch` package. Installing the NuGet Custom Search package also installs the following assemblies:
28
-
- Microsoft.Rest.ClientRuntime
29
-
- Microsoft.Rest.ClientRuntime.Azure
30
-
- Newtonsoft.Json
22
+
- A Bing Custom Search instance. For more information, see [Quickstart: Create your first Bing Custom Search instance](quick-start.md).
@@ -66,15 +72,15 @@ Use this quickstart to begin requesting search results from your Bing Custom Sea
66
72
}
67
73
```
68
74
69
-
3. Inthemainmethodofyourproject, createvariablesfor your Bing Custom Search API subscription key, your search instance's Custom Configuration ID, and a search term.
75
+
3. Inthemainmethodofyourproject, createthefollowingvariablesfor your Bing Custom Search API subscription key, search instance's custom configuration ID, and search term:
70
76
71
77
```csharp
72
78
var subscriptionKey = "YOUR-SUBSCRIPTION-KEY";
73
79
varcustomConfigId="YOUR-CUSTOM-CONFIG-ID";
74
80
varsearchTerm=args.Length>0?args[0]:"microsoft";
75
81
```
76
82
77
-
4. ConstructtherequestURLbyappendingyoursearchtermtothe `q=` queryparameter, andyoursearchinstance's Custom Configuration ID to `customconfig=`. separate the parameters with a `&` character. `url` can be the global endpoint below, or the [custom subdomain](../../cognitive-services/cognitive-services-custom-subdomains.md) endpoint displayed in the Azure portal for your resource.
83
+
4. ConstructtherequestURLbyappendingyoursearchtermtothe `q=` queryparameter, andyoursearchinstance's custom configuration ID to the `customconfig=` parameter. Separate the parameters with an ampersand (`&`). For the `url` variable value, you can use the global endpoint in the following code, or use the [custom subdomain](../../cognitive-services/cognitive-services-custom-subdomains.md) endpoint displayed in the Azure portal for your resource.
Copy file name to clipboardExpand all lines: articles/cognitive-services/Bing-Custom-Search/call-endpoint-java.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,27 +9,27 @@ manager: nitinme
9
9
ms.service: cognitive-services
10
10
ms.subservice: bing-custom-search
11
11
ms.topic: quickstart
12
-
ms.date: 03/24/2020
12
+
ms.date: 05/08/2020
13
13
ms.author: aahi
14
14
---
15
15
16
16
# Quickstart: Call your Bing Custom Search endpoint using Java
17
17
18
-
Use this quickstart to begin requesting search results from your Bing Custom Search instance. While this application is written in Java, the Bing Custom Search API is a RESTful web service compatible with most programming languages. The source code for this sample is available on [GitHub](https://github.com/Azure-Samples/cognitive-services-REST-api-samples/blob/master/java/Search/BingCustomSearchv7.java).
18
+
Use this quickstart to learn how to request search results from your Bing Custom Search instance. Although this application is written in Java, the Bing Custom Search API is a RESTful web service compatible with most programming languages. The source code for this sample is available on [GitHub](https://github.com/Azure-Samples/cognitive-services-REST-api-samples/blob/master/java/Search/BingCustomSearchv7.java).
19
19
20
20
## Prerequisites
21
21
22
-
- A Bing Custom Search instance. See [Quickstart: Create your first Bing Custom Search instance](quick-start.md) for more information.
22
+
- A Bing Custom Search instance. For more information, see [Quickstart: Create your first Bing Custom Search instance](quick-start.md).
23
23
24
-
- The latest [Java Development Kit](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
24
+
- The latest [Java Development Kit](https://www.oracle.com/technetwork/java/javase/downloads/index.html).
25
25
26
-
- The [Gson library](https://github.com/google/gson)
26
+
- The [Gson library](https://github.com/google/gson).
1. Create a new Java project in your favorite IDE or editor, and import the following libraries.
32
+
1. Create a new Java project in your favorite IDE or editor, and import the following libraries:
33
33
34
34
```java
35
35
importjava.io.InputStream;
@@ -46,7 +46,7 @@ Use this quickstart to begin requesting search results from your Bing Custom Sea
46
46
importcom.google.gson.JsonParser;
47
47
```
48
48
49
-
2. Create a classnamed `CustomSrchJava`, and create variables for your subscription key, custom search endpoint, and your search instance's Custom Configuration ID. You can use the global endpoint below, or the [custom subdomain](../../cognitive-services/cognitive-services-custom-subdomains.md) endpoint displayed in the Azure portal for your resource.
49
+
2. Create a classnamed `CustomSrchJava`, and then create variables for your subscription key, custom search endpoint, and search instance's custom configuration ID. You can use the global endpoint in the following code, or use the [custom subdomain](../../cognitive-services/cognitive-services-custom-subdomains.md) endpoint displayed in the Azure portal for your resource.
@@ -84,7 +84,7 @@ Use this quickstart to begin requesting search results from your Bing Custom Sea
84
84
85
85
## Send and receive a search request
86
86
87
-
1.Create a function named `SearchWeb()` that sends a request and returns a `SearchResults` object. Create the request url by combining your CustomConfigurationID, query, and endpoint information. Add your Subscription key to the `Ocp-Apim-Subscription-Key` header.
87
+
1.Create a function named `SearchWeb()` that sends a request and returns a `SearchResults` object. Create the request url by combining your custom configurationID, query, and endpoint information. Add your subscription key to the `Ocp-Apim-Subscription-Key` header.
88
88
89
89
```java
90
90
publicclassCustomSrchJava {
@@ -116,7 +116,7 @@ Use this quickstart to begin requesting search results from your Bing Custom Sea
116
116
}
117
117
```
118
118
119
-
3. In the main method of your application, call `SearchWeb()` with your search term,
Copy file name to clipboardExpand all lines: articles/cognitive-services/Bing-Custom-Search/call-endpoint-nodejs.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,35 +1,35 @@
1
1
---
2
2
title: "Quickstart: Call your Bing Custom Search endpoint using Node.js | Microsoft Docs"
3
3
titleSuffix: Azure Cognitive Services
4
-
description: Use this quickstart to begin requesting search results from your Bing Custom Search instance using Node.js
4
+
description: Use this quickstart to begin requesting search results from your Bing Custom Search instance using Node.js.
5
5
services: cognitive-services
6
6
author: aahill
7
7
manager: nitinme
8
8
9
9
ms.service: cognitive-services
10
10
ms.subservice: bing-custom-search
11
11
ms.topic: quickstart
12
-
ms.date: 03/24/2020
12
+
ms.date: 05/08/2020
13
13
ms.author: aahi
14
14
---
15
15
16
16
# Quickstart: Call your Bing Custom Search endpoint using Node.js
17
17
18
-
Use this quickstart to begin requesting search results from your Bing Custom Search instance. While this application is written in JavaScript, the Bing Custom Search API is a RESTful web service compatible with most programming languages. The source code for this sample is available on [GitHub](https://github.com/Azure-Samples/cognitive-services-REST-api-samples/blob/master/nodejs/Search/BingCustomSearchv7.js).
18
+
Use this quickstart to learn how to request search results from your Bing Custom Search instance. Although this application is written in JavaScript, the Bing Custom Search API is a RESTful web service compatible with most programming languages. The source code for this sample is available on [GitHub](https://github.com/Azure-Samples/cognitive-services-REST-api-samples/blob/master/nodejs/Search/BingCustomSearchv7.js).
19
19
20
20
## Prerequisites
21
21
22
-
- A Bing Custom Search instance. See [Quickstart: Create your first Bing Custom Search instance](quick-start.md) for more information.
22
+
- A Bing Custom Search instance. For more information, see [Quickstart: Create your first Bing Custom Search instance](quick-start.md).
1. Create a new JavaScript file in your favorite IDE or editor, and add a `require()` statement for the requests library. Create variables for your subscription key, Custom Configuration ID, and a search term.
32
+
- Create a new JavaScript file in your favorite IDE or editor, and add a `require()` statement for the requests library. Create variables for your subscription key, custom configuration ID, and search term.
33
33
34
34
```javascript
35
35
var request =require("request");
@@ -41,7 +41,7 @@ Use this quickstart to begin requesting search results from your Bing Custom Sea
41
41
42
42
## Send and receive a search request
43
43
44
-
1. Create a variable to store the information being sent in your request. Construct the request URL by appending your search term to the `q=` query parameter, and your search instance's Custom Configuration ID to `customconfig=`. separate the parameters with a `&` character. You can use the global endpoint below, or the [custom subdomain](../../cognitive-services/cognitive-services-custom-subdomains.md) endpoint displayed in the Azure portal for your resource.
44
+
1. Create a variable to store the information being sent in your request. Construct the request URL by appending your search term to the `q=` query parameter, and your search instance's custom configuration ID to the `customconfig=` parameter. Separate the parameters with an ampersand (`&`). You can use the global endpoint in the following code, or use the [custom subdomain](../../cognitive-services/cognitive-services-custom-subdomains.md) endpoint displayed in the Azure portal for your resource.
45
45
46
46
```javascript
47
47
var info = {
@@ -54,7 +54,7 @@ Use this quickstart to begin requesting search results from your Bing Custom Sea
54
54
}
55
55
```
56
56
57
-
1. Use the JavaScript Request Library to send a search request to your Bing Custom Search instance and print out information about the results, including its name, url, and the date the webpage was last crawled.
57
+
1. Use the JavaScript request library to send a search request to your Bing Custom Search instance and print information about the results, including its name, url, and the date the webpage was last crawled.
Copy file name to clipboardExpand all lines: articles/cognitive-services/Bing-Custom-Search/call-endpoint-python.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,33 +1,33 @@
1
1
---
2
2
title: "Quickstart: Call your Bing Custom Search endpoint using Python | Microsoft Docs"
3
3
titleSuffix: Azure Cognitive Services
4
-
description: Use this quickstart to begin requesting search results from your Bing Custom Search instance using Python
4
+
description: Use this quickstart to begin requesting search results from your Bing Custom Search instance using Python.
5
5
services: cognitive-services
6
6
author: aahill
7
7
manager: nitinme
8
8
9
9
ms.service: cognitive-services
10
10
ms.subservice: bing-custom-search
11
11
ms.topic: quickstart
12
-
ms.date: 03/24/2020
12
+
ms.date: 05/08/2020
13
13
ms.author: aahi
14
14
---
15
15
16
16
# Quickstart: Call your Bing Custom Search endpoint using Python
17
17
18
-
Use this quickstart to begin requesting search results from your Bing Custom Search instance. While this application is written in Python, the Bing Custom Search API is a RESTful web service compatible with most programming languages. The source code for this sample is available on [GitHub](https://github.com/Azure-Samples/cognitive-services-REST-api-samples/blob/master/python/Search/BingCustomSearchv7.py).
18
+
Use this quickstart to learn how to request search results from your Bing Custom Search instance. Although this application is written in Python, the Bing Custom Search API is a RESTful web service compatible with most programming languages. The source code for this sample is available on [GitHub](https://github.com/Azure-Samples/cognitive-services-REST-api-samples/blob/master/python/Search/BingCustomSearchv7.py).
19
19
20
20
## Prerequisites
21
21
22
-
- A Bing Custom Search instance. See [Quickstart: Create your first Bing Custom Search instance](quick-start.md) for more information.
23
-
-[Python](https://www.python.org/) 2.x or 3.x
22
+
- A Bing Custom Search instance. For more information, see [Quickstart: Create your first Bing Custom Search instance](quick-start.md).
1. Create a new Python file in your favorite IDE or editor, and add the following import statements. Create variables for your subscription key, Custom Configuration ID, and a search term.
30
+
- Create a new Python file in your favorite IDE or editor, and add the following import statements. Create variables for your subscription key, custom configuration ID, and search term.
31
31
32
32
```python
33
33
import json
@@ -40,13 +40,13 @@ Use this quickstart to begin requesting search results from your Bing Custom Sea
40
40
41
41
## Send and receive a search request
42
42
43
-
1. Construct the request URL by appending your search term to the `q=` query parameter, and your search instance's Custom Configuration ID to `customconfig=`. separate the parameters with a `&` character. You can use the global endpoint below, or the [custom subdomain](../../cognitive-services/cognitive-services-custom-subdomains.md) endpoint displayed in the Azure portal for your resource.
43
+
1. Construct the request URL by appending your search term to the `q=` query parameter, and your search instance's custom configuration ID to the `customconfig=` parameter. Separate the parameters with an ampersand (`&`). You can use the global endpoint in the following code, or use the [custom subdomain](../../cognitive-services/cognitive-services-custom-subdomains.md) endpoint displayed in the Azure portal for your resource.
0 commit comments