Charter Boats
Charter Boats API
AI Integrations

Search Content (AI)

Search sailing articles, guides, and FAQ answers from the knowledge base

GET/ai/content

Semantic (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

ParameterTypeRequiredDescription
qstringYesSearch query (minimum 2 characters). Examples: "sailing license greece", "what to pack", "best time to charter croatia".
typestringNoContent type filter: article, question, or both (default: both). Any other value returns no results -- see Empty results.
limitintegerNoMax results per type (default: 5, max: 20)

Request

# Search for sailing license information
curl "https://charter.boats/api/ai/content?q=sailing+license+greece"
 
# Only FAQ answers
curl "https://charter.boats/api/ai/content?q=security+deposit&type=question"

Response

{
  "articles": [
    {
      "url": "https://charter.boats/sailing-lefkas-southern-ionian-complete-guide",
      "copy": "Complete Guide to Sailing Lefkas and the Southern Ionian Islands\n\nEverything you need to know about chartering a yacht from Lefkas Marina and exploring the stunning Southern Ionian Islands of Greece..."
    }
  ],
  "questions": [
    {
      "url": "https://charter.boats/answers/what-is-the-transit-log-fee-on-a-croatia-yacht-charter-and-what-does-it-cover",
      "copy": "What is the transit log fee on a Croatia yacht charter and what does it cover?\n\n..."
    }
  ]
}

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

FieldTypeDescription
articlesarrayMatching long-form articles (present when type is article or both)
articles[].urlstringLink to where the article is read on charter.boats — a destination guide links its destination page, a help article its /help page
articles[].copystringBest-matching passage from the article (up to 2000 chars)
questionsarrayMatching FAQ entries (present when type is question or both)
questions[].urlstringLink to the full answer on charter.boats
questions[].copystringBest-matching passage from the answer (up to 2000 chars)
no_resultsobjectPresent only when nothing matched. See Empty results.
notestringPresent 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 copy before quoting it as an answer.
  • If the search backend is unavailable, the endpoint returns empty articles/questions arrays with a no_results block whose why says 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:

{
  "articles": [],
  "questions": [],
  "no_results": {
    "searched": "published articles and answers matching \"<your query>\"",
    "why": "We have not published anything on that yet. Editorial coverage is much narrower than our boat and location data.",
    "try_next": [
      "answer from the boat, location or POI tools instead — they cover far more ground",
      "search a broader term"
    ]
  },
  "note": "Nothing matched published articles and answers matching \"<your query>\". …"
}

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

StatusMessage
400Search query must be at least 2 characters

On this page