codai · Schema
Search request
Body of `POST /v1/tools/search`.
CompanyArtificial IntelligenceCode GenerationDeveloper ToolsLLM GatewayOpenAI-CompatibleModel RoutingRomania
Properties
| Name | Type | Description |
|---|---|---|
| query | string | Search phrase (trimmed). |
| max_results | integer | Maximum number of results. |
| freshness | string | Only pages published within the window; pages without a known publish date are dropped. |
| include_domains | array | Only return pages from these hosts (subdomains included, optional path prefix such as `github.com/vercel`). Scheme and `www.` are stripped. |
| exclude_domains | array | Never return pages from these hosts (same matching as `include_domains`). |
| published_after | string | Only pages published on or after this date (`YYYY-MM-DD` or `YYYY-MM`); undated pages are dropped. |
| published_before | string | Only pages published before this date (`YYYY-MM-DD` or `YYYY-MM`); undated pages are dropped. |
| content_chars | integer | Also return a verified excerpt of up to this many characters per result in `content` (omitted or 0 = snippet only). |
| country | string | Two-letter market code. Omit it to let the gateway infer it from the query (`ro` for Romanian queries, `us` otherwise). |
| lang | string | Language code, optionally with region (`en-US`). Omit it to infer it from the query; a `lang:xx` operator in the query wins. |
| mode | string | `codai` (default): verified-only native search (`ToolSearchResponse`). `google`: Grounding with Google Search on Vertex AI, returned as a separate `ToolSearchGoogleResponse` and never mixed with codai |
| depth | string | codai-search depth. `fast` (default): ~4.5 s budget. `deep`: more sources and a ~12 s budget, for research, literature and comparison queries; with `fallback: auto` the whole request may take ~20 s. |
| fallback | string | With `mode: codai`: `auto` (default) attaches a separate `google` block (Grounding with Google Search) when codai's own results are weak (none, fewer than 3, or low coverage for code/docs/general/acad |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/codai-ro/json-schema/codai-ro-tool-search-request-schema.json",
"title": "Search request",
"description": "Body of `POST /v1/tools/search`.",
"x-generated": "2026-11-04",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/codai-ro-gateway-openapi.yml#/components/schemas/ToolSearchRequest",
"type": "object",
"required": [
"query"
],
"properties": {
"query": {
"type": "string",
"minLength": 1,
"maxLength": 400,
"description": "Search phrase (trimmed)."
},
"max_results": {
"type": "integer",
"minimum": 1,
"maximum": 10,
"default": 5,
"description": "Maximum number of results."
},
"freshness": {
"type": "string",
"enum": [
"day",
"week",
"month",
"year"
],
"description": "Only pages published within the window; pages without a known publish date are dropped."
},
"include_domains": {
"type": "array",
"maxItems": 10,
"items": {
"type": "string",
"maxLength": 253
},
"description": "Only return pages from these hosts (subdomains included, optional path prefix such as `github.com/vercel`). Scheme and `www.` are stripped."
},
"exclude_domains": {
"type": "array",
"maxItems": 10,
"items": {
"type": "string",
"maxLength": 253
},
"description": "Never return pages from these hosts (same matching as `include_domains`)."
},
"published_after": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}(-\\d{2})?$",
"description": "Only pages published on or after this date (`YYYY-MM-DD` or `YYYY-MM`); undated pages are dropped."
},
"published_before": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}(-\\d{2})?$",
"description": "Only pages published before this date (`YYYY-MM-DD` or `YYYY-MM`); undated pages are dropped."
},
"content_chars": {
"type": "integer",
"minimum": 0,
"maximum": 2000,
"description": "Also return a verified excerpt of up to this many characters per result in `content` (omitted or 0 = snippet only)."
},
"country": {
"type": "string",
"pattern": "^[a-zA-Z]{2}$",
"description": "Two-letter market code. Omit it to let the gateway infer it from the query (`ro` for Romanian queries, `us` otherwise)."
},
"lang": {
"type": "string",
"pattern": "^[a-zA-Z]{2}(-[a-zA-Z]{2})?$",
"description": "Language code, optionally with region (`en-US`). Omit it to infer it from the query; a `lang:xx` operator in the query wins."
},
"mode": {
"type": "string",
"enum": [
"codai",
"google",
"fast",
"deep"
],
"default": "codai",
"description": "`codai` (default): verified-only native search (`ToolSearchResponse`). `google`: Grounding with Google\nSearch on Vertex AI, returned as a separate `ToolSearchGoogleResponse` and never mixed with codai results;\n404 when the gateway has not enabled it, 503 `search_unavailable` when Google returns no grounding.\n`fast` / `deep` mean `codai` with that `depth` (alias kept for clients that send codai-search's own field).\n"
},
"depth": {
"type": "string",
"enum": [
"fast",
"deep"
],
"default": "fast",
"description": "codai-search depth. `fast` (default): ~4.5 s budget. `deep`: more sources and a ~12 s budget, for\nresearch, literature and comparison queries; with `fallback: auto` the whole request may take ~20 s.\n"
},
"fallback": {
"type": "string",
"enum": [
"auto",
"off"
],
"default": "auto",
"description": "With `mode: codai`: `auto` (default) attaches a separate `google` block (Grounding with Google Search)\nwhen codai's own results are weak (none, fewer than 3, or low coverage for code/docs/general/academic/education)\nor the search service is down; never for currency/weather/fuel/inflation/local_poi. `off` disables it.\n"
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.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.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/codai-ro-tool-search-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API 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.