4

The default image search on DuckduckGo/Bing returns 35 images.

E.g. https://duckduckgo.com/?q=Temple+of+the+Golden+Pavilion&iax=1&ia=images

The same for Bing, see http://www.bing.com/images/search?q=Temple%20of%20the%20Golden%20Pavilion

Is there a way to let it return more images using the http url?

Or if it's not possible, is there a way to go to the next 35 images through the http url?


I've checked their syntax page but there is no information about the image search: https://duckduckgo.com/params

I've tried &count=1000 too but it stills return 35 images: https://www.bing.com/images/search?q=times+square&count=100

tagawa
  • 4,561
  • 2
  • 27
  • 34
alvas
  • 115,346
  • 109
  • 446
  • 738
  • Why do you want to get more images ? Is it to parse them from your server or do you need a client to go there directly with the url ? – leszek.hanusz Mar 13 '15 at 18:20
  • I need to scrap the N no. of images urls off the engine. I already have a scrapper ready for the url but it only returns 35 images. – alvas Mar 13 '15 at 19:39
  • why are you scraping when you can use API? – bitkot Mar 20 '15 at 07:53
  • Is there an API for duckduckgo image search? – alvas Mar 20 '15 at 09:58
  • I don't know about duckduckgo, google it :). I have used bing image api. – bitkot Mar 20 '15 at 10:27
  • 1
    Note that DuckDuckGo offers an API, but it does not support images because their image sources do not allow them to redistribute it. So you are probably breaking somebody's terms of service (TOS) to scrape from Duck Duck Go – Josiah Yoder Jul 19 '18 at 17:08

2 Answers2

6

For duckduckgo you could use the ajax url

https://duckduckgo.com/i.js?q=Temple%20of%20the%20Golden%20Pavilion&s=50

It still only displays 35 images however the s parameter sets where the list of 35 starts from in the overall list, however big that may be.

There is a next property in the json object holds the url for the next 35 images.

Matt
  • 459
  • 5
  • 12
2

You want to avoid using the default front page as it uses Ajax to get more images when you push on the plus symbol, thus not controllable via URL query string.

Try this link https://encrypted.google.com/search?tbm=isch&q=tomato

..or this for even cleaner page structure (no similarity based suggestions) https://encrypted.google.com/search?tbm=isch&q=tomato&tbs=imgo:1

The parameter tbm=isch takes you to a differently formatted page with more images. Beware this still uses Ajax to load more images dinamically when scroling down. As far as I know DuckDuckGo doesn't document any parameters to control the number of images you get back. Hope this helps.

Steak Overflow
  • 7,041
  • 1
  • 37
  • 59