--- title: "Szczegóły frazy: pytania o frazę (`getQuestions`)" source: https://docs.senuto.com/modules/keywords_analysis/ka-keyword-details-getQuestions api: POST /api/keywords_analysis/reports/keyword_details/getQuestions --- # Szczegóły frazy: pytania o frazę (`getQuestions`) **`POST /api/keywords_analysis/reports/keyword_details/getQuestions`** Zwraca **pytania zawierające podaną frazę** — długie ogony w formie pytającej, przydatne przy planowaniu FAQ i sekcji „ludzie pytają też”. Każdy wiersz to osobna fraza pytająca z pełnym zestawem metryk. Raport odpytujesz **wprost frazą i krajem** — bez wcześniejszego tworzenia zadania w Analizie SERP. Jedno żądanie zastępuje ścieżkę „utwórz zadanie → sprawdź status → pobierz wynik" i nie zużywa limitu zadań. Dla frazy `hamak` w Polsce raport zwrócił **405** wierszy. --- ## Żądanie `POST` `/api/keywords_analysis/reports/keyword_details/getQuestions` Nagłówki: `Authorization: Bearer `, `Content-Type: application/json`. Parametry przekazuje się w **treści żądania**. **Żądanie** ```jsonc filename="żądanie.jsonc" { "keyword": "hamak", "country_id": 1, "limit": 10 } ``` **cURL** ```bash curl --location --request POST 'https://api.senuto.com/api/keywords_analysis/reports/keyword_details/getQuestions' \ --header 'Authorization: Bearer $YOUR_TOKEN_HERE' \ --header 'Content-Type: application/json' \ --data '{"keyword":"hamak","country_id":1,"limit":10}' ``` ### Parametry ```ts type KeywordDetailsGetQuestionsRequest = { /** **Wymagane**. Fraza kluczowa, dla której pobierany jest raport. Pusty string zwraca `418`. */ keyword: string; /** * **Wymagane**. Identyfikator kraju; musi istnieć w słowniku krajów — nieznana wartość zwraca * `418` z komunikatem `Unknown country_id`. Uwaga: `200` jest tu mapowane na `1`. * @default 1 */ country_id: number; /** * Filtry raportu — tablica grup łączonych operatorem OR. **Działa na tej akcji.** * Nieznany `key` zwraca `418` z `invalid_filtering`. Opis mechanizmu: /types/filter */ filtering?: Array<{ filters: Array<{ key: string; match?: 'gt' | 'gte' | 'lt' | 'lte' | 'eq'; value: string | number | Array }>; conjunction?: 'and' | 'or'; }>; /** Numer strony wyników. */ page?: number; /** Liczba wierszy na stronę. */ limit?: number; } export default KeywordDetailsGetQuestionsRequest ``` > **Ostrzeżenie:** > Zarówno **`keyword`**, jak i **`country_id`** są **wymagane**. Nieznane `country_id` zwraca `418` z `Unknown country_id`, a wartość **`200` jest mapowana na `1`** — dla Polski trafisz więc do bazy 1.0, nie 2.0. > **Ostrzeżenie:** > Metryki są **zdublowane w trzech miejscach**: pola najwyższego poziomu (`searches`, `cpc`, `trends`), płaskie `trend_1` … `trend_12` oraz obiekt `statistics`. Do integracji wybierz jedno źródło — `statistics` różni się tylko tym, że jego lista cech SERP jest bez duplikatów. ## Odpowiedź Przykład poniżej to **rzeczywista odpowiedź produkcyjna** dla frazy `hamak` (`country_id: 1`), skrócona do jednego wiersza. ```json filename="przykładowa-odpowiedź" { "success": true, "data": [ { "added": "2021-03-11", "keyword": "jak zamontować hamak", "searches": 260, "cpc": 0, "words_count": 3, "trend_1": 20, "trend_2": 30, "trend_3": 70, "trend_4": 390, "trend_5": 720, "trend_6": 590, "trend_7": 590, "trend_8": 320, "trend_9": 50, "trend_10": 10, "trend_11": 10, "trend_12": 20, "kid": "47b5d3e1a14c5c24f14bd6ab34fd8e94", "variations": [ "hamak jak zamontować" ], "variations_number": 1, "snippets": [ "question", "question", "featured_answer", "image_thumbs", "people_also_ask", "video_thumbs", "featured_answer", "image_thumbs", "people_also_ask", "video_thumbs" ], "trends": [ 20, 30, 70, 390, 720, 590, 590, 320, 50, 10, 10, 20 ], "cpc_min": null, "cpc_max": null, "statistics": { "snippets": { "current": [ "question", "featured_answer", "image_thumbs", "people_also_ask", "video_thumbs" ] }, "searches": { "current": 260 }, "cpc": { "current": 0 }, "cpc_min": [], "cpc_max": [], "trends": { "history": [ 20, 30, 70, 390, 720, 590, 590, 320, 50, 10, 10, 20 ] } } } ], "pagination": { "page_count": 203, "current_page": 1, "has_next_page": true, "has_prev_page": false, "count": 405, "limit": 2 } } ``` ### Struktura odpowiedzi ```ts type KeywordDetailsGetQuestionsResponse = { success: boolean; data: Array<{ keyword: string; /** Data dodania frazy do bazy, format `YYYY-MM-DD`. */ added: string; /** Średnia miesięczna liczba wyszukiwań. */ searches: number; cpc: number; cpc_min: number | null; cpc_max: number | null; words_count: number; /** Identyfikator frazy w bazie. */ kid: string; /** Warianty zapisu tej samej frazy. */ variations: string[]; variations_number: number; /** Cechy SERP frazy. Lista może zawierać **powtórzenia** — odsiane w `statistics.snippets.current`. */ snippets: string[]; /** 12-elementowy trend wyszukiwań. */ trends: number[]; /** Miesięczne wartości trendu, pola `trend_1` … `trend_12`. Duplikują tablicę `trends`. */ trend_1: number; trend_2: number; trend_3: number; trend_4: number; trend_5: number; trend_6: number; trend_7: number; trend_8: number; trend_9: number; trend_10: number; trend_11: number; trend_12: number; /** * Te same metryki co pola najwyższego poziomu, w formie zagnieżdżonej. Nic nowego nie wnosi * poza jednym: `statistics.snippets.current` jest listą **bez duplikatów**, podczas gdy * `snippets` może powtarzać te same wartości. */ statistics: { snippets: { current: string[] }; searches: { current: number }; cpc: { current: number }; cpc_min: { current: number } | []; cpc_max: { current: number } | []; trends: { history: number[] }; }; }>; /** Paginacja liczona z całego zbioru — `count` to liczba wszystkich wierszy. */ pagination: { page_count: number; current_page: number; has_next_page: boolean; has_prev_page: boolean; count: number; limit: number; }; } export default KeywordDetailsGetQuestionsResponse ``` ## Błędy Błędy tego endpointu przychodzą we [wspólnej kopercie ze statusem `418`](/types/errors). ## Powiązane akcje Wszystkie poniższe raporty przyjmują tę samą parę `keyword` + `country_id`: - [`getStatistics`](/modules/keywords_analysis/ka-keyword-details-getStatistics) — zbiorcze statystyki frazy. - [`getKeywordsPropositions`](/modules/keywords_analysis/ka-keyword-details-getKeywordsPropositions) — propozycje fraz. - [`getRelatedKeywords`](/modules/keywords_analysis/ka-keyword-details-getRelatedKeywords) — frazy powiązane. - [`getTopicLeaders`](/modules/keywords_analysis/ka-keyword-details-getTopicLeaders) — liderzy tematu. - [`getGroups`](/modules/keywords_analysis/ka-keyword-details-getGroups) — grupy frazy. - [`getCompetitorsNumber`](/modules/keywords_analysis/ka-keyword-details-getCompetitorsNumber) — liczba konkurentów.