Hugging Face hub

Hugging Face Discussions API

Discussions and pull requests with status, reactions, comment counts and authors, filtered the way you need them.

GET /v1/hugging-face/repos/{repoType}/{owner}/{name}/discussions

1 credit Failed requests are free

About this endpoint

GET /v1/hugging-face/repos/{repoType}/{owner}/{name}/discussions returns repo, discussionsEnabled, totalCount, closedCount and a page of discussions. Filter with status (all, open, closed), type (all, discussion, pull_request), sort (recently-created, trending, reactions), author or a title query.

Each discussion has number, url, title, status, isPullRequest, pinned, createdAt, commentCount, reactionUserCount, topReactions and author. Pages hold 50 entries and use a 1-based page. closedCount is sent on the first page only.

Hugging Face Discussions API FAQ

How do I list only pull requests?

Set type=pull_request. Use type=discussion for plain threads, or leave it out for both.

Why is closedCount null on later pages?

The platform sends the closed count on the first page only. Read it from page 1 and reuse it.

What does discussionsEnabled=false mean?

The repository has discussions switched off. The list is empty and totalCount is 0.

How much does a discussion page cost?

Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth. Each paginated page is a separate billed request.