Reference
Search API Quickstart
Start with Search. It is the core API surface and the first key type available in self-serve accounts. Add Contents, Context, Answer, and AI Visibility beta only when the product workflow needs them.
Overview
Kiodo starts with a compact Search API for ranked web sources. From there you can fetch clean URL contents, combine search with extraction through Context, synthesize answers with citations, and, on eligible beta/pro accounts, check brand visibility through AI Visibility operations.
Search
Return ranked web sources quickly and predictably.
Contents
Extract clean text or optional markdown from one or more URLs.
Context
Combine ranked sources with extracted content, highlights, and quality signals.
Answer
Generate a grounded response with citations from live search context.
AI Visibility beta
Measure brand visibility in aggregated AI answers on Pro, Scale, Enterprise, or selected beta access.
Metered billing
Every successful request charges credits. Internal provider, cost, and margin fields are never returned to client output.
Authentication
Create an API key in the dashboard and send it as a bearer token. Keep the key in an environment variable on the server side.
KIODO_API_KEY="kiodo_live_..."Authorization: Bearer $KIODO_API_KEY
Content-Type: application/jsonQuickstart
Start with `/api/v1/search` for ranked sources. A Search API key is the default key type. Use `/api/v1/context` only when you need the top sources extracted into LLM-ready text.
import { Kiodo } from "kiodo";
const kiodo = new Kiodo({
apiKey: process.env.KIODO_API_KEY
});
const results = await kiodo.search({
query: "latest funding news for AI sales tools",
type: "auto",
numResults: 10,
category: "news"
});
console.log(results.results);
console.log(results.usage);curl https://api.kiodo.dev/v1/search \
-H "Authorization: Bearer $KIODO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "latest funding news for AI sales tools",
"type": "auto",
"numResults": 10,
"category": "news"
}'{
"object": "search.results",
"results": [
{
"title": "Result title",
"url": "https://example.com/article",
"domain": "example.com",
"text": "Result snippet"
}
],
"output": {
"query": "latest funding news for AI sales tools",
"mode": "auto",
"filters": { "category": "news" },
"topDomains": ["example.com"]
},
"usage": {
"credits": 1,
"balanceCredits": 1665,
"cacheHit": false
}
}Copy-paste examples
These examples match routes that exist today. Public API calls use bearer API keys. Dashboard billing and key creation calls require a logged-in browser session.
export KIODO_API_KEY="kiodo_live_or_mk_..."
curl https://api.kiodo.dev/v1/search \
-H "Authorization: Bearer $KIODO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "best vector databases for production RAG",
"type": "auto",
"numResults": 5
}'curl https://api.kiodo.dev/v1/usage \
-H "Authorization: Bearer $KIODO_API_KEY"const usage = await kiodo.usage();
console.log(usage.balanceCredits);
console.log(usage.endpointUsage);// Run from an authenticated dashboard session.
const response = await fetch("/api/dashboard/api-keys", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
name: "Production Search key",
scope: "search:read"
})
});
const { token, key } = await response.json();// Run from an authenticated dashboard session.
const response = await fetch("/api/dashboard/credits/checkout", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ credits: 10000 })
});
const { url } = await response.json();
window.location.href = url;AI Visibility API
Use `/api/v1/ai-visibility/check` to compare a brand against competitors in aggregated AI answer data. This is a beta/pro feature: it requires `AI_VISIBILITY_ENABLED=true`, eligible plan or selected beta access, and an API key with `ai_visibility:read`. This MVP is aggregated visibility, not live prompt runs, and Kiodo keeps the underlying provider and raw supplier response internal.
const visibility = await kiodo.aiVisibility.check({
brand: "Acme",
category: "payroll API",
market: "us",
competitors: ["Gusto", "Check"]
});
console.log(visibility.visibilityScore);
console.log(visibility.shareOfAnswer);curl https://api.kiodo.dev/v1/ai-visibility/check \
-H "Authorization: Bearer $KIODO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"brand": "Acme",
"domain": "acme.com",
"category": "payroll API",
"competitors": ["Gusto", "Check", "Finch"],
"market": "us",
"language": "en",
"limit": 25
}'{
"object": "ai_visibility.check",
"schemaVersion": "2026-05-ai-visibility-check-v1",
"visibilityScore": 23.4,
"shareOfAnswer": {
"Acme": 0.18,
"Gusto": 0.71,
"Check": 0.42
},
"mentionedIn": {
"total": 12,
"byEngine": {
"chatgpt": 12
}
},
"topCitedSources": [],
"opportunities": [],
"confidence": 0.82,
"dataFreshness": {
"type": "aggregated",
"cached": false,
"asOf": "2026-05-20T00:00:00.000Z"
},
"usage": {
"operationKey": "ai_visibility_check_small",
"credits": 75,
"balanceCredits": 1234,
"cacheHit": false
}
}| Rule | MVP behavior |
|---|---|
| Access | `AI_VISIBILITY_ENABLED=true`, a Pro/Scale/Enterprise or beta account, and an API key with `ai_visibility:read` or admin scope are required. Search-only keys cannot call this endpoint. |
| Rate limits | Default beta limits are 25 checks/day on Pro and 250 checks/day on Scale/Enterprise. |
| Local testing | `AI_VISIBILITY_MOCK=true` returns deterministic dev data without calling the provider. |
| Market and language | Only us/en is accepted in the MVP. |
| Competitors | Up to 5 competitors. |
| Limit | 1 to 100. Default is 25. |
| Small check | 75 credits when competitors <= 3 and limit <= 25. |
| Standard check | 150 credits for larger accepted checks. |
| Cache | 24 hour TTL. Cache hits charge the same credits and do not call the provider. |
Search parameters
The search endpoint returns ranked sources only. Use Context for search + extraction so pricing, latency, and expectations stay explicit.
| Parameter | Type | Use |
|---|---|---|
| query | string | Required natural-language query. |
| type | fast | auto | deep | Controls latency and provider depth. |
| numResults | number | 1 to 100 results. |
| category | string | all, news, research paper, company, github, tweet, or pdf. |
| includeDomains | string[] | string | Limit results to trusted domains. |
| excludeDomains | string[] | string | Remove unwanted domains. |
| startPublishedDate | YYYY-MM-DD | Filter fresher published content. |
| endPublishedDate | YYYY-MM-DD | End of published date window. |
| userLocation | string | Boost results for a region or country. |
Modes and freshness
`/api/v1/context` uses `mode` to choose the cost and quality profile. The client chooses the mode; Kiodo chooses suppliers internally.
| Mode | Behavior | Best for |
|---|---|---|
| cheap | Cache-first, no external extraction fallback. | Lowest cost workflows and repeated requests. |
| balanced | Cache, direct extraction, then intelligent fallback when quality is low. | Default LLM/RAG context. |
| quality | Same public contract as balanced, reserved for higher-cost rendering fallbacks. | Future high-quality extraction mode. |
`livecrawl` controls cache behavior for `/contents` and `/context` extraction.
| Value | Behavior |
|---|---|
| never | Read cache only. If no cached content exists, returns cache_miss without fetching. |
| fallback | Read cache, then direct extraction, then fallback if extraction quality is low. |
| always | Skip cache reads, extract fresh content, and update cache afterwards. |
Limits and billing
These limits keep latency and cost predictable for the MVP API surface.
| Endpoint | Default | Maximum |
|---|---|---|
| /api/v1/search | 10 results | 50 results |
| /api/v1/contents | 1 URL | 25 URLs, 100k characters per URL |
| /api/v1/context | 5 extracted results | 10 extracted results, 25 search depth, 30k characters per result |
| /api/v1/answer | 5 citations | 10 citations |
| /api/v1/ai-visibility/check | us/en, 25 limit | 5 competitors, 100 limit |
Rate limits are enforced by API key. The default self-serve limit is 60 requests per minute. If a request exceeds the active limit, the API returns HTTP 429 with a retryable error.
| Product | Operation key | Current MVP behavior |
|---|---|---|
| Search | search_cache / search_live_google_organic_10 / search_live_google_organic_50 / search_live_google_organic_100 | Cache/admin requests charge 1 credit. Live provider search charges by depth: 2 credits up to 10 results, 4 up to 50, and 9 up to 100. |
| Contents | contents_single / contents_batch | 2 credits for one URL, or 2 credits per URL in a batch. |
| Context | context_balanced / context_quality | Search credits plus extracted-source credits. Quality mode applies a higher per-source multiplier. |
| Answer | answer_retrieval / answer_synthesis | Search credits plus answer operation credits. Synthesis adds LLM cost coverage. |
| AI Visibility Check | ai_visibility_check_small / ai_visibility_check_standard | 75 credits for small checks, 150 credits for standard checks. Beta/pro only. |
Contents endpoint
Use `/api/v1/contents` when you already have URLs and need the page body or highlights for an AI agent.
curl https://api.kiodo.dev/v1/contents \
-H "Authorization: Bearer $KIODO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"urls": ["https://example.com"],
"maxCharacters": 12000,
"mainText": true,
"markdown": true,
"livecrawl": { "type": "fallback" },
"highlights": { "query": "pricing, product, traction" }
}'{
"schemaVersion": "2026-05-contents-v1",
"results": [
{
"success": true,
"status": "ok",
"title": "Example",
"text": "...",
"markdown": "...",
"quality": {
"score": 82,
"label": "good",
"warnings": []
}
}
]
}Context endpoint
Use `/api/v1/context` for the premium Web Context workflow: ranked sources plus extracted content, highlights, citations-ready snippets, and quality signals.
curl https://api.kiodo.dev/v1/context \
-H "Authorization: Bearer $KIODO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "best alternatives to Salesforce for small businesses",
"mode": "balanced",
"numResults": 5,
"contents": {
"highlights": true,
"markdown": false,
"maxCharacters": 6000
}
}'{
"schemaVersion": "2026-05-context-v1",
"success": true,
"status": "ok",
"results": [
{
"title": "...",
"url": "https://example.com",
"snippet": "...",
"content": {
"success": true,
"status": "ok",
"text": "...",
"highlights": ["..."],
"quality": {
"score": 84,
"label": "good",
"warnings": []
}
}
}
]
}Answer endpoint
Use `/api/v1/answer` for a direct answer with citations. The API searches first, then synthesizes a structured answer.
curl https://api.kiodo.dev/v1/answer \
-H "Authorization: Bearer $KIODO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "Which AI SDR tools raised funding in the last 90 days?",
"type": "deep",
"numResults": 8,
"includeText": true,
"systemPrompt": "Return concise market intelligence for a research team."
}'Private beta: Websets and monitors
Websets are still configuration-oriented private beta endpoints. Monitors now support scheduled search runs, manual runs, run history, saved result snapshots, and asynchronous webhook delivery.
Use Search, Contents, Context, or Answer for general production search experiences. Use Monitors when the product needs recurring result tracking for a saved query.
Usage and logs
`/api/v1/usage` returns customer-safe usage analytics. Provider names, provider costs, and margins are intentionally omitted from public responses.
{
"object": "usage.summary",
"balanceCredits": 1665,
"usedCredits": 42,
"calls": 42,
"metrics": {
"cacheHitRate": 38,
"contentCacheHitRate": 52,
"contextPartialRate": 8,
"contextFailureRate": 1
},
"endpointUsage": [],
"quality": [],
"recentRequests": []
}The dashboard also exposes Request Logs for customers and an internal admin API Usage page for provider cost, margin, and raw output metadata.
Best practices
Keep queries explicit
Include the entity, market, time range, and output intent in the query.
Use filters before post-processing
Domain, category, date, and location filters reduce noisy downstream output.
Request text only when needed
Full contents improve answer quality but cost more tokens and time.
Cache repeated workflows
Avoid re-running identical market scans when cached output is good enough.