Features/API Reference

API Reference

Complete reference for FlowSearch JavaScript API and REST endpoints.

Widget Scripts

Most Webflow installs should use the hosted scripts and data attributes instead of a JavaScript constructor.

Search Bar Script (all pages)

Place this in Webflow Site Settings → Custom Code → Head Code. Thedata-results-page value must match the published Webflow page slug. Webflow reserves/search, so the recommended default is /search-results.

<script
  src="https://www.flowsearch.io/widget.js"
  data-key="YOUR_SEARCH_KEY"
  data-results-page="/search-results"
  data-live="true">
</script>

Results Page Script (search results page only)

Place this only on the Search Results page in Page Settings → Custom Code → Head Code.

<script
  src="https://www.flowsearch.io/results.js"
  data-key="YOUR_SEARCH_KEY"
  data-summary="true">
</script>

Browser Helper

After the Search Bar Script loads, window.FlowSearch exposes a small helper for diagnostics and custom integrations.

HelperDescription
FlowSearch.search(query)Navigate to the configured results page with a query
FlowSearch.fetchResults(query)Fetch results without navigating, useful for diagnostics
FlowSearch.configRead the loaded script configuration
window.FlowSearch.search('webflow design');
window.FlowSearch.fetchResults('pricing').then(console.log);
console.log(window.FlowSearch.config);

REST API

FlowSearch also provides a search endpoint for server-side integrations and diagnostics.

Authentication

Pass your public Search Key as a query parameter or as an X-API-Key header.

X-API-Key: YOUR_SEARCH_KEY

Search Endpoint

GET /api/search

Query parameters:

ParameterTypeDescription
qstringSearch query
keystringSearch Key, optional if using the header
pagenumberPage number, defaults to 1
per_pagenumberResults per page, defaults to 10 and is capped by plan

Example request:

curl -X GET "https://www.flowsearch.io/api/search?q=webflow&per_page=10" \
  -H "X-API-Key: YOUR_SEARCH_KEY"

Example response:

{
  "results": [
    {
      "title": "Getting Started with Webflow",
      "description": "Learn the basics of Webflow...",
      "url": "/blog/getting-started-webflow",
      "highlights": []
    }
  ],
  "meta": {
    "found": 24,
    "page": 1,
    "per_page": 10,
    "performance_tier": "pro",
    "performance_profile": "Performance"
  }
}

Search speed and request limits are plan-based. Free sites use shared free search infrastructure, Basic uses standard paid search, Pro and Business use performance search, and Enterprise can use dedicated search infrastructure. If a plan limit is exceeded, the endpoint returns 429 withSEARCH_RATE_LIMIT_EXCEEDED.

AI Summary Endpoint

POST /api/summarize

The Results Page Script calls this automatically when data-summary="true" and AI summaries are enabled for the website. Initial summaries are available on all plans. Follow-up questions use mode: "followup" and require a paid plan.

Summary responses include conversationEnabled. When it is false, clients should hide follow-up chat. Source types can be page, document, or external. The external source labels General AI knowledge when External Knowledge is enabled. Uploaded document sources are returned only for Business and Enterprise plan sites. Document source chips are document-level, even when several internal chunks from the same document informed the answer.

Streaming responses are sent as server-sent events with meta, delta,done, and error event payloads. Older clients can continue reading incrementaltext payloads during the migration.

{
  "query": "What security certifications do you have?",
  "mode": "initial",
  "stream": true
}

Rate Limits

PlanSearch requests/minuteMax per page
Free3010
Basic6020
Pro12050
Business18050
Enterprise600100

Next Steps