Local Search Client
microsoft · Developer Tools
The Local Search client lets you send a search query to Bing and get back search results that include local businesses such as restaurants, hotels, retail stores, or other local businesses. The query can specify the name of the local business or it can ask for a list (for example, restaurants near me).
Authentication
Sample Requests
The Local Search API lets you send a search query to Bing and get back search results that include local businesses such as restaurants, hotels, retail stores, or other local businesses. The query can specify the name of the local business or it can ask for a list (for example, restaurants near me).
Hover any highlighted part to learn what it does
| X-BingApis-SDK | true |
curl -X GET "https://api.apis.guru/v2/specs/microsoft.com/cognitiveservices-LocalSearch/1.0/v7.0/localbusinesses/search?q=test&cc=example&mkt=en-us&count=10&first=example&SetLang=example&SafeSearch=Off&localmapview=example&ResponseFormat=example&localcategories=example&localcircularview=example" \ -H "X-BingApis-SDK: true"
import requests
params = {
"q": "test",
"cc": "example",
"mkt": "en-us",
"count": "10",
"first": "example",
"SetLang": "example",
"SafeSearch": "Off",
"localmapview": "example",
"ResponseFormat": "example",
"localcategories": "example",
"localcircularview": "example"
}
headers = {
"X-BingApis-SDK": "true"
}
response = requests.get(
"https://api.apis.guru/v2/specs/microsoft.com/cognitiveservices-LocalSearch/1.0/v7.0/localbusinesses/search",
params=params,
headers=headers,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/microsoft.com/cognitiveservices-LocalSearch/1.0/v7.0/localbusinesses/search');
url.searchParams.set('q', 'test');
url.searchParams.set('cc', 'example');
url.searchParams.set('mkt', 'en-us');
url.searchParams.set('count', '10');
url.searchParams.set('first', 'example');
url.searchParams.set('SetLang', 'example');
url.searchParams.set('SafeSearch', 'Off');
url.searchParams.set('localmapview', 'example');
url.searchParams.set('ResponseFormat', 'example');
url.searchParams.set('localcategories', 'example');
url.searchParams.set('localcircularview', 'example');
const response = await fetch(url, {
headers: {
'X-BingApis-SDK': 'true'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/microsoft.com/cognitiveservices-LocalSearch/1.0/v7.0/localbusinesses/search")
q := baseURL.Query()
q.Set("q", "test")
q.Set("cc", "example")
q.Set("mkt", "en-us")
q.Set("count", "10")
q.Set("first", "example")
q.Set("SetLang", "example")
q.Set("SafeSearch", "Off")
q.Set("localmapview", "example")
q.Set("ResponseFormat", "example")
q.Set("localcategories", "example")
q.Set("localcircularview", "example")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
req.Header.Set("X-BingApis-SDK", "true")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/microsoft.com/cognitiveservices-LocalSearch/1.0/v7.0/localbusinesses/search")
uri.query = URI.encode_www_form({
"q" => "test",
"cc" => "example",
"mkt" => "en-us",
"count" => "10",
"first" => "example",
"SetLang" => "example",
"SafeSearch" => "Off",
"localmapview" => "example",
"ResponseFormat" => "example",
"localcategories" => "example",
"localcircularview" => "example"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
req["X-BingApis-SDK"] = "true"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/microsoft.com/cognitiveservices-LocalSearch/1.0/v7.0/localbusinesses/search?" . http_build_query([
"q" => "test",
"cc" => "example",
"mkt" => "en-us",
"count" => "10",
"first" => "example",
"SetLang" => "example",
"SafeSearch" => "Off",
"localmapview" => "example",
"ResponseFormat" => "example",
"localcategories" => "example",
"localcircularview" => "example"
]);
$opts = ["http" => [
"method" => "GET",
"header" => implode("\r\n", [
"X-BingApis-SDK: true"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- See official documentation for authentication and setup.
What can you build with Local Search Client?
Local Search Client is a Developer Tools API. Developers commonly use developer tools APIs for:
- automating code review and quality checks
- integrating CI/CD pipelines and build systems
- managing feature flags and A/B tests
- monitoring errors and application performance
- generating and validating test data
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. Local Search Client is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide · Learn about API keys · What is REST?