How to use Bing search api in Java

I need to extract search results from Bing. Is there any Java code available to achieve this?

+4
source share
1 answer

There are many answers and examples in this MSDN forum forum.

In addition, when you buy or subscribe to a dataset on Azure, they have an example java. Here is an example

Go to odata4j website and download the latest version.

Add odata4j-clientbundle-xxjar to your Java build path.

You can use the following code to call the service.

ODataConsumer c = ODataConsumers .newBuilder("https://api.datamarket.azure.com/Data.ashx/Bing/Search/v1/") .setClientBehaviors(OClientBehaviors.basicAuth("accountKey", "{your account key here}")) .build(); OQueryRequest<OEntity> oRequest = c.getEntities("Web") .custom("Query", "stackoverflow bing api"); Enumerable<OEntity> entities = oRequest.execute(); 
+7
source

Source: https://habr.com/ru/post/1436910/


All Articles