mikecpeck 4:55pm, 26 August 2004
flickr.photos.search per_page doesn't seem to be working. I pass in 145, but it returns 100 no matter what. Any ideas?
admin
Eric PRO 11 years ago
Hi Mike. Questions like this, about specific API problems or questions, are best asked on the APi mailing list: lists.iamcal.com/cgi-bin/mailman/listinfo/flickr-apis

But to answer your question, 100 is the current limit to the number of photos that photos.search will return in a page. This number may change in the future.

You should always inspect the page, pages, perpage, and total attributes of the returned XML to see if you need to make more calls for multiple pages.
I just subscribed to the group! Thx. The limit wasn't in place yesterday :( I coded my app to return the exact number of images it needed in 1 page, sure made it easier. Can I lobby for 200 max out of laziness?
‮‭‬bees‬ PRO 11 years ago
i've modified the api to allow per_page values of up to 500, but defaulting to 100.

this code will by deployed some time later today.
mikecpeck 11 years ago
Excellent!!! Such service!
sgaurelius 6 years ago
Hi, I know this topic is pretty old, but sth very strange happens with my code. So, I use the photo search with flickcurl(C API). I set the parameters of the search and it works, except for the page number. So, I write for example

params.page = 2 ;
params.per_page = 10 ;

in order to return 20 results. However, it returns all the time 100.

So

1) why is this happening ?
2) why the results have to be returned in "page number" and "per page number" and not just image number ?

Maybe the problem is the C implementation of the flickr API? Because in the struct, it just has info on how many images the photo list contains. Theoretically, this must be page * per_page, but in that case, why bother having "page" and "per_page".

Finally, I want to say again, that all the other parameters work, so if I change the sorting parameter or the accuracy etc, the results returned are correctly returned, except for the image number.
admin
Sam Judson PRO 6 years ago
If the above was working it would not return 20 photos, but 10. If you want to return 20 photos you set the per_page search parameter to 20.

However seeing as you day it returns the default number of photos (i.e. 100) then it doesn't look like it is working.

You are best to contact the flickrcurl developers directly.
sgaurelius Posted 6 years ago. Edited by sgaurelius (member) 6 years ago
Yes now I fixed it and it doesn't return 100 by default but as many as I have defined in per_page.

If I want more than 500 then, what should I do, since the max for per_page is 500.

Also, it appears to have a problem with photo search, because in most cases it doesn't return any results. I have to call it multiple times in order to give me results.

I tried to contact the developers, I wait now.

P.S. I thought I had posted that I fixed the problem with per_page. For some reason the post it is not here. Anyways, the problem was that I had to set the per_page parameter in the list parameters and not the search parameters, sth which doesn't make sense(at least for me).
sgaurelius 6 years ago
Do you know what should I do if I need more than 500 pics ?
admin
Sam Judson PRO 6 years ago
You need to add other parameters - for example use the min and max upload times to get 500 photo per year or something.
Silly Luis 6 years ago
sgaurelius: Or ask for the next page
Groups Beta