{"name":"Crates.io Search API","description":"Search results on crates.io, with description and name fields, plus search inputs.","api_id":"generated_63fd37ce149a839eb76f0c37","slug":"crates-io-search-api","source":{"name":"Crates","domain":"crates.io","url":"https://crates.io/"},"category":null,"countries":[],"languages":[],"record_types":[],"tags":[],"limitations":[],"updated":"2026-12-02","note":"Sample records are saved samples, not a live run. CleanedWeb is not affiliated with the source.","version":"1.0","versions":[{"major":1,"latest_minor":"1.0","status":"current","sunset_at":null}],"changelog":[{"version":"1.0","date":"2026-12-01T16:13:15.000Z","kind":"major","changes":[]}],"version_note":"Pin a major with \"version\": N in the run body (an integer). Leave it out and the call runs on the latest major. A sunset major runs on the latest major and the response says rerouted. An unknown major answers 404 catalog_version_not_found and lists the available majors.","endpoints":[{"endpoint_id":"generated_63fd37ce149a839eb76f0c37_search","name":"Search Crates.ios","description":"Return records within the accepted scope.","definition_version":"50ae713de64e328a5b99c7e5d1d08019d46d504f1eedf15252ee60dfc56a8915","method":"POST","path":"/v1/catalog/public/apis/generated_63fd37ce149a839eb76f0c37/endpoints/generated_63fd37ce149a839eb76f0c37_search/run","url":"https://api.cleanedweb.com/v1/catalog/public/apis/generated_63fd37ce149a839eb76f0c37/endpoints/generated_63fd37ce149a839eb76f0c37_search/run","authentication":{"type":"bearer","scheme":"Authorization: Bearer <API key>","scope":"run","note":"Reading this file and the live catalog needs no credential. A run needs a CleanedWeb account and uses the credits of its workspace.","docs":"https://cleanedweb.com/docs/run-catalog-api/"},"required_headers":[{"name":"Authorization","value":"Bearer YOUR_API_KEY","description":"An API key with the run scope."},{"name":"Idempotency-Key","value":"UNIQUE_REQUEST_ID","description":"Required. Save it before you send; reuse it only to retry the same request and to read the result. 1-200 characters: letters, numbers, . _ : -"},{"name":"Content-Type","value":"application/json","description":"The body is JSON."}],"request_body":{"input":"An object that follows input_schema.","max_items":"Optional. Stop after this many records.","timeout_seconds":"Optional, 60-86400, default 10800.","wait_seconds":"Optional, 0-86400, default 90. How long the request waits before answering 202.","version":"Optional integer major. Leave it out for the latest major."},"input_schema":{"type":"object","properties":{"enrich_records":{"type":"boolean","default":true,"description":"true: read each returned record's product/detail page and merge its fields into the record. false: return list/search-level fields only, with no detail page reads. Every returned record's detail page is read within the run's time budget; records the time budget leaves unread are returned without detail fields, and summary.record_enrichment reports how many records were enriched and why any were not (run_time_budget). Detail fields are optional."},"query":{"type":"string","minLength":1,"maxLength":200,"examples":["tokio","rand"],"default":"serde","description":"Required. Free text for the page's own \"Search\" box, sent as its query key exactly as typed."},"sort":{"type":"string","enum":["relevance","downloads","recent_downloads"],"x-enum-labels":["relevance","downloads","recent downloads"],"x-source-values":["relevance","downloads","recent-downloads"],"default":"relevance","description":"Optional. Result order: one verified value(s) of the page's own \"Sort by\" control (relevance = relevance; downloads = downloads; recent_downloads = recent downloads). Omit it for the page's own selection."}},"required":["query"],"additionalProperties":false},"output_schema":{"additionalProperties":false,"type":"object","properties":{"badges":{"type":"array","x-cleanedweb-source-value-opaque":true},"crate":{"type":"object","properties":{"categories":{"type":["array","boolean","number","object","string"]},"keywords":{"type":["array","boolean","number","object","string"]},"versions":{"type":["array","boolean","number","object","string"]},"category_entries":{"type":"array","items":{"type":"string"}},"keyword_entries":{"type":"array","items":{"type":"string"}},"max_version":{"type":"string"},"newest_version":{"type":"string"}},"additionalProperties":false},"dates":{"type":"object","properties":{"created_at":{"type":"string"},"updated_at":{"type":"string"}},"additionalProperties":false},"versions":{"type":"object","properties":{"default":{"type":"string"},"max_stable":{"type":"string"},"max":{"type":"string"},"newest":{"type":"string"},"count":{"type":"number"},"checksum":{"type":"array","items":{"type":"string"}},"crate":{"type":"array","items":{"type":"string"}},"crate_size":{"type":"array","items":{"type":"integer"}},"created_at":{"type":"array","items":{"type":"string"}},"description":{"type":"array","items":{"type":"string"}},"download_path":{"type":"array","items":{"type":"string"}},"documentation":{"type":"array","items":{"type":"string"}},"downloads":{"type":"array","items":{"type":"integer"}},"edition":{"type":"array","items":{"type":"string"}},"has_lib":{"type":"array","items":{"type":"boolean"}},"homepage":{"type":"array","items":{"type":"string"}},"id":{"type":"array","items":{"type":"integer"}},"license":{"type":"array","items":{"type":"string"}},"linecounts":{"type":"object","properties":{"rust":{"type":"object","properties":{"code_lines":{"type":"array","items":{"type":"integer"}},"comment_lines":{"type":"array","items":{"type":"integer"}},"files":{"type":"array","items":{"type":"integer"}}},"additionalProperties":false},"total_code_lines":{"type":"array","items":{"type":"integer"}},"total_comment_lines":{"type":"array","items":{"type":"integer"}}},"additionalProperties":false},"links":{"type":"object","properties":{"authors":{"type":"array","items":{"type":"string"}},"dependencies":{"type":"array","items":{"type":"string"}},"version_downloads":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"number":{"type":"array","items":{"type":"string"}},"publisher":{"type":"object","properties":{"created_at":{"type":"array","items":{"type":"string"}},"id":{"type":"array","items":{"type":"integer"}},"login":{"type":"array","items":{"type":"string"}},"name":{"type":"array","items":{"type":"string"}},"url":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"readme_path":{"type":"array","items":{"type":"string"}},"repository":{"type":"array","items":{"type":"string"}},"rust_version":{"type":"array","items":{"type":"string"}},"trustpub":{"type":"object","properties":{"provider":{"type":"array","items":{"type":"string"}},"repository":{"type":"array","items":{"type":"string"}},"run_id":{"type":"array","items":{"type":"string"}},"sha":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"updated_at":{"type":"array","items":{"type":"string"}},"yanked":{"type":"array","items":{"type":"boolean"}}},"additionalProperties":false},"description":{"type":"string"},"links":{"type":"object","properties":{"documentation":{"type":"string"},"homepage":{"type":"string"},"versions":{"type":"string"},"owner_team":{"type":"string"},"owners":{"type":"string"},"repository":{"type":"string"},"reverse_dependencies":{"type":"string"},"version_downloads":{"type":"string"}},"additionalProperties":false},"downloads":{"type":"object","properties":{"total":{"type":"number"},"recent":{"type":"number"}},"additionalProperties":false},"exact_match":{"type":"boolean"},"id":{"type":["string"]},"_page":{"type":"object","properties":{"links":{"type":"object","x-cleanedweb-source-value-opaque":true}},"additionalProperties":false},"name":{"type":"string"},"trustpub_only":{"type":"boolean"},"yanked":{"type":"boolean"},"categories":{"type":"object","properties":{"category":{"type":"array","items":{"type":"string"}},"crates_count":{"type":"array","items":{"type":"integer"}},"created_at":{"type":"array","items":{"type":"string"}},"description":{"type":"array","items":{"type":"string"}},"id":{"type":"array","items":{"type":"string"}},"slug":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"keywords":{"type":"object","properties":{"crates_count":{"type":"array","items":{"type":"integer"}},"created_at":{"type":"array","items":{"type":"string"}},"id":{"type":"array","items":{"type":"string"}},"keyword":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}},"required":["id"]},"output_schema_note":"Some fields the source returns are not published here (identifiers, personal details and page-building noise). A record can carry fields this schema does not list, so additionalProperties is true. Do not reject a record for an extra field. The live contract, linked as live_contract, lists every field the saved definition declares.","examples":[{"kind":"saved_validation_records","saved_at":"2026-12-01T16:13:15.894Z","live_verified":false,"request":{"input":{}},"records_shown":2,"records_saved":2,"records":[{"dates":{"created_at":"2014-12-05T20:20:39.487502Z","updated_at":"2026-07-18T23:05:13.266456Z"},"versions":{"default":"1.0.229","max_stable":"1.0.229","max":"1.0.229","newest":"1.0.229","count":316},"links":{"documentation":"https://docs.rs/serde","homepage":"https://serde.rs/","versions":"https://crates.io/api/v1/crates/serde/versions","owner_team":"https://crates.io/api/v1/crates/serde/owner_team","owners":"https://crates.io/api/v1/crates/serde/owners","repository":"https://github.com/serde-rs/serde","reverse_dependencies":"https://crates.io/api/v1/crates/serde/reverse_dependencies","version_downloads":"https://crates.io/api/v1/crates/serde/downloads"},"downloads":{"total":1817058559,"recent":473498822},"description":"A generic serialization/deserialization framework","exact_match":true,"id":"serde","name":"serde","trustpub_only":false,"yanked":false},{"dates":{"created_at":"2017-11-11T19:29:52.110872Z","updated_at":"2026-01-14T04:29:49.781840Z"},"versions":{"default":"1.40.0","max_stable":"1.40.0","max":"1.40.0","newest":"1.40.0","count":71},"links":{"documentation":"https://docs.rs/rust_decimal/","versions":"https://crates.io/api/v1/crates/rust_decimal_macros/versions","owner_team":"https://crates.io/api/v1/crates/rust_decimal_macros/owner_team","owners":"https://crates.io/api/v1/crates/rust_decimal_macros/owners","repository":"https://github.com/paupino/rust-decimal","reverse_dependencies":"https://crates.io/api/v1/crates/rust_decimal_macros/reverse_dependencies","version_downloads":"https://crates.io/api/v1/crates/rust_decimal_macros/downloads"},"downloads":{"total":27440638,"recent":7585234},"description":"Shorthand macros to assist creating Decimal types.","exact_match":false,"id":"rust_decimal_macros","name":"rust_decimal_macros","trustpub_only":false,"yanked":false}]}],"request_example":{"body":{"input":{"query":"serde"},"version":1,"max_items":25},"curl":"curl -X POST https://api.cleanedweb.com/v1/catalog/public/apis/generated_63fd37ce149a839eb76f0c37/endpoints/generated_63fd37ce149a839eb76f0c37_search/run \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Idempotency-Key: UNIQUE_REQUEST_ID\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"input\": {\n    \"query\": \"serde\"\n  },\n  \"version\": 1,\n  \"max_items\": 25\n}'"},"result":{"method":"GET","url":"https://api.cleanedweb.com/v1/catalog/public/apis/generated_63fd37ce149a839eb76f0c37/endpoints/generated_63fd37ce149a839eb76f0c37_search/result","note":"A run that does not end within wait_seconds answers 202. Read the result with the same API key and the same Idempotency-Key."},"links":{"page":"https://cleanedweb.com/catalog/crates-io-search-api/","markdown":"https://cleanedweb.com/catalog/crates-io-search-api/index.md","live_contract":"https://app.cleanedweb.com/api/catalog/apis/generated_63fd37ce149a839eb76f0c37/endpoints/generated_63fd37ce149a839eb76f0c37_search/contract","run_docs":"https://cleanedweb.com/docs/run-catalog-api/"}}],"links":{"page":"https://cleanedweb.com/catalog/crates-io-search-api/","markdown":"https://cleanedweb.com/catalog/crates-io-search-api/index.md","contract":"https://cleanedweb.com/catalog/crates-io-search-api/contract.json","catalog":"https://cleanedweb.com/catalog/","index":"https://cleanedweb.com/catalog/index.json","openapi":"https://cleanedweb.com/catalog/openapi.json"}}
