Hub API Discussions


I’m using the Hub client library to retrieve information of the repositories (models, datasets and spaces). But I noticed there isn’t an endpoint in the Hub API to retrieve the discussions of the repositories.

Is there a way to retrieve this information? If not, is it going to be available soon?

Thank you

@ademait this is not documented yet (and thus subject to changes), but you can call /api/{models,datasets,spaces}/:namespace?/:repo/discussions to get discussions from a given repo

There’s also an open PR to add support for this in huggingface_hub ✨ Programmatic API for the community tab by SBrandeis · Pull Request #930 · huggingface/huggingface_hub · GitHub.

1 Like