Skip to content

Adding a limit param to the /api/papers/search api #3559

@tleyden

Description

@tleyden

Is your feature request related to a problem? Please describe.

The list_papers api endpoint takes a single query parameter for a keyword search, but can return hundreds of results.

Here is the OpenAPI Playground docs for the endpoint:

https://huggingface-openapi.hf.space/#tag/papers/get/apipaperssearch

Describe the solution you'd like
At minimum, add a limit param to limit the search results. Without this, the amount of search results can be overwhelming for certain apps.

Describe alternatives you've considered
I can filter on the client side, however that is a waste of compute and bandwidth for both parties.

Additional context
I'm open to submitting a PR if someone will sign up to review it. Let me know the PR guidelines.

I'm building a mobile app and one of the features will be to easily navigate the Hugging Face Top Papers, and I want to base it on API calls rather than having to resort to web scraping.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions