Query datasets hosted on https://huggingface.co/datasets via the Hugging Face Hub API, returning metadata such as dataset id, gated status, and download counts.
Usage
list_datasets(
num_of_dataset = 100,
chunk_size = 100,
search = NULL,
author = NULL,
fetch_meta = TRUE,
max_concurrent = 10,
...
)Arguments
- num_of_dataset
(
integer(1))
Total number of records to retrieve. Must be a positive integer. Default is100.- chunk_size
(
integer(1))
Number of records to request per API call. Default is100.- search
(
character(1))
Optional search keyword to filter datasets by. Default isNULL.(
character(1))
Optional author/organization name to filter datasets by. Default isNULL.- fetch_meta
(
logical(1))
IfTRUE(default), also fetchesnrowsandncolsfor each dataset viafetch_dataset_meta(). IfFALSE, skips this extra network call and returns onlyid,gated,downloads.- max_concurrent
(
integer(1))
Maximum number of simultaneous connections used when fetching metadata. Default is10.- ...
Additional arguments passed on to
get_with_retry(), e.g.max_retries.
Value
(data.table()) of results with columns id, nrows, and
ncols or an empty data.table() if no datasets are found.
