# Check document coverage

Compare the documents already filed with a category checklist.

Documentation index: https://webcite.co/llms.txt
Canonical page: https://webcite.co/api-docs/gaps
API origin: https://api.webcite.co
Authentication: x-api-key header. Keep keys on your server.

## When to use it

This is an advisory checklist. `present` means a supplied record matched the checklist; it does not establish that the contents are complete or correct. Choose `vc` or `ma` taxonomy and, where appropriate, `early` or `growth` stage.

## Request

POST /api/v1/gaps

1 credit.

### curl

```curl
curl --fail-with-body -X POST 'https://api.webcite.co/api/v1/gaps' \
  -H "x-api-key: $WEBCITE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "category": "financial",
  "docs": [],
  "taxonomy": "vc",
  "stage": "early"
}'
```

### Node.js

```javascript
const response = await fetch("https://api.webcite.co/api/v1/gaps", {
  method: "POST",
  headers: {
    "x-api-key": process.env.WEBCITE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "category": "financial",
  "docs": [],
  "taxonomy": "vc",
  "stage": "early"
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.json());
```

### python

```python
import os
import json
import requests

payload = json.loads("{\n  \"category\": \"financial\",\n  \"docs\": [],\n  \"taxonomy\": \"vc\",\n  \"stage\": \"early\"\n}")
response = requests.post(
    "https://api.webcite.co/api/v1/gaps",
    headers={"x-api-key": os.environ["WEBCITE_API_KEY"]},
    json=payload,
    timeout=(10, 300),
)
response.raise_for_status()
print(response.json())
```

## Response

Returns items with name and present. A match can come from a filename, category, or covered document type.

## Errors

For 400, check the request fields and source identifiers. For 401, check your API key. For 429, wait for the retry interval. See the errors guide before retrying a billable request.

## OpenAPI operation

```json
{
  "path": "/api/v1/gaps",
  "method": "POST",
  "operation": {
    "description": "Given the documents already filed in a category, returns each expected document type flagged present/absent. An item is present when any document matches it by filename, category, or covered type. Advisory — nothing blocks the workflow. Pure and deterministic; no I/O.\n\nPass an optional `taxonomy` preset and `stage` (`early`/`growth`) to tailor the list.\n\n**Cost: 1 credit.** Pure and deterministic (no LLM calls or I/O).",
    "operationId": "ApiV1Controller_gaps",
    "parameters": [],
    "requestBody": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/GapsRequestDto"
          }
        }
      },
      "required": true
    },
    "responses": {
      "200": {
        "description": "{ items: { name, present }[] }"
      },
      "401": {
        "description": "Unauthorized - API key required"
      },
      "429": {
        "description": "Rate limit exceeded"
      }
    },
    "security": [
      {
        "x-api-key": []
      },
      {
        "bearer": []
      }
    ],
    "summary": "Compute the \"usually also here\" checklist for a category",
    "tags": [
      "Public API"
    ]
  },
  "schemas": {
    "GapsRequestDto": {
      "properties": {
        "category": {
          "description": "The category whose expected-documents checklist to compute.",
          "type": "string"
        },
        "docs": {
          "description": "The documents currently filed in that category.",
          "items": {
            "$ref": "#/components/schemas/GapDocDto"
          },
          "type": "array"
        },
        "stage": {
          "description": "Stage to tailor the checklist to.",
          "enum": [
            "early",
            "growth"
          ],
          "type": "string"
        },
        "taxonomy": {
          "description": "Taxonomy preset. Default \"vc\".",
          "enum": [
            "vc",
            "ma"
          ],
          "type": "string"
        }
      },
      "required": [
        "category",
        "docs"
      ],
      "type": "object"
    },
    "GapDocDto": {
      "properties": {
        "category": {
          "type": "string"
        },
        "covers": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "filename": {
          "type": "string"
        },
        "label": {
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}
```
