Host a small API that answers questions from your own data
Published 2026-10-12
A lot of small teams have one question that other tools keep asking. Is this item available? What is the status of this order? What does this plan cost today? The answer lives in your records, and right now the only way to get it is for a person to look it up and paste it somewhere. A website shows stale numbers, a form cannot check anything before it submits, and the same lookup happens by hand a dozen times a day.
What a chat cannot do alone
ChatGPT or Claude can explain what an API is and can write the code for one in a few seconds. What it cannot do is put that code on the internet and keep it answering. A chat has no address other programs can call, no place to keep your records between conversations, and nothing running when you close the tab. The code it writes ends up in a message you have to deploy somewhere else.
What your assistant builds with Sails
Sails is a coding agent you connect over MCP, with cloud deployment built in. Your assistant writes the code and Sails runs it in the cloud. For this job it builds three pieces.
A table of records. Each row is one item, order, or customer with the fields other tools need, such as a name, a status, a count, and a price. Your assistant can load it from a list you paste and update it whenever you ask.
An API endpoint. This is a short handler at a URL on your domain. A request comes in with an id, the handler looks up the row, and it returns a small piece of JSON with the answer. There is no model in the loop when it runs. It is plain code that reads a table and responds in milliseconds, so it costs nothing extra per call.
A key check. If the answer should not be public, the handler only responds to callers that send a key you keep as a secret. Your website, a form, or a teammate's spreadsheet gets the key. Anyone else gets a polite refusal.
Why it works
The answer comes from one place, so every tool that asks gets the same thing. When a count or a status changes, you change the row once, and the website, the form, and anything else calling the API all see it on the next request. Nobody has to remember which page still shows last week's number.
It also stays small on purpose. One table and one endpoint are easy to read, easy to change, and easy to hand to someone else. When you want a second question answered, your assistant adds a second endpoint next to the first.
Hand it off
Copy this into your assistant:
Add Sails from https://sails.app/start. Build me a small API on my domain that answers one question from my own records. Create a table with these fields: [fields]. Add a GET endpoint that takes an id and returns the matching row as JSON, and a clear error when the id is not found. Require a key stored as a secret for every request. The handler should be plain code with no model involved. Load these starting rows: [list]. Then show me the URL and an example request I can paste into my website or spreadsheet. Ask me anything you need before you start.