You can use your Vals to power APIs and even full websites. We have a bunch of powerful systems that make this possible.
Web APIThis is where you should start if you’re building an API, website, or anything else that speaks HTTP. It uses the web-standard Request & Response objects to let you implement anything from a basic “echo this JSON” script to a full API that uses a routing library for code organization.
RunThe Web API works great with vals designed for it, but you can invoke any val via HTTP using the Run API. It’s a little more limited – you can only get JSON out of it, but it’s pretty nifty.
AuthenticationYou can use authentication to make requests against private vals.
EvalYou can also run arbitrary code through the API using the eval endpoint. This makes Val Town great as a JavaScript playground.
Archived
The express API is still supported, but we recommend you use the Web API instead, because it’s more flexible and is built on sturdy web standards. The express API mimics the interface of the Express.js framework.