# How to Get ReportStats https://api-docs.lumar.io/docs/graphql/get-report-stats `ReportStats` are aggregations of report template filters on top of raw crawl data. For instance, the "Broken Pages" report template contains a filter similar to "httpStatusCode=404", and when a crawl finishes Lumar will generate the "Broken Pages" report with the `basic` value being the number of URLs that were broken (matched the report template filter). The `getReportStats` query is the primary way to retrieve the high level ReportStat aggregations, and can also be used to get the actual URLs that are part of the report (see [Get URL Data](get-url-data)) The following query will show you how to retrieve report data from the Lumar API. Note: as with the [getCrawls guide](get-crawls.mdx) you will need to provide the Crawl ID for the `id` parameter. ## Use the `getReportStats` query to retrieve high-level report data for selected ReportTemplates The sample query below will return 3 properties (`reportTemplate.name`, `reportTemplate.code`, `basic`) for all report templates. For the comprehensive list, inspect `type ReportStat`. ```graphql query GetReportStats($crawlId: ObjectID!) { getReportStats( inputs: [ { crawlId: $crawlId, reportTemplateCode: "200_pages" } { crawlId: $crawlId, reportTemplateCode: "301_redirects" } ] ) { reportTemplateName reportTemplateCode basic } } ``` **Variables:** ```json { "$crawlId": "TjAwNUNyYXdsMTc5MDQ3NQ" } ``` **Response:** ```json { "data": { "getReportStats": [ { "reportTemplateName": "200 Pages", "reportTemplateCode": "200_pages", "basic": 1679 }, { "reportTemplateName": "301 Redirects", "reportTemplateCode": "301_redirects", "basic": 40 } ] } } ``` ## Use the `getCrawl` query to retrieve high-level report data for all report templates The sample query below will return 3 properties (`reportTemplate.name`, `reportTemplate.code`, `basic`) for all report templates. For the comprehensive list, inspect `type ReportStat`. ```graphql query GetCrawlReportStats($crawlId: ObjectID!) { getCrawl(id: $crawlId) { reportStats { reportTemplateName basic } } } ``` **Variables:** ```json { "id": "TjAwNUNyYXdsMTc5MDQ3NQ" } ``` **Response:** ```json { "data": { "getCrawl": { "reportStats": [ { "reportTemplateName": "200 Pages", "reportTemplateCode": "200_pages", "basic": 1679 }, { "reportTemplateName": "301 Redirects", "reportTemplateCode": "301_redirects", "basic": 40 }, // ... { "reportTemplateName": "Web Crawl Depth", "reportTemplateCode": "web_crawl_depth", "basic": 8 }, { "reportTemplateName": "XML Sitemaps", "reportTemplateCode": "xml_sitemaps", "basic": 0 } ] } } } ```