get_keywords_search_volume
Retrieve search volume data for specific keywords in a chosen country to optimize SEO strategies and keyword research using FetchSERP MCP Server.
Instructions
Get search volume for given keywords
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| country | No | The country code to search for | |
| keywords | Yes | The keywords to search |
Implementation Reference
- index.js:626-627 (handler)Handler logic for get_keywords_search_volume tool: calls the FetchSERP API endpoint /api/v1/keywords_search_volume with GET request using provided arguments.case 'get_keywords_search_volume': return await this.makeRequest('/api/v1/keywords_search_volume', 'GET', args, null, token);
- index.js:116-134 (schema)Input schema definition for the get_keywords_search_volume tool in the listTools response.{ name: 'get_keywords_search_volume', description: 'Get search volume for given keywords', inputSchema: { type: 'object', properties: { keywords: { type: 'array', items: { type: 'string' }, description: 'The keywords to search', }, country: { type: 'string', description: 'The country code to search for', }, }, required: ['keywords'], }, },
- index.js:37-538 (registration)Registration of all tools via the ListToolsRequestSchema handler, which includes get_keywords_search_volume in the tools list.this.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: [ { name: 'get_backlinks', description: 'Get backlinks for a given domain', inputSchema: { type: 'object', properties: { domain: { type: 'string', description: 'The domain to search for backlinks', }, search_engine: { type: 'string', description: 'The search engine to use (google, bing, yahoo, duckduckgo). Default: google', default: 'google', }, country: { type: 'string', description: 'The country to search from. Default: us', default: 'us', }, pages_number: { type: 'integer', description: 'The number of pages to search (1-30). Default: 15', default: 15, minimum: 1, maximum: 30, }, }, required: ['domain'], }, }, { name: 'get_domain_emails', description: 'Retrieve emails from a given domain', inputSchema: { type: 'object', properties: { domain: { type: 'string', description: 'The domain to search emails from', }, search_engine: { type: 'string', description: 'The search engine to use (google, bing, yahoo, duckduckgo). Default: google', default: 'google', }, country: { type: 'string', description: 'The country to search from. Default: us', default: 'us', }, pages_number: { type: 'integer', description: 'The number of pages to search (1-30). Default: 1', default: 1, minimum: 1, maximum: 30, }, }, required: ['domain'], }, }, { name: 'get_domain_info', description: 'Get domain info including DNS records, WHOIS data, SSL certificates, and technology stack', inputSchema: { type: 'object', properties: { domain: { type: 'string', description: 'The domain to check', }, }, required: ['domain'], }, }, { name: 'get_keywords_search_volume', description: 'Get search volume for given keywords', inputSchema: { type: 'object', properties: { keywords: { type: 'array', items: { type: 'string' }, description: 'The keywords to search', }, country: { type: 'string', description: 'The country code to search for', }, }, required: ['keywords'], }, }, { name: 'get_keywords_suggestions', description: 'Get keyword suggestions based on a url or a list of keywords', inputSchema: { type: 'object', properties: { url: { type: 'string', description: 'The url to search (optional if keywords provided)', }, keywords: { type: 'array', items: { type: 'string' }, description: 'The keywords to search (optional if url provided)', }, country: { type: 'string', description: 'The country code to search for', }, }, }, }, { name: 'get_long_tail_keywords', description: 'Generate long-tail keywords for a given keyword', inputSchema: { type: 'object', properties: { keyword: { type: 'string', description: 'The seed keyword to generate long-tail keywords from', }, search_intent: { type: 'string', description: 'The search intent (informational, commercial, transactional, navigational). Default: informational', default: 'informational', }, count: { type: 'integer', description: 'The number of long-tail keywords to generate (1-500). Default: 10', default: 10, minimum: 1, maximum: 500, }, }, required: ['keyword'], }, }, { name: 'get_moz_analysis', description: 'Get Moz domain analysis data', inputSchema: { type: 'object', properties: { domain: { type: 'string', description: 'The domain to analyze', }, }, required: ['domain'], }, }, { name: 'check_page_indexation', description: 'Check if a domain is indexed for a given keyword', inputSchema: { type: 'object', properties: { domain: { type: 'string', description: 'The domain to check', }, keyword: { type: 'string', description: 'The keyword to check', }, }, required: ['domain', 'keyword'], }, }, { name: 'get_domain_ranking', description: 'Get domain ranking for a given keyword', inputSchema: { type: 'object', properties: { keyword: { type: 'string', description: 'The keyword to search', }, domain: { type: 'string', description: 'The domain to search', }, search_engine: { type: 'string', description: 'The search engine to use (google, bing, yahoo, duckduckgo). Default: google', default: 'google', }, country: { type: 'string', description: 'The country to search from. Default: us', default: 'us', }, pages_number: { type: 'integer', description: 'The number of pages to search (1-30). Default: 10', default: 10, minimum: 1, maximum: 30, }, }, required: ['keyword', 'domain'], }, }, { name: 'scrape_webpage', description: 'Scrape a web page without JS', inputSchema: { type: 'object', properties: { url: { type: 'string', description: 'The url to scrape', }, }, required: ['url'], }, }, { name: 'scrape_domain', description: 'Scrape a domain', inputSchema: { type: 'object', properties: { domain: { type: 'string', description: 'The domain to scrape', }, max_pages: { type: 'integer', description: 'The maximum number of pages to scrape (up to 200). Default: 10', default: 10, maximum: 200, }, }, required: ['domain'], }, }, { name: 'scrape_webpage_js', description: 'Scrape a web page with custom JS', inputSchema: { type: 'object', properties: { url: { type: 'string', description: 'The url to scrape', }, js_script: { type: 'string', description: 'The javascript code to execute on the page', }, }, required: ['url', 'js_script'], }, }, { name: 'scrape_webpage_js_proxy', description: 'Scrape a web page with JS and proxy', inputSchema: { type: 'object', properties: { url: { type: 'string', description: 'The url to scrape', }, country: { type: 'string', description: 'The country to use for the proxy', }, js_script: { type: 'string', description: 'The javascript code to execute on the page', }, }, required: ['url', 'country', 'js_script'], }, }, { name: 'get_serp_results', description: 'Get search engine results', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'The query to search', }, search_engine: { type: 'string', description: 'The search engine to use (google, bing, yahoo, duckduckgo). Default: google', default: 'google', }, country: { type: 'string', description: 'The country to search from. Default: us', default: 'us', }, pages_number: { type: 'integer', description: 'The number of pages to search (1-30). Default: 1', default: 1, minimum: 1, maximum: 30, }, }, required: ['query'], }, }, { name: 'get_serp_html', description: 'Get search engine results with HTML content', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'The query to search', }, search_engine: { type: 'string', description: 'The search engine to use (google, bing, yahoo, duckduckgo). Default: google', default: 'google', }, country: { type: 'string', description: 'The country to search from. Default: us', default: 'us', }, pages_number: { type: 'integer', description: 'The number of pages to search (1-30). Default: 1', default: 1, minimum: 1, maximum: 30, }, }, required: ['query'], }, }, { name: 'get_serp_ai_mode', description: 'Get SERP with AI Overview and AI Mode response. Returns AI overview and AI mode response for the query. Less reliable than the 2-step process but returns results in under 30 seconds.', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'The query to search', }, country: { type: 'string', description: 'The country to search from. Default: us', default: 'us', }, }, required: ['query'], }, }, { name: 'get_serp_text', description: 'Get search engine results with text content', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'The query to search', }, search_engine: { type: 'string', description: 'The search engine to use (google, bing, yahoo, duckduckgo). Default: google', default: 'google', }, country: { type: 'string', description: 'The country to search from. Default: us', default: 'us', }, pages_number: { type: 'integer', description: 'The number of pages to search (1-30). Default: 1', default: 1, minimum: 1, maximum: 30, }, }, required: ['query'], }, }, { name: 'get_user_info', description: 'Get user information including API credit', inputSchema: { type: 'object', properties: {}, }, }, { name: 'get_webpage_ai_analysis', description: 'Analyze a web page with AI', inputSchema: { type: 'object', properties: { url: { type: 'string', description: 'The url to analyze', }, prompt: { type: 'string', description: 'The prompt to use for the analysis', }, }, required: ['url', 'prompt'], }, }, { name: 'generate_wordpress_content', description: 'Generate WordPress content using AI with customizable prompts and models', inputSchema: { type: 'object', properties: { user_prompt: { type: 'string', description: 'The user prompt', }, system_prompt: { type: 'string', description: 'The system prompt', }, ai_model: { type: 'string', description: 'The AI model (default: gpt-4.1-nano)', default: 'gpt-4.1-nano', }, }, required: ['user_prompt', 'system_prompt'], }, }, { name: 'generate_social_content', description: 'Generate social media content using AI with customizable prompts and models', inputSchema: { type: 'object', properties: { user_prompt: { type: 'string', description: 'The user prompt', }, system_prompt: { type: 'string', description: 'The system prompt', }, ai_model: { type: 'string', description: 'The AI model (default: gpt-4.1-nano)', default: 'gpt-4.1-nano', }, }, required: ['user_prompt', 'system_prompt'], }, }, { name: 'get_playwright_mcp', description: 'Use GPT-4.1 to remote control a browser via a Playwright MCP server', inputSchema: { type: 'object', properties: { prompt: { type: 'string', description: 'The prompt to use for remote control of the browser', }, }, required: ['prompt'], }, }, { name: 'get_webpage_seo_analysis', description: 'Get SEO analysis for a given url', inputSchema: { type: 'object', properties: { url: { type: 'string', description: 'The url to analyze', }, }, required: ['url'], }, }, ], }; });
- index.js:565-613 (helper)Shared helper method makeRequest that performs authenticated API calls to FetchSERP, used by the get_keywords_search_volume handler.async makeRequest(endpoint, method = 'GET', params = {}, body = null, token = null) { const fetchserpToken = token || process.env.FETCHSERP_API_TOKEN; if (!fetchserpToken) { throw new McpError( ErrorCode.InvalidRequest, 'FETCHSERP_API_TOKEN is required' ); } const url = new URL(`${API_BASE_URL}${endpoint}`); // Add query parameters for GET requests if (method === 'GET' && Object.keys(params).length > 0) { Object.entries(params).forEach(([key, value]) => { if (value !== undefined && value !== null) { if (Array.isArray(value)) { value.forEach(v => url.searchParams.append(`${key}[]`, v)); } else { url.searchParams.append(key, value.toString()); } } }); } const fetchOptions = { method, headers: { 'Authorization': `Bearer ${fetchserpToken}`, 'Content-Type': 'application/json', }, }; if (body && method !== 'GET') { fetchOptions.body = JSON.stringify(body); } const response = await fetch(url.toString(), fetchOptions); if (!response.ok) { const errorText = await response.text(); throw new McpError( ErrorCode.InternalError, `API request failed: ${response.status} ${response.statusText} - ${errorText}` ); } return await response.json(); }