--- title: "Fraza: treść · statystyki (`getStatistics`)" source: https://docs.senuto.com/modules/serp_analysis/serp-content-getStatistics api: POST /api/serp_analysis/reports/content/getStatistics --- # Fraza: treść · statystyki (`getStatistics`) **`POST /api/serp_analysis/reports/content/getStatistics`** Przykładowe żądanie: ```json { "task_id": null } ``` Przykładowa odpowiedź: ```json { "success": true, "data": { "statistics": { "title": { "avg": 43.65, "min": 9, "domain_min": "josera.pl", "max": 97, "domain_max": "sklep.petsmile.pl" }, "description": { "avg": 126.4, "min": 92, "domain_min": "pieszcharakterem.pl", "max": 466, "domain_max": "onet.pl" }, "content": { "avg": 5826.95, "min": 217, "domain_min": "pieszcharakterem.pl", "max": 39467, "domain_max": "pl.wikipedia.org" }, "h1": { "avg": 1.7, "min": 1, "domain_min": "pl.wikipedia.org", "max": 17, "domain_max": "petbox.pl" } }, "extra_statistics": [] } } ``` Zwraca **zbiorcze statystyki treści** stron w TOP dla frazy: dla każdej metryki (długość tytułu, opisu, treści, `text2html_ratio` oraz liczba nagłówków `h1`/`h2`/`h3`) — wartość średnią (`avg`), minimum i maksimum wraz z domenami, które je osiągnęły. Pozwala zorientować się w „normie" treści wśród konkurencji. | Metryka | Średnia | Min | Domena (min) | Max | Domena (max) | | --- | --- | --- | --- | --- | --- | | title (dł.) | 43.65 | 9 | josera.pl | 97 | sklep.petsmile.pl | | description (dł.) | 126.4 | 92 | pieszcharakterem.pl | 466 | onet.pl | | content (dł.) | 5826.95 | 217 | pieszcharakterem.pl | 39467 | pl.wikipedia.org | | h1 (liczba) | 1.7 | 1 | pl.wikipedia.org | 17 | petbox.pl | | h2 (liczba) | 4.25 | 1 | psy24.pl | 18 | pl.wikipedia.org | | h3 (liczba) | 1.25 | 1 | wiadomosci.wp.pl | 20 | piesporadnik.pl | _task_id 1579873 „pies”. Wiersze zbudowane z data.statistics (każda metryka = jeden wiersz)._ > **Informacja:** > Klucze `statistics` to: `title`, `description`, `text2html_ratio`, `content`, `h1`, `h2`, `h3`. Obsługuje `filtering` oraz `compare_url_ids`. Wymaga `task_id` gotowego zadania. --- ## Żądanie `POST` `/api/serp_analysis/reports/content/getStatistics` ```jsonc filename="żądanie.jsonc" { "task_id": null } ``` ### Parametry ```ts type SerpContentStatisticsRequest = { /** **Wymagane**. ID gotowego zadania SERP. Realny `task_id` pobierzesz z `POST /api/tasks/management/serp_analysis/list` albo z odpowiedzi `create`. */ task_id: number; /** Opcjonalne filtry. */ filtering?: Record[]; /** ID własnych URL-i do porównania. */ compare_url_ids?: number[]; } export default SerpContentStatisticsRequest ``` ## Odpowiedź ```ts type MetricStat = { avg: number; min: number; domain_min: string; max: number; domain_max: string; }; type SerpContentStatisticsResponse = { success: boolean; data: { statistics: { title: MetricStat; description: MetricStat; text2html_ratio: MetricStat; content: MetricStat; h1: MetricStat; h2: MetricStat; h3: MetricStat; }; extra_statistics: unknown[]; }; } export default SerpContentStatisticsResponse ``` ## Błędy Błędy tego endpointu przychodzą we [wspólnej kopercie ze statusem `418`](/types/errors). ## Powiązane akcje - [`urls/getList`](/modules/serp_analysis/serp-urls-getList) — lista wyników z analizą treści.