> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/developers/gitbook-api/api-reference/docs-sites/site-context/get-a-summary-of-documentation-issues-found-on-a-site.md).

# Get a summary of documentation issues found on a site

Returns aggregate statistics about the documentation issues GitBook identified on a site. Accepts the same filters as `listSiteFindings`. Use this to answer "how healthy are my docs" before drilling into individual findings.

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"site-context","description":"Manage the contextual records and topics used by your site to power AI experiences and insights.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"ContextRecord,ContextConnection,SiteTopic,SiteFinding,SiteFindingPage\" grouped=\"false\" %}\n    The Site Context objects\n{% endopenapi-schemas %}\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]},{"oauth":["site:read"]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"},"oauth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://oauth.gitbook.com/authorize","tokenUrl":"https://oauth.gitbook.com/token","scopes":{"user:read":"Read your GitBook user profile.","organization:read":"Read the organizations you belong to, their settings and metadata, and their AI agent conversations.","organization:write":"Create organizations, and update organization settings and AI agent conversations.","organization:members:read":"Read organization members, teams, invites and link invites.","organization:members:write":"Manage organization members, teams, invites and link invites.","organization:ask":"Ask AI questions across an organization's content.","organization:search":"Search across an organization's content.","space:read":"Read spaces and their content, including pages, change requests and their reviews, comments, files and revision history.","space:write":"Create, update and delete spaces and their content, including change requests (create, edit, review), comments, and content imports and exports. Merging a change request also requires change-request:merge.","space:permissions:read":"Read the users and teams who have access to spaces and collections.","space:permissions:write":"Manage who has access to spaces and collections, including inviting users and teams.","change-request:merge":"Merge change requests, publishing their changes to the space. Creating, editing and reviewing change requests only requires space:write.","site:read":"Read sites and their settings, including navigation structure, linked spaces, customization, redirects, topics, AI configuration and documentation issues.","site:write":"Create, update and delete sites and their settings, including navigation structure (sections, linked spaces, external links), customization, redirects, topics and AI configuration.","site:publish":"Publish and unpublish sites, controlling their public exposure.","site:permissions:read":"Read the users and teams who have access to sites.","site:permissions:write":"Manage who has access to sites, including inviting users and teams.","site:auth:read":"Read how visitors authenticate on a site and its security configuration, including private share links.","site:auth:write":"Manage how visitors authenticate on a site and its security configuration, including private share links.","site:insights:read":"Read site analytics and insights, including the questions visitors asked Ask AI and the answers they received.","site:ask":"Ask AI questions across a site's content.","site:search":"Search across a site's content.","integration:read":"Read integrations, their status and where they are installed.","integration:installations:read":"Read integration installations and their configuration, which can include credentials for third-party services.","integration:installations:write":"Install and configure integrations on an organization, its spaces and its sites.","integration:publish":"Publish integrations, which can request their own permissions on your content, and route their events to a development tunnel.","integration:delete":"Unpublish integrations, permanently deleting them and every installation of them.","openapi:read":"Read OpenAPI specifications.","openapi:write":"Create, update and delete OpenAPI specifications."}}}}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"$ref":"#/components/schemas/EntityId"}},"siteId":{"name":"siteId","in":"path","required":true,"description":"The unique id of the site","schema":{"type":"string"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"SiteFindingStatus":{"type":"string","description":"Status of a site finding.\n  - `candidate` is a finding that has been raised but not yet confirmed. Typically these are not shown to users.\n  - `open` is a finding that has been surfaced to users and is still under investigation.\n  - `done` is a finding that has been resolved and is no longer under investigation.\n  - `canceled` is a finding that has been canceled and is no longer under investigation.\n","enum":["candidate","open","done","canceled"]},"SiteFindingType":{"type":"string","description":"Classification of a site finding:\n  - Outdated content: The content was correct but is no longer up to date with external context and may be misleading or incorrect.\n  - Incorrect content: The content is factually wrong or misleading, leading users astray regardless of whether it was ever correct.\n  - Content gap: The content is missing important information that should be present to answer user questions effectively.\n  - Broken link: A URL on the site returns a 404, and can be resolved by creating a redirect or a new page.\n  - Outbound link error: An external URL used by the site's content fails to resolve, and can be fixed by replacing or removing the link.\n  - Other: Any other type of finding not covered by the above categories.","enum":["content-outdated","content-incorrect","content-gap","broken-link","outbound-link-error","other"]},"SiteFindingSeverity":{"type":"string","description":"Estimated end-user severity of a site finding.","enum":["low","medium","high"]},"SiteFindingAutoResolution":{"type":"string","description":"What GitBook did on its own to resolve a finding.\n  - `drafted` drafted a fix that waits for approval.\n  - `applied` has its fix live, applied on its own or approved from a draft, resolving the finding.\n  - `undone` had its fix undone or rejected, so GitBook won't try again.\n","enum":["drafted","applied","undone"]},"SiteTriageFilterQuestions":{"type":"string","description":"Findings source filter matching evidence coming from site questions.\n","enum":["questions"]},"SiteTriageFilterConnections":{"type":"string","description":"Findings source filter matching evidence coming from a given connection,\nencoded as `connection:<connectionId>`.\n","pattern":"^connection:.+$"},"SiteFindingStats":{"type":"object","description":"Aggregated stats for the findings identified on a site.","properties":{"total":{"type":"number","description":"Total count of findings included in the aggregation."},"statuses":{"$ref":"#/components/schemas/SiteFindingStatsStatuses"},"severities":{"$ref":"#/components/schemas/SiteFindingStatsSeverities"},"connectors":{"$ref":"#/components/schemas/SiteFindingStatsConnectors"},"brokenLinks":{"$ref":"#/components/schemas/SiteFindingStatsBrokenLinks"},"questions":{"type":"number","description":"Count of findings with at least one piece of evidence coming from a site question."},"mergedChangeRequests":{"type":"number","description":"Count of change requests created to fix a finding that have been merged."}},"required":["total","statuses","severities","connectors","brokenLinks","questions","mergedChangeRequests"]},"SiteFindingStatsStatuses":{"type":"object","description":"Count of findings by status. Candidate findings are never counted.","properties":{"open":{"type":"number","description":"Count of findings surfaced to users and still under investigation."},"done":{"type":"number","description":"Count of findings that have been resolved."},"canceled":{"type":"number","description":"Count of findings that have been canceled."}},"required":["open","done","canceled"]},"SiteFindingStatsSeverities":{"type":"object","description":"Count of findings by estimated end-user severity.","properties":{"low":{"type":"number","description":"Count of findings with a low estimated severity."},"medium":{"type":"number","description":"Count of findings with a medium estimated severity."},"high":{"type":"number","description":"Count of findings with a high estimated severity."}},"required":["low","medium","high"]},"SiteFindingStatsConnectors":{"type":"object","description":"Count of findings by the connector their evidence came from, keyed by connector (e.g. `builtin:intercom`). A finding is counted once per connector that contributed at least one piece of evidence to it, so the counts can add up to more than the total.","additionalProperties":{"type":"number"}},"SiteFindingStatsBrokenLinks":{"type":"object","description":"Breakdown of the broken-link findings included in the aggregation.","properties":{"redirectSuggested":{"type":"number","description":"Broken URLs the audit found a page to redirect to."},"noMatchingPage":{"type":"number","description":"Broken URLs the audit judged and found no page to redirect to."}},"required":["redirectSuggested","noMatchingPage"]}}},"paths":{"/orgs/{organizationId}/sites/{siteId}/stats/findings":{"get":{"operationId":"getSiteFindingStats","summary":"Get a summary of documentation issues found on a site","description":"Returns aggregate statistics about the documentation issues GitBook identified on a site. Accepts the same filters as `listSiteFindings`. Use this to answer \"how healthy are my docs\" before drilling into individual findings.","tags":["site-context"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/siteId"},{"name":"topic","in":"query","description":"Filter findings by associated site topic ID.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Filter findings by status.","schema":{"$ref":"#/components/schemas/SiteFindingStatus"}},{"name":"type","in":"query","description":"Filter findings by type. When multiple types are given, findings matching any of them are returned.","schema":{"type":"array","items":{"$ref":"#/components/schemas/SiteFindingType"}}},{"name":"severity","in":"query","description":"Filter findings by estimated severity.","schema":{"$ref":"#/components/schemas/SiteFindingSeverity"}},{"name":"autoResolution","in":"query","description":"Filter findings by what GitBook did on its own to resolve them: `drafted` fixes wait for approval, `applied` ones were made live, `undone` ones were reversed by a person.","schema":{"$ref":"#/components/schemas/SiteFindingAutoResolution"}},{"name":"autoResolvedAfter","in":"query","description":"Only return findings GitBook drafted or applied a fix for at or after this date. Combine with `autoResolution` and `status` to count recent automatic fixes.","schema":{"type":"string","format":"date-time"}},{"name":"hasChangeRequests","in":"query","description":"Filter findings that have at least one associated change request.","schema":{"type":"boolean"}},{"name":"source","in":"query","description":"Filter findings by the source of their evidence. Each entry is either `connection:<connectionId>` (findings with at least one piece of evidence coming from the given connection) or `questions` (findings with at least one piece of evidence coming from a site question). When multiple entries are given, findings matching any of them are counted.","schema":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/SiteTriageFilterQuestions"},{"$ref":"#/components/schemas/SiteTriageFilterConnections"}]}}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteFindingStats"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gitbook.com/docs/developers/gitbook-api/api-reference/docs-sites/site-context/get-a-summary-of-documentation-issues-found-on-a-site.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
