{"openapi":"3.0.0","info":{"title":"Hugging Face Models Datasets and Spaces Data","version":"1.0.0","description":"Public Hugging Face models, datasets, Spaces, papers, collections, files and repository metadata, one row per entity."},"servers":[{"url":"https://ah-hf.opendata.best/s/huggingface-co"}],"paths":{"/v1/search":{"post":{"operationId":"search","summary":"Search Hugging Face models, datasets, Spaces and papers","description":"Query public Hugging Face models, datasets, Spaces, daily papers, collections, files and repository metadata.","tags":["search"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","description":"Search query. Empty targets use the form example; set a listing filter such as author to browse without a keyword.","example":"bert"},"searchType":{"type":"string","enum":["models","datasets","spaces","papers","collections","model","dataset","space","paper","collection","files","datasetRows","datasetSearch","datasetStatistics","datasetParquet","fileMeta","fileDownload","pathsInfo","spaceRuntime","collectionDetail","dailyPapers","discussions","commits","refs","community","enterprise","home","login","inference"],"description":"Search type. Choose the catalog, detail or metadata mode to collect. Papers and collections do not filter by keyword; options labeled not available do not collect data.","default":"models","example":"models"},"detailUrls":{"type":"array","items":{"type":"string"},"description":"Detail URLs. All URLs in this batch share one maxResults allowance."},"repoId":{"type":"string","description":"Repository ID. Repository identifier such as openai/whisper-tiny, paper identifier or collection slug. Set the matching searchType; this field alone does not select detail mode."},"owner":{"type":"string","description":"Owner or organization. Repository owner or organization. Combined with name when repoId is empty.","default":"","example":""},"name":{"type":"string","description":"Repository name. Repository name. Combined with owner when repoId is empty."},"maxResults":{"type":"integer","minimum":1,"maximum":20,"description":"Max rows per input (each listed URL, ID or keyword; a single target counts as one input). All row types share this allowance. Each plan caps the rows of one request (BASIC 10, PRO 70, ULTRA 200, MEGA 500); larger values are lowered to your plan's cap. You pay per delivered row (Rows).","default":10,"example":3},"repoKind":{"type":"string","enum":["","models","datasets","spaces"],"description":"Repository type. Repository type for files, paths, discussions, commits or references. Leave empty to use the type inferred from searchType, normally models.","default":"","example":""},"pipelineTag":{"type":"string","description":"Pipeline tag. Filter model listings by task, such as text-generation, text-classification or fill-mask.","default":"","example":""},"modality":{"type":"string","description":"Dataset modality","default":"","example":""},"spaceFilter":{"type":"string","description":"Space filter. Filter Space listings by toolkit, such as gradio, docker, streamlit or static.","default":"","example":""},"filterTags":{"type":"array","items":{"type":"string"},"description":"Hub filter tags. Additional catalog tags, such as license:mit, diffusers or task_categories:question-answering. For model tasks, use pipelineTag."},"language":{"type":"string","description":"Dataset language. This filters datasets only; it is not a country selector or search translation setting.","default":"","example":""},"author":{"type":"string","description":"Author. Filter catalog listings by a Hugging Face author or organization name.","default":"","example":""},"sort":{"type":"string","description":"Sort. Listing order: downloads, likes, createdAt or lastModified. Leave empty for the default order; trending also uses the default order.","default":"","example":""},"maxPages":{"type":"integer","minimum":1,"maximum":20,"description":"Max pages. Listing page setting from 1 to 20, with a default of 1.","default":1,"example":1},"enrichDetails":{"type":"boolean","description":"Include author details. Include public author or organization profile details when available. Enabled by default; does not collect phone numbers or street addresses.","default":true,"example":true},"datasetConfig":{"type":"string","description":"Dataset configuration. Required with an explicit repository for datasetRows; use the matching configuration for datasetSearch and datasetStatistics too.","default":"","example":""},"datasetSplit":{"type":"string","description":"Dataset split. Required with an explicit repository for datasetRows; use the matching split for datasetSearch and datasetStatistics too.","default":"","example":""},"datasetOffset":{"type":"integer","minimum":0,"description":"Dataset offset. Starting row index for datasetRows or datasetSearch. Default 0.","default":0,"example":0},"datasetLength":{"type":"integer","minimum":1,"maximum":100,"description":"Dataset length. Page size for datasetRows or datasetSearch, from 1 to 100. Defaults to 100; delivered rows are still limited by maxResults.","default":100,"example":100},"filePaths":{"type":"array","items":{"type":"string"},"description":"File paths. Repository-relative paths for pathsInfo, such as config.json. For fileMeta or fileDownload, the first path is used when targetPath is empty."},"targetPath":{"type":"string","description":"Target path. Repository-relative file path for fileMeta or fileDownload, such as config.json. Also accepted by pathsInfo when filePaths is empty.","default":"","example":""},"rev":{"type":"string","description":"Revision. Branch, tag or commit identifier for fileMeta, fileDownload, pathsInfo and commits. Default main.","default":"main","example":"main"},"paperDate":{"type":"string","description":"Paper date. Date for dailyPapers in YYYY-MM-DD format. Leave empty for today in UTC.","default":"","example":""},"commitSha":{"type":"string","description":"Reserved setting. Reserved setting. Leave empty.","default":"","example":""},"expandFields":{"type":"array","items":{"type":"string"},"description":"Expand fields. Additional listing fields to request, such as author, cardData or siblings. Only supported output fields are retained."},"wantFull":{"type":"boolean","description":"Additional listing metadata. Request additional metadata in catalog listings. Disabled by default; available output fields depend on the source.","default":false,"example":false},"wantConfig":{"type":"boolean","description":"Listing configuration information. Request configuration information in catalog listings. Disabled by default; this does not add a raw model configuration object to output rows.","default":false,"example":false},"requestId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,80}$","description":"Optional. Your id for this request: repeating it while the job runs returns the same job."}}},"example":{"searchType":"models","query":"bert","maxResults":3}}}},"responses":{"200":{"description":"Done within the request: the rows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowsPage"}}}},"404":{"description":"No results matched the query (nothing was billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid or missing parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"At capacity, too many running jobs, or rolling 24-hour row limit reached; retry after Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The source could not be collected this time (not billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"Synchronous timeout reached before completion; task cancelled (nothing was billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/health":{"get":{"operationId":"health","summary":"API health check","description":"Lightweight readiness check for this API. Never starts a collection and always bills 0 rows.","tags":["health"],"responses":{"200":{"description":"API is operational (0 rows).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}},"503":{"description":"API is temporarily unavailable (not billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}}},"components":{"schemas":{"Row":{"type":"object","properties":{"name":{"type":"string","description":"Display name or identifier for this row. Repository listings use a repository name; papers and collections may use a title. Row kinds with no canonical display name on the source (for example dataset_row content rows) omit this field and declare the absence in quality.missingFields rather than shipping a placeholder."},"type":{"type":"string","description":"Row classification, normally matching kind. Path rows may instead contain the file entry type."},"status":{"type":"string","description":"Listed or gated for repository rows; open or closed for discussion rows."},"country":{"type":"string","description":"Fixed US label for compatibility. It does not describe the location of the author, repository or content."},"authority":{"type":"string","description":"Site name: huggingface.co."},"id":{"nullable":true,"type":"string","description":"Identifier for the entity, content row, repository file or activity entry."},"url":{"nullable":true,"type":"string","description":"Public page URL when available for this row type."},"kind":{"nullable":true,"type":"string"},"pipelineTag":{"nullable":true,"type":"string","description":"Model task, such as text-generation."},"downloads":{"nullable":true,"type":"integer"},"likes":{"nullable":true,"type":"integer"},"gated":{"nullable":true,"type":"boolean"},"license":{"nullable":true,"type":"string","description":"License label from the repository tags or card."},"phones":{"type":"array","description":"Empty array. Phone numbers are not collected.","items":{"type":"object","properties":{"value":{"type":"string"},"type":{"type":"string"}}}},"emails":{"type":"array","description":"Available public profile email addresses. The Hugging Face organization press address is included only for that organization; most profiles have no email.","items":{"type":"object","properties":{"value":{"type":"string"},"type":{"type":"string"}}}},"address":{"type":"object","description":"Address fields remain null. Street addresses are not collected.","properties":{"street":{"nullable":true,"type":"string"},"unit":{"nullable":true,"type":"string"},"locality":{"nullable":true,"type":"string"},"region":{"nullable":true,"type":"string"},"postalCode":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"full":{"nullable":true,"type":"string"}}},"geo":{"type":"object","description":"Coordinates remain null. Geographic coordinates are not collected.","properties":{"lat":{"nullable":true,"type":"number"},"lng":{"nullable":true,"type":"number"}}},"person":{"type":"object","properties":{"name":{"nullable":true,"type":"string"},"role":{"nullable":true,"type":"string","description":"Author when a person is identified."}}},"org":{"type":"object","properties":{"name":{"nullable":true,"type":"string"},"id":{"nullable":true,"type":"string"}}},"web":{"type":"object","properties":{"website":{"nullable":true,"type":"string"},"socials":{"type":"array","items":{"type":"string"}}}},"leadSource":{"nullable":true,"type":"string","description":"Contact source classification: entity for profile details, search otherwise."},"leadReveal":{"nullable":true,"type":"string","description":"Visible when contact or identity details are present, absent otherwise."},"leadAbsences":{"type":"object","description":"Reasons that contact or address fields are unavailable."},"quality":{"nullable":true,"type":"object","description":"Field-level data-quality provenance: missingFields records a declared absence (not_present, not_collected, unavailable_in_surface, redacted_by_policy, parse_failed) and evidence holds the proof the source lacked the field."},"source":{"nullable":true,"type":"string","description":"Source site for the row."},"scrapedAt":{"nullable":true,"type":"string","description":"Collection timestamp in ISO format."},"channel":{"nullable":true,"type":"string","description":"Collection category identifying the selected data mode."},"downloadedWeights":{"nullable":true,"type":"boolean","description":"False when present."},"modelId":{"nullable":true,"type":"string","description":"Repository identifier retained on catalog rows. Usually the same value as id."},"owner":{"nullable":true,"type":"string","description":"Repository or collection owner."},"private":{"nullable":true,"type":"boolean"},"libraryName":{"nullable":true,"type":"string","description":"Model framework, such as transformers or diffusers."},"sdk":{"nullable":true,"type":"string","description":"Space toolkit, such as gradio, docker, streamlit or static."},"tags":{"type":"array","description":"Repository tags, limited to 40 entries.","items":{"type":"string"}},"lastModified":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string"},"trendingScore":{"nullable":true},"authorName":{"nullable":true,"type":"string","description":"Public author or owner name; papers use the first author."},"authorType":{"nullable":true,"type":"string","description":"Author classification, such as user or org."},"authorPlan":{"nullable":true,"type":"string","description":"Published author account plan, when available."},"followerCount":{"nullable":true,"type":"integer"},"numParameters":{"nullable":true,"type":"integer"},"description":{"nullable":true,"type":"string","description":"Description excerpt, limited to 400 characters."},"listUrl":{"nullable":true,"type":"string","description":"Source URL associated with a listing row."},"detailUrl":{"nullable":true,"type":"string","description":"Source URL associated with a detail row."},"treeUrl":{"nullable":true,"type":"string","description":"Source URL associated with a repository tree preview."},"sha":{"nullable":true,"type":"string","description":"Repository commit identifier or reference target."},"disabled":{"nullable":true,"type":"boolean"},"languages":{"type":"array","description":"Language list from the repository card.","items":{"type":"string"}},"cardTags":{"type":"array","description":"Tags from the repository card.","items":{"type":"string"}},"usedStorage":{"nullable":true,"type":"integer","description":"Reported repository storage size in bytes."},"safetensorsTotal":{"nullable":true,"type":"integer"},"siblingCount":{"nullable":true,"type":"integer"},"siblingNames":{"type":"array","description":"Repository filename preview, limited to 80 entries.","items":{"type":"string"}},"subdomain":{"nullable":true,"type":"string","description":"Reported Space subdomain."},"spaceHost":{"nullable":true,"type":"string","description":"Reported Space host name."},"region":{"nullable":true,"type":"string","description":"Reported Space region, when available."},"runtimeStage":{"nullable":true,"type":"string","description":"Reported runtime state on Space details."},"xRepoCommit":{"nullable":true,"type":"string","description":"Commit identifier included with repository metadata, when available."},"xLinkedEtag":{"nullable":true,"type":"string","description":"File version identifier included with repository metadata, when available."},"xLinkedSize":{"nullable":true,"type":"integer","description":"Linked file size in bytes, when available."},"title":{"nullable":true,"type":"string","description":"Paper, collection, discussion or commit title."},"upvotes":{"nullable":true,"type":"integer","description":"Published votes on paper or collection rows."},"publishedAt":{"nullable":true,"type":"string","description":"Paper publication date."},"summary":{"nullable":true,"type":"string","description":"Paper abstract excerpt, limited to 500 characters."},"authors":{"type":"array","description":"Paper author names or commit author objects, limited to 30 entries.","items":{}},"authorDetails":{"nullable":true,"description":"Public author information on paper, discussion or commit rows."},"thumbnailUrl":{"nullable":true,"type":"string"},"linkedModelCount":{"nullable":true,"type":"integer"},"linkedDatasetCount":{"nullable":true,"type":"integer"},"linkedSpaceCount":{"nullable":true,"type":"integer"},"linkedModelIds":{"type":"array","description":"Linked model identifier preview, limited to 12 entries.","items":{"type":"string"}},"gating":{"nullable":true,"type":"string","description":"Published collection access restriction."},"theme":{"nullable":true,"type":"string","description":"Collection theme."},"itemCount":{"nullable":true,"type":"integer","description":"Number of entries in the returned collection."},"itemIds":{"type":"array","description":"Collection entry identifier preview, limited to 20 entries.","items":{"type":"string"}},"shareUrl":{"nullable":true,"type":"string","description":"Collection share URL."},"fileCount":{"nullable":true,"type":"integer","description":"Tree entries returned on a single fetch (diagnostic; file entities are separate rows)."},"repoId":{"nullable":true,"type":"string","description":"Repository identifier on file, discussion, commit and reference rows."},"path":{"nullable":true,"type":"string","description":"Repository-relative file path."},"rev":{"nullable":true,"type":"string","description":"Revision associated with file metadata."},"location":{"nullable":true,"type":"object","description":"File location object containing the available URL, expiry, version and size information."},"downloadedBytes":{"nullable":true,"type":"boolean","description":"False when present. File content was not downloaded."},"oid":{"nullable":true,"type":"string","description":"File object identifier."},"size":{"nullable":true,"type":"integer","description":"File size in bytes."},"lfs":{"nullable":true,"type":"object","description":"Large-file pointer metadata, when available."},"dataset":{"nullable":true,"type":"string"},"config":{"nullable":true,"type":"string"},"split":{"nullable":true,"type":"string"},"rowIdx":{"nullable":true,"type":"integer"},"cells":{"nullable":true,"type":"object"},"truncatedCells":{"type":"array","description":"Column names with truncated values.","items":{"type":"string"}},"partial":{"nullable":true,"type":"boolean"},"numRowsTotal":{"nullable":true,"type":"integer","description":"Reported total number of rows in the split."},"featureNames":{"type":"array","items":{"type":"string"}},"featureSchema":{"nullable":true,"type":"object"},"payload":{"nullable":true,"type":"object","description":"Statistics or Parquet information returned by the source."},"num":{"nullable":true,"type":"integer","description":"Discussion number."},"isPullRequest":{"nullable":true,"type":"boolean","description":"Whether the discussion represents a pull request."},"message":{"nullable":true,"type":"string","description":"Commit message."},"date":{"nullable":true,"type":"string","description":"Commit date."},"refType":{"nullable":true,"type":"string","description":"Reference type: branch or tag."},"stage":{"nullable":true,"type":"string","description":"Reported Space runtime state."},"hardware":{"nullable":true,"type":"string","description":"Reported Space hardware."},"replicas":{"nullable":true,"type":"integer","description":"Reported Space replica count."},"domains":{"type":"array","description":"Reported Space domain names.","items":{"type":"string"}}},"additionalProperties":true,"description":"One collected entity. Field availability depends on rowType and the source. Fields always present (a|b = at least one of them): every row: id, kind; rowType=collection: id, kind, title, url; rowType=commit: id, kind, sha; rowType=dataset: id, kind, name, url; rowType=dataset_parquet: id, kind, payload; rowType=dataset_row: id, kind, dataset, rowIdx; rowType=dataset_statistics: id, kind, payload; rowType=discussion: id, kind, title; rowType=file: id, kind, path, type; rowType=file_download: id, kind, path; rowType=file_entry: id, kind, path; rowType=file_meta: id, kind, path; rowType=model: id, kind, name, url; rowType=paper: id, kind, title, url; rowType=ref: id, kind, name, sha; rowType=space: id, kind, name, url; rowType=space_runtime: id, kind, stage."},"Error":{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"ErrorDetail":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","example":"invalid_input"},"message":{"type":"string"},"retryable":{"type":"boolean"}}},"JobStatus":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","partial","failed","cancelled"]},"done":{"type":"boolean"},"rowsAvailable":{"type":"integer"},"rowsDelivered":{"type":"integer","description":"Rows already delivered (and billed) to you for this job."},"rowsLimit":{"type":"integer","description":"Most rows this job can deliver."},"estimatedFinishSec":{"type":"integer","description":"While running: estimated seconds until done."},"statusUrl":{"type":"string"},"resultsUrl":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"retentionHours":{"type":"integer"},"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"RowsPage":{"allOf":[{"$ref":"#/components/schemas/JobStatus"},{"type":"object","properties":{"offset":{"type":"integer"},"nextOffset":{"type":"integer"},"hasMore":{"type":"boolean"},"rowCount":{"type":"integer"},"rowsBilled":{"type":"integer","description":"Rows delivered by this response."},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Row"}},"meta":{"type":"object","additionalProperties":true}}}]},"HealthStatus":{"type":"object","required":["ok","site","status","endpoints","rowsBilled"],"properties":{"ok":{"type":"boolean"},"site":{"type":"string"},"status":{"type":"string","enum":["operational","unavailable"]},"endpoints":{"type":"array","items":{"type":"string"}},"rowsBilled":{"type":"integer"}}}}}}