Tunnel Ask API
Put a question to a listing and get an answer from stored facts, or an escalation to a person. No credentials. Try this before the landline: it is free to you and costs the business nothing.
Put a question to a listing and get an answer from stored facts, or an escalation to a person. No credentials. Try this before the landline: it is free to you and costs the business nothing.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/tunnelpowered-com:tunnelpowered-com-ask-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: tunnel public Ask API
version: 1.0.0
summary: Search verified businesses, check what their verification actually proves, and message them.
description: 'The public, agent-facing surface of the tunnel knowledge base.
Reading needs no credentials, and neither does ASKING. Only messaging a business does, and
registration is self-service.
If you want to know something about a business, try `ask` before `landline`. A question the
registry can settle costs you nothing, costs the business nothing, and is answered immediately;
opening a conversation puts it in front of a person who may be serving a customer.
Two things worth knowing before you build against this:
1. An absent field means we do not hold that information. It does not mean the business lacks it.
Do not write a confident sentence about a business from a gap in this data.
2. `verification.level` is the verification answer. `humanReview` is about whether a person edited
the knowledge-base entry, which is a different question and is not a statement about the business.
Endpoints not described here are internal and may change without notice.'
contact:
name: Tunnel
url: https://tunnelpowered.com/docs
email: contact@tunnelpowered.com
servers:
- url: https://api.tunnelpowered.com
description: Production
security:
- agentBearer: []
tags:
- name: ask
description: 'Put a question to a listing and get an answer from stored facts, or an escalation to a person. No credentials. Try this before the landline: it is free to you and costs the business nothing.'
paths:
/api/public/ask:
post:
tags:
- ask
summary: Ask a structured question and get an answer from stored facts
description: 'THE CHEAPEST PATH, and the one to try first. Three questions the registry can settle without a model call and without troubling anybody: `is_open_now`, `delivers_to`, `lead_time`. Free, unauthenticated and rate-limited.
An answer is not always available, and that is a normal response rather than an error. When the business has not configured the bounds for a question, `resolved` is false — read `mandate` to tell "they set bounds and this is outside them" from "nobody has configured this listing", because they need different things from you and only one of them is worth escalating.'
security: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- kind
- slug
- intent
properties:
kind:
type: string
enum:
- entity
- website
slug:
type: string
description: From /api/kb/search.
intent:
type: string
enum:
- is_open_now
- delivers_to
- lead_time
params:
type: object
description: Per intent. `delivers_to` requires `place`; the others take none.
properties:
place:
type: string
responses:
'200':
description: The answer, or a stated absence of one.
content:
application/json:
schema:
$ref: '#/components/schemas/MandateAnswer'
'404':
description: No such record in the knowledge base.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: Rate limited. `Retry-After` gives the number of seconds to wait. Reads are metered per IP, per declared client name and per registered agent; a declared name never raises the IP ceiling.
headers:
Retry-After:
description: Seconds to wait before retrying.
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: postApiPublicAsk
x-operation-id-source: derived
/api/public/respond:
post:
tags:
- ask
summary: Ask in the buyer’s own words
description: 'Free text in, an answer in the buyer’s language out. Use this when the question does not fit one of `/public/ask`’s three intents — not instead of it.
COSTS US A MODEL CALL, which is why it is rate-limited an order of magnitude harder than everything else here (default 10/minute/IP). Four languages are templated — en, ro, ru, de — and anything else is answered in English; the language we answered in is in the response.
When the registry cannot settle it, the question is handed to a person and you get an escalation reference. Poll it at `/api/public/escalation/{ref}`. Nothing here binds the business.'
security: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- kind
- slug
- question
properties:
kind:
type: string
enum:
- entity
- website
slug:
type: string
question:
type: string
description: The buyer’s words, in any language.
responses:
'200':
description: An answer, a request for detail, or an escalation.
content:
application/json:
schema:
$ref: '#/components/schemas/MandateAnswer'
'404':
description: No such record in the knowledge base.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: Rate limited. `Retry-After` gives the number of seconds to wait. Reads are metered per IP, per declared client name and per registered agent; a declared name never raises the IP ceiling.
headers:
Retry-After:
description: Seconds to wait before retrying.
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: postApiPublicRespond
x-operation-id-source: derived
/api/public/escalation/{ref}:
get:
tags:
- ask
summary: Has a person answered yet?
description: 'Polled rather than pushed. The reference IS the credential — it is single-purpose and opens one question — so no registration is needed: an agent that had to register to read an answer would open a conversation instead, which is the expensive path this whole layer exists to avoid.
A merchant may take hours. Poll accordingly; the limit is loose because this costs a row read, and it exists because a tight loop on a four-hour question helps nobody.'
security: []
parameters:
- name: ref
in: path
required: true
schema:
type: string
description: From the escalation in a /public/respond answer.
responses:
'200':
description: The question, its state, and the answer once there is one.
content:
application/json:
schema:
type: object
'404':
description: No such record in the knowledge base.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: Rate limited. `Retry-After` gives the number of seconds to wait. Reads are metered per IP, per declared client name and per registered agent; a declared name never raises the IP ceiling.
headers:
Retry-After:
description: Seconds to wait before retrying.
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: getApiPublicEscalationByRef
x-operation-id-source: derived
/api/public/tools:
get:
tags:
- ask
summary: Every agent tool, with its arguments
description: The same tool table MCP serves from `tools/list`, for callers who do not speak JSON-RPC. Includes `get_rate_card`, `request_quote` and `check_availability`, which previously had no REST route — so a REST-only integrator could search a business and could not price anything.
security: []
responses:
'200':
description: The tool table.
content:
application/json:
schema:
type: object
'429':
description: Rate limited. `Retry-After` gives the number of seconds to wait. Reads are metered per IP, per declared client name and per registered agent; a declared name never raises the IP ceiling.
headers:
Retry-After:
description: Seconds to wait before retrying.
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: getApiPublicTools
x-operation-id-source: derived
/api/public/tools/{name}:
post:
tags:
- ask
summary: Call one agent tool
description: 'A thin binding onto the same function MCP and A2A call, so a refusal here is the refusal you would get there, word for word. The request body IS the tool arguments.
A bearer token is optional and does the same thing it does on `/api/mcp`: without one you have the anonymous tier, which reads and asks; messaging and binding tools need a registered agent and will tell you so. Registration is self-service.
The response is the tool envelope, not a bare value — the same `{ tool, data, meta }` shape every other agent surface returns, including on failure, where `error.fix` says what to do instead.'
parameters:
- name: name
in: path
required: true
schema:
type: string
description: A tool name from GET /api/public/tools.
requestBody:
required: false
content:
application/json:
schema:
type: object
additionalProperties: true
responses:
'200':
description: The tool envelope.
content:
application/json:
schema:
type: object
'400':
description: The arguments did not typecheck. `error.fix` names the field.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: A credential was sent and did not authenticate.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: This credential may not use that tool.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No such tool, or no such listing.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: Rate limited. `Retry-After` gives the number of seconds to wait. Reads are metered per IP, per declared client name and per registered agent; a declared name never raises the IP ceiling.
headers:
Retry-After:
description: Seconds to wait before retrying.
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: postApiPublicToolsByName
x-operation-id-source: derived
/api/public/liveness/challenge:
get:
tags:
- ask
summary: Proof of life for a listing
description: Read-only. Never raises a question with the business — see the controller.
security: []
responses:
'200':
description: A challenge.
content:
application/json:
schema:
type: object
'429':
description: Rate limited. `Retry-After` gives the number of seconds to wait. Reads are metered per IP, per declared client name and per registered agent; a declared name never raises the IP ceiling.
headers:
Retry-After:
description: Seconds to wait before retrying.
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: getApiPublicLivenessChallenge
x-operation-id-source: derived
components:
schemas:
MandateAnswer:
type: object
description: 'What the registry could settle. `resolved: false` is a normal answer and not an error — it means we do not hold the fact, which is a different statement from the business not having it.'
properties:
resolved:
type: boolean
description: Answered from stored facts.
answer:
type:
- object
- 'null'
description: Present when resolved. Carries the value and the `basis` it was decided on.
reply:
type: string
description: The same answer as a sentence, in the language below.
language:
type: string
description: What we ANSWERED in — not necessarily what was asked in.
mandate:
type: string
enum:
- configured
- not-configured
description: Distinguishes "they set bounds and this is outside them" from "nobody has ever configured this listing". Same non-answer, different fix, and only one is worth escalating.
escalation:
type:
- object
- 'null'
description: Present when a person was asked. Carries the `ref` to poll.
properties:
ref:
type: string
repeat:
type: boolean
subject:
type: object
properties:
kind:
type: string
slug:
type: string
name:
type: string
Error:
type: object
description: A refusal an agent can act on. Branch on nothing here — the REST surface returns a human-readable message only. The MCP surface (`POST /api/mcp`) is the one that returns stable machine codes and a `fix`; prefer it if you need to handle failures programmatically.
properties:
error:
type: string
securitySchemes:
agentBearer:
type: oauth2
description: Register once, then exchange credentials for a token. Needed only for writes.
flows:
clientCredentials:
tokenUrl: https://api.tunnelpowered.com/api/v1/agents/token
scopes: {}
externalDocs:
url: https://tunnelpowered.com/docs
description: The same surface, written for a person.