--- title: "Fraza: liderzy tematu (`getTopicLeaders`)" source: https://docs.senuto.com/modules/serp_analysis/serp-keyword-getTopicLeaders api: POST /api/serp_analysis/reports/keyword/getTopicLeaders --- # Fraza: liderzy tematu (`getTopicLeaders`) **`POST /api/serp_analysis/reports/keyword/getTopicLeaders`** Przykładowe żądanie: ```json { "task_id": null, "limit": 10 } ``` Przykładowa odpowiedź: ```json { "success": true, "data": [ { "url": "allegro.pl/kategoria/zywe-zwierzeta-psy-5344", "occurrences": 2752 }, { "url": "gratka.pl/zwierzeta/psy", "occurrences": 1038 } ], "pagination": { "page_count": 72489, "current_page": 1, "has_next_page": true, "has_prev_page": false, "count": 724882, "limit": 10 } } ``` Zwraca **liderów tematu** — adresy URL najczęściej pojawiające się w TOP dla fraz z badanego tematu (`occurrences` = liczba fraz, dla których URL rankuje). Wskazuje strony o najsilniejszej pozycji tematycznej. | URL | Liczba wystąpień | | --- | --- | | allegro.pl/kategoria/zywe-zwierzeta-psy-5344 | 2752 | | gratka.pl/zwierzeta/psy | 1038 | | psy.pl/imiona-dla-psa/ | 922 | | medme.pl/artykuly/badanie-psa-normy-wolny-calkowity,67743.html | 834 | | polki.pl/dom/zwierzeta,imiona-dla-psow,10410993,artykul.html | 832 | _task_id 1579873 „pies”._ --- ## Żądanie `POST` `/api/serp_analysis/reports/keyword/getTopicLeaders` ```jsonc filename="żądanie.jsonc" { "task_id": null, "limit": 10, "page": 1 } ``` ### Parametry ```ts type SerpTopicLeadersRequest = { /** **Wymagane**. ID gotowego zadania SERP. */ task_id: number; /** * Filtrowanie zbioru fraz tematu. Ten sam mechanizm co w keywords/getKeywords * (komponent dziedziczy rejestr filtrów Bazy słów). Nieznany `key` → `418` `invalid_filtering`. * Dozwolone klucze m.in.: `searches`, `cpc`, `words_count`, `keywords`, `snippets`, * `trends_peaks`, `added`. Operatory liczbowe: `gt` | `gte` | `lt` | `lte` | `eq`. */ filtering?: Array<{ filters: Array<{ key: string; match?: 'gt' | 'gte' | 'lt' | 'lte' | 'eq'; value: string | number | Array; complement?: boolean }>; conjunction?: 'and' | 'or'; }>; /** Liczba wierszy na stronę. @default 10 */ limit?: number; /** Numer strony. @default 1 */ page?: number; } export default SerpTopicLeadersRequest ``` ## Odpowiedź ```ts type SerpTopicLeadersResponse = { success: boolean; data: Array<{ url: string; /** Liczba fraz z tematu, dla których URL rankuje w TOP. */ occurrences: number; }>; pagination: { page_count: number; current_page: number; has_next_page: boolean; has_prev_page: boolean; count: number; limit: number; }; } export default SerpTopicLeadersResponse ``` ## 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) — pełna lista wyników SERP badanej frazy. - [`keyword/getGroups`](/modules/serp_analysis/serp-keyword-getGroups) — grupy tematyczne.