Api Development

Build with Code in Xano using XanoScript

XanoScript is Xano's in-house scripting language that gives you a fully coded representation of everything you can build in Xano — from APIs and database tables to AI agents, custom functions, and background tasks. Whether you prefer working in an IDE, using AI assistance, or leveraging Xano's MCP server, XanoScript lets you build your backend your way.

What Is XanoScript?

XanoScript was built so you can meet the development workflow you're already comfortable with. It draws inspiration from familiar formats like JSON, YAML, and XML, making it highly human-readable even if you're encountering it for the first time. Anything you can build in the visual builder has a XanoScript equivalent — nothing is left out.

Understanding Primitives

Every piece of XanoScript starts with a primitive — the foundational building block that represents what you're creating. An API is a primitive. So is a database table, a custom function, a background task, and an AI agent. When you write XanoScript, you begin with a declaration that defines the primitive using a keyword (like query for an API), followed by its name and any required attributes such as the HTTP verb or authentication method.

Inputs and the Stack

After your primitive declaration, you'll typically define an input block that lists all the inputs your API or function accepts — the same input types available in the visual builder are all supported here. Next comes the stack, which is where your actual business logic lives. This includes database operations, data manipulation, external API requests, variables, and more.

Functions inside the stack follow a consistent pattern: they start with a namespace (the function category), followed by the function name, and then an object containing an optional description and any required parameters. XanoScript also supports filters using pipe characters, dot notation, and expressions.

Switching Between Visual and Code Views

Inside Xano, you can access XanoScript directly from any logic builder by clicking the XanoScript option at the top of the screen. A split view lets you see both the function stack and the XanoScript side by side — any changes you make on either side automatically sync with the other, so nothing ever gets out of step.

For primitives like database tables that don't have an editing view, you'll find XanoScript under the settings panel. You can expand the editor for a more comfortable coding experience.

Building Outside of Xano

Xano also offers a VS Code extension so you can write XanoScript directly in your favorite IDE connected to your workspace. There's also an MCP server for even more flexible integration options. These tools make XanoScript a powerful complement to — or replacement for — the visual builder depending on your preferred workflow.

Getting Started

The best way to learn XanoScript is to open Xano, explore the pre-built authentication endpoints, and read the XanoScript for logic you've already created. Xano's documentation covers every primitive and function in detail. If you're already familiar with building in Xano or have a background in traditional development, you'll find XanoScript easy to pick up quickly.

Sign up for Xano

Join 100,000+ people already building with Xano.
Start today and scale to millions.