{"schemaVersion":1,"id":"superstruct","name":"Superstruct","locale":"en","canonicalUrl":"https://base.akulich.dev/en/library/superstruct/","officialUrl":"https://github.com/ianstormtaylor/superstruct","isCatalog":false,"description":"A JavaScript and TypeScript runtime validation library: it defines data structures and validates application API boundaries.","tasks":["Validate input structure at runtime","Add validation at an API boundary and test acceptance and rejection of examples"],"categoryIds":["backend","frontend"],"subcategoryIds":["backend.api","frontend.forms"],"tags":["Superstruct","API","Development"],"aliases":["ianstormtaylor/superstruct","superstruct","data-validation-js","superstruct-validation"],"platforms":[],"stack":[],"compatibility":null,"pricing":"free","freeUsage":"Code and local use under MIT.","paidUsage":"Computing resources, self-hosting, and external services are paid for separately if used.","license":"MIT for the code; dependencies have separate licenses.","selectionGuide":{"purpose":"Validate input structure at runtime","chooseWhen":["Validate input structure at runtime","Add validation at an API boundary and test acceptance and rejection of examples"],"considerInstead":[],"requirements":["Define structs and decide where coercion is acceptable and where input must be strictly rejected."],"limitations":["Costs and limits of free use: Computing resources, self-hosting, and external services are paid for separately if used.","Terms of use: MIT for the code; dependencies have separate licenses.","A TypeScript type alone does not validate external JSON. Custom email/UUID rule correctness depends on the chosen validator."],"faq":[{"question":"What can you use for free in Superstruct?","answer":"Code and local use under MIT."},{"question":"What additional costs might arise with Superstruct?","answer":"Computing resources, self-hosting, and external services are paid for separately if used."},{"question":"What terms of use matter for Superstruct?","answer":"MIT for the code; dependencies have separate licenses."},{"question":"How do you get started with Superstruct?","answer":"Define a schema for external data entering the application. Add validation at an API boundary and test acceptance and rejection of examples. Add error handling and an integration check of the result."},{"question":"How do assert, is, validate, and create differ in Superstruct?","answer":"A Struct defines data shape for runtime validation. assert throws on mismatch; is and validate check without that throw. create applies coercion/default values during validation. Custom validators are defined separately, and TypeScript can narrow data types after successful validation."}],"related":[],"sources":["https://github.com/ianstormtaylor/superstruct","https://raw.githubusercontent.com/ianstormtaylor/superstruct/HEAD/Readme.md","https://raw.githubusercontent.com/ianstormtaylor/superstruct/HEAD/package.json","https://www.open-source-tools.com/"]},"selectionCheckedAt":null,"applicationGuide":{"goal":"Validate input structure at runtime.","inputs":["A data contract or HTTP workflow.","A project with a supported runtime."],"steps":["Define a schema for external data entering the application.","Add validation at an API boundary and test acceptance and rejection of examples.","Add error handling and an integration check of the result."],"checks":["Invalid and missing data are handled predictably.","Types and the actual response agree; errors are not hidden."]},"sources":["https://github.com/ianstormtaylor/superstruct","https://raw.githubusercontent.com/ianstormtaylor/superstruct/HEAD/Readme.md","https://raw.githubusercontent.com/ianstormtaylor/superstruct/HEAD/package.json","https://www.open-source-tools.com/"],"checkedAt":"2026-10-06","reviewScope":"The purpose, current repository license, and separate terms for code, services, and models have been reviewed. The product was not run, and no security audit was performed.","relatedIds":[],"dataVersion":"cbbe7123b47a5ae80983","type":"Backend / API library","kind":"library","pricingNote":"Code and local use under MIT. Computing resources, self-hosting, and external services are paid for separately if used.","notes":null,"labeledSources":[{"url":"https://github.com/ianstormtaylor/superstruct","label":"Official source"},{"url":"https://raw.githubusercontent.com/ianstormtaylor/superstruct/HEAD/Readme.md","label":"Official source"},{"url":"https://raw.githubusercontent.com/ianstormtaylor/superstruct/HEAD/package.json","label":"License"},{"url":"https://www.open-source-tools.com/","label":"Catalog / discovery source"}],"licenseGuides":[{"id":"mit","title":"MIT — permissive license","scope":null,"summary":"You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.","url":"https://opensource.org/license/mit"}],"entryIds":[],"composition":null}