Podcastindex-org / docs-api

Developer documentation for the podcastindex.org api.
https://podcastindex-org.github.io/docs-api/
MIT License
56 stars 31 forks source link

Pagination in search endpoint #92

Open MartinMouritzen opened 1 year ago

MartinMouritzen commented 1 year ago

For the search endpoint, I would love a pagination option.

Right now to create eg. 10 pages of results, I have to request 100 results. It would be nice if I could add a param "offset" or something like that.

Hopefully it should be relatively easy to do in your PHP/SQL

$offset = intval($_REQUEST["offset"]) ? intval($_REQUEST["offset"]) : 0;

SELECT blah FROM search LIMIT ".$offset.",".$max."

Done deal! (yes, I know it's likely not as simple as that) 😄

daveajones commented 1 year ago

Is this "search/byterm" you are speaking of?

MartinMouritzen commented 1 year ago

Indeed. I am assuming it would also make sense for a few other endpoints like the "trending" one.

On Tue, 28 Feb 2023 at 18:15, Dave Jones @.***> wrote:

Is this "search/byterm" you are speaking of?

— Reply to this email directly, view it on GitHub https://github.com/Podcastindex-org/docs-api/issues/92#issuecomment-1448558903, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABP4W3QNYKITU37AY6DZCXDWZYXBLANCNFSM6AAAAAAUAHR5IM . You are receiving this because you authored the thread.Message ID: @.***>

manhphim commented 1 year ago

I agree. Currently I don't see a way that I can get a paginated response from the API

marcmaxson commented 1 year ago

In testing /search/byterm/ today: I'm getting 60 feeds returned regardless of what I search for. I know that these searches should return more than 60. Is there a limit somewhere on search results?

mainrs commented 9 months ago

In testing /search/byterm/ today: I'm getting 60 feeds returned regardless of what I search for. I know that these searches should return more than 60. Is there a limit somewhere on search results?

There is a 60 item limit on search. I experience the same behavior when searching for popular terms. There is sadly no way to increase the maximum amount as well. Although this is more of a "hot fix". |

My use-case is showing users trending podcasts for a given category as well as "infinite scrolling" for both trending and search.

I've read multiple times that constraint developer time is a problem for the pagination feature. Given that, I'd be willing to spend some time to implement this. I feel like this would enhance products based on the podcastindex.org API immensely! You can contact me using my public GitHub E-Mail!