全部範本

開發者工具

Index Public API Documentation

Find one service’s public REST API documentation and index the relevant passages in Qdrant.

在 Open Flow 中使用
Index Public API Documentation 在 Open Flow 中的工作流程截圖Index Public API Documentation 在 Open Flow 中的工作流程截圖

Find one service’s public REST API documentation and index the relevant passages in Qdrant.

Setup

  1. Connect Firecrawl for search and page reads, and connect Gemini in Classify REST API documentation and Embed the approved chunks with Provider API access. Use sites whose public documentation you are authorized to index. The chosen text is sent to Gemini and stored in your Qdrant collection.
  2. Connect Qdrant Cloud in Index the approved documents. Use a collection with an unnamed 768-dimensional cosine vector. Create a new collection or re-embed older documents before mixing vectors from another model. A retrieval workflow must use the same Gemini embedding model, dimensionality and corresponding retrieval query framing. Gemini embedding guide
  3. Run the workflow or call it from a published Open Flow workflow with this input:
{
  "eventType": "research",
  "data": {
    "service": "Example API",
    "url": "https://example.com",
    "collection": "api_documentation"
  }
}

Behavior

Firecrawl searches the hostname supplied in the request. The workflow reads up to ten distinct HTTPS results on that hostname or its subdomains and uses the first 12,000 characters of each readable page. Gemini judges the first 3,500 characters of each page for relevance. Documents that describe REST API operations or schemas are split into chunks of up to 2,000 characters and embedded with Gemini Embedding 2. Each Qdrant point contains its original chunk in content and the service and page URL in metadata. The workflow reads documentation pages only.

The response output is ok after Qdrant confirms the batch. Successful searches with no scoped results return no web results. If none of the selected pages can be read, the response is web scraping error. If none of the readable pages are classified as API documentation, the response is no api docs in web results. A failed request, invalid Gemini output or unconfirmed Qdrant write can fail the run.

A repeat upsert uses the same IDs for unchanged chunks. Edited pages may leave older points behind. Inspect the collection after an uncertain write. The caller may pass data.row_number, as in the source. A Sheet coordinator can use that row number to record the response.

In n8n

For a manual run, edit Set manual research request. A parent workflow can instead call Research request with the same JSON input. Keep one research request per sub-workflow execution.

Set the Qdrant cluster HTTPS origin in Index the approved documents. Use native Header Auth credentials with Authorization: Bearer <key> on both Firecrawl requests, x-goog-api-key on both Gemini requests, and api-key on the Qdrant request. Keep redirects disabled.

Inspiration & credits

Changes to the source

  • Use Firecrawl search and Markdown reads for public documentation. Scope results to the supplied website and keep the original service and page URL with each chunk.
  • Use the current Gemini classification and embedding APIs and a confirmed Qdrant batch upsert. Retain the separate callable research status.

Adapted from the Stage 1 research sub-workflow in API Schema Extractor from enescingoz/awesome-n8n-templates.

Source collection notice: © 2024–2026 Enes Cingoz, CC BY 4.0. This adaptation includes the changes above. See repository licensing.