Bing image search api v5 in php

Bing image search api v5 in php

Bing V2 API will get deprecated from December 9 2016. We need to upgrade our API from v2 to v5. Here we will see what are all the upgrades have done from v2 to v5 and will see how the bing image search
gonna work in v5 using php.

We have Following Kind of Search in Bing API
1. Composite Data Source
2. Image Data Source
3. News Data Source
4. Video Data Source
5. Web Data Source
6. RelatedSearch Data Source
7. SpellingSuggestions Data Source

v5 have changed the query parameters in all the api’s. Here we will see how the Image Data Source API will work.

2. Image Data Source

Endpoints of v2 and v5
The following shows the Version 2 and Version 5 Image endpoints.

Version 2$format=json

Version 5
Version 5 also provides the following endpoint which you can use to get images that are trending.

Version 5 have newly introduced 2 feature
1. Market codes: allows a country variable to impact search results

2. Pivot suggestions: Bing can now segment the original search query. For example, if the original query was Microsoft Surface, Bing might segment the query into Microsoft and Surface. We can expose these ‘Segments’ to the user to refine their search

Here you can find the Query parameter changes.

Example :

Output :

For more information :

Find a GitHub Repository @

Thanks for reading this article.
If you like this article don’t forget to share and comment.