Skip to content

Conversation

@tleyden
Copy link

@tleyden tleyden commented Nov 20, 2025

This PR documents the parameters for the /api/daily_papers.

This is just a first quick pass. Let me know if you'll take a PR to improve these docs, and any clean-up or edits you'd like me to do.

Thanks @AK391 for pointing me to these docs.

Add params documentation for /api/daily_papers
Copy link
Contributor

@merveenoyan merveenoyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks a lot!

docs/hub/api.md Outdated

Other keywords that are supported:

1. `limit` - the number of pages returned
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as in length of the paper or number of papers returned?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, yeah that's what it should say.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated it

docs/hub/api.md Outdated
1. `limit` - the number of pages returned
2. `p` - the page number, for paging through results
3. `submitter` - to filter by summitter
4. `date`, `week`, `month` - for filtering by date range
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
4. `date`, `week`, `month` - for filtering by date range
4. `date`, `week`, `month` - for filtering by date range

of the paper release dates?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't create the API, and it's not clear to me from the openapi docs. It could be either the paper release date, or the day it was featured on Daily Papers.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to DeepWiki

The date parameter refers to when the paper was included in the daily papers on the Hub, not when it was written or originally submitted to arXiv. hf_api.py:1527-1528

This is confirmed by the PaperInfo dataclass, which has two distinct date fields:

published_at: The date the paper was published (on arXiv) hf_api.py:1513-1514
submitted_at: The date the paper appeared in daily papers on the Hub hf_api.py:1527-1528|

I will update it according to that.

docs/hub/api.md Outdated
2. `p` - the page number, for paging through results
3. `submitter` - to filter by summitter
4. `date`, `week`, `month` - for filtering by date range
5. `sort` - to specify how results are sorted.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how can they be sorted? by date or?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the openapi docs:

sortCopy link to sort
enum
default: 
"publishedAt"
publishedAt
trending

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated this as well

docs/hub/api.md Outdated

Search the daily papers by keyword:

1. `q` - the keyword to search
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems standalone so no need to number I think

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed

tleyden and others added 4 commits November 20, 2025 16:40
Co-authored-by: Merve Noyan <merve@huggingface.co>
Clarify the default sorting behavior and options for the API.
Clarified filtering parameters for date and sorting in API documentation.
Copy link
Contributor

@merveenoyan merveenoyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm but would like @AK391 to review too just in case

@merveenoyan merveenoyan requested a review from AK391 November 21, 2025 11:00
tleyden and others added 2 commits November 21, 2025 14:05
Co-authored-by: Merve Noyan <merve@huggingface.co>
Co-authored-by: Merve Noyan <merve@huggingface.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants