3

I am trying to get the result in specified language in the query but i have no idea on how to mention it even i found the information i don't know the syntax can anyone help me?

I tried this to get the results in French language using php for example

$request = 'https://api.datamarket.azure.com/Bing/Search/Web';
$full_request =  urlencode( '\'' . $_POST["searchText"] . '\'').'%27language:fr%27&$top=10';

Here fr mean for french language but i couldn't get the result as expected. Can any one help on this?

rram
  • 2,004
  • 5
  • 24
  • 37

1 Answers1

2

As described in the documentation, it should be the Market parameter, see link and reference bellow. Don't forget that there might be a different behavior as well as other content based on this language:

https://datamarket.azure.com/dataset/8818F55E-2FE5-4CE3-A617-0B8BA8419F65#schema

Market

If the parameter is not specified, the API tries to determine an applicable market by using the IP address of the request, cookies, and other factors.

Example

https://api.datamarket.azure.com/Bing/Search/Web?Query=%27Xbox%27&WebSearchOptions=%27DisableQueryAlterations%2BDisableHostCollapsing%27&Market=fr-FR

Nicolas Boonaert
  • 2,954
  • 1
  • 20
  • 28
  • If this may had work in the past, currently the API answer Parameter: Market is not of type String – snowflake Sep 02 '14 at 20:19
  • Apparently, in the MSDN it says that it is transitionning on the Azure MarketPlace - see: http://msdn.microsoft.com/en-us/library/dd251072.aspx – Nicolas Boonaert Sep 03 '14 at 12:12
  • If it says `not of type String` you need to put it in between double quotes, and then url encode it, so you finally get something like: `&Market=%27fr-FR%27` – Mr. Goferito Oct 27 '14 at 16:40