get_collection | Get a collection and its items. collection_slug (string “namespace/title-id”, the slug returned by list_collections). |
get_dataset | Get a dataset’s metadata: description, tags, downloads, likes, files list, card data. repo_id (string “namespace/name”, the id returned by the search actions). |
get_discussion | Get one discussion or pull request with its comments and status events. repo_type (“models” | “datasets” | “spaces”); repo_id (string “namespace/name”, the id returned by the search actions); num (integer, the discussion number from list_discussions). |
get_model | Get a model card’s metadata: task, library, tags, downloads, likes, files list, config. repo_id (string “namespace/name”, the id returned by the search actions). |
get_space | Get a Space’s metadata: SDK, runtime stage and hardware, tags, likes, files list. repo_id (string “namespace/name”, the id returned by the search actions). |
list_collections | List collections, filtered by owner (user or organization name), by an item they contain (item: “models/namespace/name”, “datasets/…”, “spaces/…” or “papers/…”) or by text (q), sorted by upvotes, lastModified or trending. Each result has a slug for get_collection. |
list_discussions | List discussions and pull requests of a repository. repo_type (“models” | “datasets” | “spaces”); repo_id (string “namespace/name”, the id returned by the search actions); type (“all” | “discussion” | “pull_request”); status (“all” | “open” | “closed”); author (username); search (text); sort (“recently-created” | “trending” | “reactions”); p (0-based page). |
list_my_repositories | List the repositories of the token owner (id “namespace/name”, type, visibility, storage used). Use it to discover your own repo_id values. |
list_notifications | List the token owner’s Hub notifications (discussions, pull requests, papers), 0-based page p, optionally only unread ones or only those for one repository. |
list_repo_files | List files and folders of a repository (metadata only: type, path, size, LFS info; with expand, last commit per entry). repo_type (“models” | “datasets” | “spaces”); repo_id (string “namespace/name”, the id returned by the search actions); revision (string: branch, tag or commit sha, e.g. “main” — no slash, so give a pull-request ref as its commit sha); path (optional folder inside the repo, e.g. “onnx”); recursive (boolean); expand (boolean); limit (integer). |
search_datasets | Search datasets on the Hub by text, author or tag (filter, e.g. “task_categories:text-classification”, “language:fr”), sorted by downloads, likes, trendingScore, createdAt or lastModified (descending). |
search_models | Search models on the Hub by text, author, tag (filter, e.g. “text-classification”, “pytorch”, “license:apache-2.0”) or task (pipeline_tag), sorted by downloads, likes, trendingScore, createdAt or lastModified (descending). |
search_spaces | Search Spaces (hosted demo apps) on the Hub by text, author or tag (filter, e.g. “gradio”), sorted by likes, trendingScore, createdAt or lastModified (descending). |
whoami | Get the account the token belongs to: type, id, name (the namespace of your repositories), fullname, email, emailVerified, isPro, avatarUrl and orgs (name, fullname, roleInOrg). Token details (auth) are removed. No argument. |