OS
Knowledge Bases

OpenAPI Specs

Answer API-reference questions directly from your spec URL

What is OpenAPI Specs?

OpenAPI Specifications (formerly Swagger) are machine-readable descriptions of REST APIs in JSON or YAML format. They describe every endpoint, request body, response schema, authentication method, and error code in a single document. BeforeQuery parses and indexes your spec so that natural-language questions like 'how do I paginate the /orders endpoint?' return precise, cited answers drawn from your actual spec.

Integration

How BeforeQuery works with OpenAPI Specs

Everything you can do once the integration is connected.

Spec URL or file upload

Add your OpenAPI spec as a source URL (JSON or YAML, publicly accessible) or upload a file directly. BeforeQuery fetches and re-indexes automatically when the spec changes.

Operation-level chunking

Each API operation (path + method) is chunked individually so retrieval is precise. Asking about POST /orders returns only the orders creation operation — not unrelated endpoints.

Parameter and schema awareness

Request parameters, body schemas, response shapes, and enum values are all indexed. Users can ask 'what fields are required for the checkout body?' and get an exact answer from the spec.

Multi-spec support

Add multiple OpenAPI specs to a single project — for example your public API and an internal admin API. BeforeQuery retrieves across all specs and cites the source spec and operation in every answer.

Setup

How to set it up

1

In the BeforeQuery dashboard, create or open a project and add a source of type openapi. Enter your spec URL (https://api.example.com/openapi.json) or upload a .json/.yaml file.

2

BeforeQuery parses and chunks the spec by operation. The first index completes in under a minute for most specs.

3

Configure a scheduled sync or webhook trigger so BeforeQuery re-indexes whenever your spec updates. Embed the chat widget or link the portal for your developer audience.

OpenAPI Specs — Frequently Asked Questions

Common questions about connecting BeforeQuery to OpenAPI Specs.

BeforeQuery supports OpenAPI 3.0, OpenAPI 3.1, and Swagger 2.0 specs in both JSON and YAML format. Both publicly accessible URLs and direct file uploads are accepted.
Yes. Add each spec as a separate source within the same project. BeforeQuery retrieves across all specs and cites the source spec name and operation ID in every answer.
You can configure a scheduled sync (daily or on-demand) or trigger a re-index via webhook whenever your CI/CD pipeline publishes a new spec. Only changed operations are re-embedded, keeping costs low.
Yes. You can configure tag filters or path prefix exclusions in the source settings so only selected API operations are indexed — for example, excluding internal or deprecated endpoints.
Yes. BeforeQuery indexes example values defined in the spec's `example` and `examples` fields and includes them in retrieved chunks. Answers can show example request bodies, response payloads, and code samples when present in the spec.

Ready to connect OpenAPI Specs?

Start free. No credit card required. Connect your first integration in under 5 minutes.