Hi, i was looking at this API while i found that pagination is not really working.. Following the domumentation
to fetch all results for a given query, keep incrementing 'p' until you get a page with an empty results list. Note you can reach further into the results by setting per_page to 100.
but
curl https://searchcode.com/api/codesearch_I/\?q\="soup"\&p\=1000000000000000000000000000000000000000000000000000000000000000000000000000000000000\&per_page\=100
still has results, how is this possible?
just to be clear
curl https://searchcode.com/api/codesearch_I/\?q\="soup"\&p\=1000\&per_page\=100 |sha256sum
de8ddf66e564a3bf34da710de9fe241fd7faa4e9dc9533fe7cf69a4e68d9a0d8
curl https://searchcode.com/api/codesearch_I/\?q\="soup"\&p\=100\&per_page\=100 |sha256sum
de8ddf66e564a3bf34da710de9fe241fd7faa4e9dc9533fe7cf69a4e68d9a0d8
and so on..
P.S. i want to suggest add a last_page to the header (as GitHub does) or something like that, just to make the pagination easier
Hi, i was looking at this API while i found that pagination is not really working.. Following the domumentation
but
curl https://searchcode.com/api/codesearch_I/\?q\="soup"\&p\=1000000000000000000000000000000000000000000000000000000000000000000000000000000000000\&per_page\=100still has results, how is this possible?
just to be clear
curl https://searchcode.com/api/codesearch_I/\?q\="soup"\&p\=1000\&per_page\=100 |sha256sumde8ddf66e564a3bf34da710de9fe241fd7faa4e9dc9533fe7cf69a4e68d9a0d8curl https://searchcode.com/api/codesearch_I/\?q\="soup"\&p\=100\&per_page\=100 |sha256sumde8ddf66e564a3bf34da710de9fe241fd7faa4e9dc9533fe7cf69a4e68d9a0d8and so on..
P.S. i want to suggest add a last_page to the header (as GitHub does) or something like that, just to make the pagination easier