OpenAPI Ingestion
Ground can index OpenAPI 3.x specifications, providing structured, version-tracked API documentation with strong provenance.Why Use OpenAPI Sources?
- Structured data: Operations, parameters, and schemas are parsed and preserved
- Version tracking: API version from
info.versionis captured automatically - Conflict detection: Different definitions of the same endpoint are detected
- Better search: Operation metadata enables precise matching
Adding an OpenAPI Source
Via API
Via UI
- Go to Sources → Add Source
- Select Documentation
- Set format to OpenAPI
- Enter the URL to your OpenAPI spec (JSON or YAML)
- Click Create
Supported Formats
- OpenAPI 3.0.x (JSON or YAML)
- OpenAPI 3.1.x (JSON or YAML)
What Gets Indexed
For each operation in the spec:| Extracted Data | Usage |
|---|---|
| Method + Path | Unique identifier, conflict detection |
| Operation ID | Symbol in citations |
| Summary | Searchable content |
| Description | Searchable content |
| Parameters | Searchable, schema hash |
| Request Body | Searchable, schema hash |
| Responses | Searchable, schema hash |
Example Chunk
ForPOST /v1/payment_intents:
Version Tracking
Ground extracts the API version frominfo.version:
Incremental Updates
Ground uses:- ETag/Last-Modified: Conditional requests to skip unchanged specs
- Content hash: Detect changes when headers aren’t available
- Schema hash: Track per-operation changes for conflict detection
Conflict Detection
When the same endpoint exists in multiple OpenAPI sources with different schemas, Ground detects the conflict:Best Practices
Use official OpenAPI specs
Use official OpenAPI specs
Prefer the canonical OpenAPI spec from your API provider rather than generated or third-party specs.
Set explicit version labels
Set explicit version labels
If your spec doesn’t have a good
info.version, set doc_version_label when creating the source.Index multiple API versions
Index multiple API versions
Create separate sources for different API versions (v1, v2) to search across all versions with conflict detection.
Sync after API updates
Sync after API updates
Trigger a sync whenever your API spec is updated to keep Ground in sync.
Troubleshooting
Spec not parsing
Spec not parsing
- Ensure the URL returns valid JSON or YAML
- Check for CORS issues (spec must be publicly accessible)
- Verify the spec is OpenAPI 3.x format
Missing operations
Missing operations
- Check that operations have the expected HTTP methods
- Verify paths are properly defined in the spec
Version not detected
Version not detected
- Add or fix
info.versionin your OpenAPI spec - Or set
doc_version_labelexplicitly on the source