Search Content (AI)
Search sailing articles, guides, and FAQ answers from the knowledge base
/ai/contentSemantic (vector) search across the charter.boats knowledge base. Covers topics like sailing licenses, chartering costs, packing lists, weather, navigation, and destination guides. Returns the most relevant text from both long-form articles and FAQ-style Q&A entries, so AI clients can answer directly.
Authentication
No authentication required. Sending your key anyway is recommended — see identifying yourself; it attributes the call to you and changes nothing else. Shares the /api/ai/* rate limit of 60 requests per 10 minutes (30 for Custom GPT clients).
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Yes | Search query (minimum 2 characters). Examples: "sailing license greece", "what to pack", "best time to charter croatia". |
type | string | No | Content type filter: article, question, or both (default: both). Any other value returns no results -- see Empty results. |
limit | integer | No | Max results per type (default: 5, max: 20) |
Request
Response
The articles key is present only when type is article or both; the questions key only when type is question or both. Each entry returns the single best-matching chunk of text as copy (up to 2000 characters) plus its url.
Response Fields
| Field | Type | Description |
|---|---|---|
articles | array | Matching long-form articles (present when type is article or both) |
articles[].url | string | Link to where the article is read on charter.boats — a destination guide links its destination page, a help article its /help page |
articles[].copy | string | Best-matching passage from the article (up to 2000 chars) |
questions | array | Matching FAQ entries (present when type is question or both) |
questions[].url | string | Link to the full answer on charter.boats |
questions[].copy | string | Best-matching passage from the answer (up to 2000 chars) |
no_results | object | Present only when nothing matched. See Empty results. |
note | string | Present only when nothing matched. One-sentence rendering of no_results. |
Search Behavior
- Uses semantic vector search (embeddings) against indexed content chunks, then returns the best-scoring chunk per published article/answer.
- Results are ranked by relevance; only content published at the time of the request is returned, and the index follows every publish, edit and unpublish within minutes.
- Passages below a minimum relevance are dropped, so a question we have not written about comes back empty, with the zero-results block, rather than as the closest unrelated pages. Above it, results are the closest passages we hold -- check
copybefore quoting it as an answer. - If the search backend is unavailable, the endpoint returns empty
articles/questionsarrays with ano_resultsblock whosewhysays the search could not run -- never an error, and never a response that reads as "nothing published".
Empty results
When nothing matches, the response carries the shared zero-results block -- no_results (searched, why, try_next) and a one-line note -- beside the empty articles/questions arrays. Editorial coverage is much narrower than the boat and location data, so try_next points at those endpoints first:
A question we have not written about comes back empty with no_results, because passages below the minimum relevance are dropped. A type other than article, question or both always returns only no_results and note -- neither articles nor questions is present.
Errors
| Status | Message |
|---|---|
400 | Search query must be at least 2 characters |