{"openapi":"3.1.0","info":{"title":"Hugging Face Models Datasets and Spaces Data (x402 & MCP)","version":"0.1.0","description":"Public Hugging Face models, datasets, Spaces, papers, collections, files and repository metadata, one row per entity.","x-guidance":"Structured real-time web intelligence APIs paid per delivered row in USDC via x402. All endpoints are synchronous at POST /s/<site>/v1/<endpoint> and also exposed over stateless MCP at POST /mcp. Supports x402 v2 'upto' (Permit2, charged strictly for delivered rows) and 'exact' (EIP-3009). Empty/0-row (404), invalid input (422), timeout (504), and upstream failures (502) are never charged.","contact":{"email":"ops@opendata.best"}},"servers":[{"url":"https://x402.opendata.best"}],"paths":{"/s/huggingface-co/v1/search":{"post":{"operationId":"huggingface_co_search","summary":"Hugging Face Models Datasets and Spaces Data: Search Hugging Face models, datasets, Spaces and papers","description":"Query public Hugging Face models, datasets, Spaces, daily papers, collections, files and repository metadata. Unit price: $0.002000/row USDC (default quote 10 rows, max 20 rows). Unsettled / 0-row / error responses are never charged.","tags":["huggingface-co","Artificial Intelligence/Machine Learning"],"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"dynamic","currency":"USD","amount":"0.020000"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","description":"Search models, datasets or Spaces by keyword, or search text within dataset content. Empty targets use the form example; set a listing filter such as author to browse without a keyword."},"searchType":{"type":"string","description":"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","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"]},"detailUrls":{"type":"array","items":{"type":"string"},"description":"Hugging Face model, dataset, Space, paper, collection or tree page links; hf.co links and owner/name are accepted. All URLs in this batch share one maxResults allowance."},"repoId":{"type":"string","description":"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":"Repository owner or organization. Combined with name when repoId is empty.","default":""},"name":{"type":"string","description":"Repository name. Combined with owner when repoId is empty."},"maxResults":{"type":"integer","description":"Maximum rows per query or repository input; detailUrls shares one allowance across its entire batch. Default 70, collected in parts of 70; your maximum charge also limits delivery, and Free platform plan users have a 200-row run cap and 10-run allowance for this Actor.","default":10,"minimum":1,"maximum":20},"repoKind":{"type":"string","description":"Repository type for files, paths, discussions, commits or references. Leave empty to use the type inferred from searchType, normally models.","default":"","enum":["","models","datasets","spaces"]},"pipelineTag":{"type":"string","description":"Filter model listings by task, such as text-generation, text-classification or fill-mask.","default":""},"modality":{"type":"string","description":"Filter dataset listings by content type, such as text, audio or image.","default":""},"spaceFilter":{"type":"string","description":"Filter Space listings by toolkit, such as gradio, docker, streamlit or static.","default":""},"filterTags":{"type":"array","items":{"type":"string"},"description":"Additional catalog tags, such as license:mit, diffusers or task_categories:question-answering. For model tasks, use pipelineTag."},"language":{"type":"string","description":"Dataset language code, such as en, zh, ja or ar. This filters datasets only; it is not a country selector or search translation setting.","default":""},"author":{"type":"string","description":"Filter catalog listings by a Hugging Face author or organization name.","default":""},"sort":{"type":"string","description":"Listing order: downloads, likes, createdAt or lastModified. Leave empty for the default order; trending also uses the default order.","default":""},"maxPages":{"type":"integer","description":"Listing page setting from 1 to 20, with a default of 1. The Actor can increase the number of pages to meet maxResults, up to 20.","default":1,"minimum":1,"maximum":20},"enrichDetails":{"type":"boolean","description":"Include public author or organization profile details when available. Enabled by default; does not collect phone numbers or street addresses.","default":true},"datasetConfig":{"type":"string","description":"Dataset configuration name, such as plain_text or default. Required with an explicit repository for datasetRows; use the matching configuration for datasetSearch and datasetStatistics too.","default":""},"datasetSplit":{"type":"string","description":"Dataset split name, such as train, test or validation. Required with an explicit repository for datasetRows; use the matching split for datasetSearch and datasetStatistics too.","default":""},"datasetOffset":{"type":"integer","description":"Starting row index for datasetRows or datasetSearch. Default 0.","default":0,"minimum":0},"datasetLength":{"type":"integer","description":"Page size for datasetRows or datasetSearch, from 1 to 100. Defaults to 100; delivered rows are still limited by maxResults.","default":100,"minimum":1,"maximum":100},"filePaths":{"type":"array","items":{"type":"string"},"description":"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":"Repository-relative file path for fileMeta or fileDownload, such as config.json. Also accepted by pathsInfo when filePaths is empty.","default":""},"rev":{"type":"string","description":"Branch, tag or commit identifier for fileMeta, fileDownload, pathsInfo and commits. Default main.","default":"main"},"paperDate":{"type":"string","description":"Date for dailyPapers in YYYY-MM-DD format. Leave empty for today in UTC.","default":""},"commitSha":{"type":"string","description":"Reserved setting. Leave empty.","default":""},"expandFields":{"type":"array","items":{"type":"string"},"description":"Additional listing fields to request, such as author, cardData or siblings. Only supported output fields are retained."},"wantFull":{"type":"boolean","description":"Request additional metadata in catalog listings. Disabled by default; available output fields depend on the source.","default":false},"wantConfig":{"type":"boolean","description":"Request configuration information in catalog listings. Disabled by default; this does not add a raw model configuration object to output rows.","default":false}},"additionalProperties":false},"example":{"searchType":"models","query":"bert","maxResults":10}}}},"responses":{"200":{"description":"Synchronous data rows with x402 PAYMENT-RESPONSE receipt header.","headers":{"PAYMENT-RESPONSE":{"description":"Base64-encoded x402 v2 SettleResponse receipt.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response_huggingface_co"},"example":{"jobId":"job_huggingf_example","status":"succeeded","done":true,"rowCount":1,"rowsBilled":1,"rowsDelivered":1,"rows":[{"kind":"example_kind","id":"example_001","pipelineTag":"example_pipelineTag","downloads":10,"likes":10,"person":"example_person"}],"meta":{"site":"huggingface-co","endpoint":"search","maxResults":10,"payment":{"scheme":"upto","network":"eip155:84532","quotedMicrousd":20000,"settledMicrousd":2000,"transaction":"0x0000000000000000000000000000000000000000000000000000000000000000"}}}}}},"402":{"description":"Payment required or invalid/declined payment authorization (never charged).","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 PaymentRequired quote.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"no_results: 0 rows matched the query; aborted before settlement (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"payment_id_conflict: payment-identifier reused with different parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid or missing request parameters (validated before /verify; charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit or payer cooldown exceeded (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Upstream source failed or blocked (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"settlement_pending or facilitator_unavailable; retry same payment to reconcile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"upstream_timeout: synchronous deadline reached and task cancelled (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/s/huggingface-co/v1/health":{"get":{"operationId":"huggingface_co_health","summary":"Hugging Face Models Datasets and Spaces Data: health check","description":"Free readiness check (never returns 402 and never starts a collection).","tags":["huggingface-co","health"],"responses":{"200":{"description":"Operational","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}},"503":{"description":"Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}}},"components":{"schemas":{"ErrorDetail":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"charged":{"type":"boolean"}}},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"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"}}},"Row_huggingface_co":{"type":"object","properties":{"kind":{"type":["string","null"],"title":"Kind"},"id":{"type":["string","null"],"title":"Repo id"},"pipelineTag":{"type":["string","null"],"title":"Pipeline"},"downloads":{"type":["number","null"],"title":"Downloads"},"likes":{"type":["number","null"],"title":"Likes"},"person":{"type":["string","null"],"title":"Person"},"emails":{"type":["string","null"],"title":"Emails"},"org":{"type":["string","null"],"title":"Org"},"gated":{"type":["string","null"],"title":"Gated"},"license":{"type":["string","null"],"title":"License"},"url":{"type":["string","null"],"format":"uri","title":"URL"}},"additionalProperties":true},"Response_huggingface_co":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string"},"done":{"type":"boolean"},"rowCount":{"type":"integer","minimum":1},"rowsBilled":{"type":"integer","minimum":1},"rowsDelivered":{"type":"integer","minimum":1},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Row_huggingface_co"}},"meta":{"type":"object","properties":{"site":{"type":"string"},"endpoint":{"type":"string"},"maxResults":{"type":"integer"},"payment":{"type":"object","properties":{"scheme":{"type":"string"},"network":{"type":"string"},"quotedMicrousd":{"type":"integer"},"settledMicrousd":{"type":"integer"},"transaction":{"type":"string"},"payer":{"type":"string"}}}}}},"required":["jobId","status","done","rowCount","rows"]}}},"x-discovery":{"ownershipProofs":["0xdb7c562a3ef6f9f29da4672abdab1489e82e910a91b863e3c22b905df6522b7223798a84245e0452cab689483b6cbb7cd8c13141319df982b213dea31ee7e4311c"]}}