JSON Implementation for RelatedSearch SourceType
This topic contains the following details of a RelatedSearch SourceType query sent to the JSON interface:
Request Example
Response Example
Code Sample
For an example of JavaScript code that would send the request in this topic, see JSON Code Sample (RelatedSearch SourceType).
Request Example
This section contains an example of an HTTP query string that the aforementioned code might generate.
http://api.bing.net/json.aspx?AppId=Insert your AppId here&Query=free&Sources=RelatedSearch&Version=2.0&Market=en-us&Options=EnableHighlighting&JsonType=callback&JsonCallback=SearchCompleted
Response Example
This section contains an example of a response that Bing might return when sent the query string in the previous section:
if(typeofSearchCompleted=='function')SearchCompleted({
"SearchResponse":{
"Version":"2.0",
"Query":{
"SearchTerms":"free"
},
"RelatedSearch":{
"Results":[
{
"Title":"Free Stuff",
"Url":"http:\/\/bing.com\/results.aspx?q=Free+Stuff"
},
{
"Title":"Free Games",
"Url":"http:\/\/bing.com\/results.aspx?q=Free+Games"
},
{
"Title":"Free Music Downloads",
"Url":"http:\/\/bing.com\/results.aspx?q=Free+Music+Downloads"
},
{
"Title":"Freebox",
"Url":"http:\/\/bing.com\/results.aspx?q=Freebox"
},
{
"Title":"Free Internet",
"Url":"http:\/\/bing.com\/results.aspx?q=Free+Internet"
},
{
"Title":"Free Clip Art",
"Url":"http:\/\/bing.com\/results.aspx?q=Free+Clip+Art"
},
{
"Title":"Free Screensavers",
"Url":"http:\/\/bing.com\/results.aspx?q=Free+Screensavers"
},
{
"Title":"Free Ringtones",
"Url":"http:\/\/bing.com\/results.aspx?q=Free+Ringtones"
}
]
}
}/*pageview_candidate*/
});