New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HN Search API limits number of hits to 1000, regardless of page
parameter
#230
Comments
page
parameter
This is making api useless for my project, where I have to fetch all hits. |
i guess this is because paginationLimitedTo is set to |
My workaround was to write a script that splits whatever period I'm querying day by day (so a for loop that queries Mon - Sun instead of a full week). |
Thanks @cmgchess for looking into this, I had found that resource before posting, but the use of that endpoint seems to be for Algolia's customers really: it's unlikely that all those trying to query HN Search API could request such a key, especially if the key needs to be renewed every X weeks. My workaround (#230 (comment)) is fine for me for now, but I thought I'd keep the issue open as this is still unexpected and undocumented behaviour (as demonstrated by my sources). |
I am trying to fetch all stories posted in a given period. I expected to be able to get all 5k results, but am only able to get 1k.
This limit is not made explicit on the HN Search API reference.
The issue has already been raised in #125, where using the
page
parameter was suggested as a workaround: this no longer works.The issue also has also been mentioned in a StackOverflow question, with no answer specific to Algolia's HN Search API.
This might be expected behaviour, but it is not documented anywhere as far as I know.
My query:
http://hn.algolia.com/api/v1/search_by_date?tags=story&numericFilters=created_at_i%3E1661122800.0,created_at_i%3C1661727600.0&hitsPerPage=100
The output for page 9 of results:
The output for page 10 of results:
The text was updated successfully, but these errors were encountered: