### SDK Integration Examples Source: https://www.fetchserp.com/api Examples of how to integrate FetchSERP API using official SDKs for Ruby, Node.js, and Python. ```APIDOC ### Ruby SDK ```ruby # Gemfile gem "fetchserp", "~> 0.1" # Usage client = FetchSERP::Client.new response = client.serp(query: "ruby gems") puts response.data["results"] ``` ### Node.js SDK ```javascript // Install npm install fetchserp // Usage const FetchSERP = require('fetchserp'); const client = new FetchSERP('your-api-key'); const results = await client.serp('node.js'); ``` ### Python SDK ```python # Install pip install fetchserp # Usage from fetchserp import FetchSERP client = FetchSERP('your-api-key') results = client.serp('python sdk') ``` ``` -------------------------------- ### API Response Example for Keywords Suggestions Source: https://www.fetchserp.com/api This is an example of the JSON response structure for the Keywords Suggestions endpoint, showing suggested keywords and their associated metrics. ```json { "keywords_suggestions": [ { "keyword": "serp api", "avg_monthly_searches": 6600, "competition": "LOW", "competition_index": 36, "low_top_of_page_bid_micros": 1725093, "high_top_of_page_bid_micros": 6214505 } ] } ``` -------------------------------- ### Integrate Ruby SDK Source: https://www.fetchserp.com/api Install the gem and initialize the client to perform SERP queries. ```ruby # Gemfile gem "fetchserp", "~> 0.1" # Usage client = FetchSERP::Client.new response = client.serp(query: "ruby gems") puts response.data["results"] ``` -------------------------------- ### Integrate Python SDK Source: https://www.fetchserp.com/api Install the package and initialize the client with your API key. ```python # Install pip install fetchserp # Usage from fetchserp import FetchSERP client = FetchSERP('your-api-key') results = client.serp('python sdk') ``` -------------------------------- ### Domain Info API Response Example Source: https://www.fetchserp.com/api Example JSON response for the Domain Info endpoint, detailing DNS, WHOIS, server, and technology stack information. ```json { "domain_info": { "dns": { "a": ["93.184.216.34"], "mx": ["mail.example.com"], "ns": ["ns1.example.com", "ns2.example.com"] }, "whois": { "registrar": "Example Registrar", "created_on": "2020-01-01", "expires_on": "2025-01-01" }, "server": { "ip": "93.184.216.34", "https_supported": true, "server": "nginx/1.18.0" }, "technology_stack": { "backend_frameworks": ["Ruby on Rails"], "frontend_frameworks": ["React"], "analytics_cdns": ["Google Analytics"] } } } ``` -------------------------------- ### API Response Example for SEO Analysis Source: https://www.fetchserp.com/api An example of the JSON response from the SEO Analysis endpoint, detailing meta tags, title, and description analysis for a web page. ```json { "analysis": { "title": "fetchSERP - SEO & Web Intelligence Toolkit API", "title_length": 46, "meta_description": "FetchSERP API: Comprehensive SEO & web intelligence toolkit with search engine results, domain rankings, backlinks analysis, keyword research, and web scraping capabilities. Access data from Bing, Yahoo and DuckDuckGo. Fast, reliable API with low-latency endpoints and simple integration. Start with 250 free credits.", "meta_description_length": 326, "title_contains_keyword": false, "description_contains_keyword": true, "canonical_url": null, "robots_meta": null, "noindex_detected": null, "nofollow_detected": null }, ... } ``` -------------------------------- ### Page Indexation API Response Example Source: https://www.fetchserp.com/api Example JSON response for the Page Indexation endpoint, indicating whether a domain is indexed for a given keyword and listing relevant URLs. ```json { "data": { "domain": "fetchserp.com", "keyword": "serp api", "indexed": true, "urls": [ "https://www.fetchserp.com/serp-api" ] } } ``` -------------------------------- ### Integrate Node.js SDK Source: https://www.fetchserp.com/api Install via npm and use the client to fetch search results. ```javascript # Install npm install fetchserp # Usage const FetchSERP = require('fetchserp'); const client = new FetchSERP('your-api-key'); const results = await client.serp('node.js'); ``` -------------------------------- ### GET /api/v1/domain_infos Source: https://www.fetchserp.com/api Get comprehensive domain information including DNS, WHOIS, server details, and technology stack. ```APIDOC ## GET /api/v1/domain_infos ### Description Get comprehensive domain information including DNS records, WHOIS data, server details, SSL certificates, and technology stack analysis. ### Method GET ### Endpoint https://www.fetchserp.com/api/v1/domain_infos ### Parameters #### Query Parameters - **domain** (string) - Required - The domain to analyze. ### Response #### Success Response (200) - **domain_info** (object) - Detailed metadata including dns, whois, server, and technology_stack. #### Response Example { "domain_info": { "dns": { "a": ["93.184.216.34"] }, "whois": { "registrar": "Example Registrar" }, "server": { "ip": "93.184.216.34" }, "technology_stack": { "backend_frameworks": ["Ruby on Rails"] } } } ``` -------------------------------- ### SERP API Response Format Source: https://www.fetchserp.com/api Example JSON structure returned by the SERP endpoint. ```json [ { "site_name": "fetchSERP", "url": "https://www.fetchserp.com/", "title": "SERP API", "description": "Search Engine API", "ranking": 1 } ] ``` -------------------------------- ### Long Tail Keywords Generator API Response Example Source: https://www.fetchserp.com/api Example JSON response from the Long Tail Keywords Generator endpoint, providing a list of generated long-tail keywords. ```json { "long_tail_keywords": [ "how to use serp api for keyword research", "best serp api alternatives for seo analysis", "serp api pricing comparison 2024", "serp api vs competitor tools for backlink analysis", "serp api documentation guide for developers" ] } ``` -------------------------------- ### Ranking API Response Format Source: https://www.fetchserp.com/api Example JSON structure returned by the Ranking endpoint. ```json [ { "url": "https://www.fetchserp.com/", "ranking": 1 } ] ``` -------------------------------- ### Web Page AI Analysis API Response Example Source: https://www.fetchserp.com/api Example JSON response structure for the Web Page AI Analysis endpoint, showing the 'ai_analysis' field. ```json { "ai_analysis": "This web page is the official landing page for fetchSERP, an SEO & web intelligence API toolkit. It offers endpoints for SERP data, domain rankings, backlinks, keyword research, and web scraping. The page highlights features, pricing, and use cases for SEO professionals, marketers, and developers." } ``` -------------------------------- ### Initiate SERP AI Mode Job with FetchSERP API Source: https://www.fetchserp.com/api Start a job to access Google's AI Mode responses, including AI Overviews and thinking processes. This is useful for AI research and understanding AI's interpretation of queries. ```bash # Step 1: Start the SERP AI Mode job curl -X GET "https://www.fetchserp.com/api/v1/serp_ai" \ -G \ -d 'country=us' \ -d 'query=how+do+pumps+work' \ -H 'accept: application/json'\ -H 'authorization: Bearer YOUR_API_TOKEN' ``` -------------------------------- ### Fetch SERP Data via REST API Source: https://www.fetchserp.com/api Retrieve search engine results using a GET request with authentication. ```bash curl -X GET "https://www.fetchserp.com/api/v1/serp" \ -G \ -d 'search_engine=duckduckgo' \ -d 'country=us' \ -d 'pages_number=1' \ -d 'query=serp+api' \ -H 'accept: application/json'\ -H 'authorization: Bearer YOUR_API_TOKEN' ``` -------------------------------- ### Get Keyword Suggestions using CURL Source: https://www.fetchserp.com/api Use this endpoint to get keyword suggestions based on a URL or seed keywords. It helps discover new opportunities with search volume and competition data. ```curl curl -X GET "https://www.fetchserp.com/api/v1/keywords_suggestions" \ -G \ -d 'url=fetchserp.com' \ -d 'keywords[]=serp+api' \ -d 'country=us' \ -H 'accept: application/json'\ -H 'authorization: Bearer YOUR_API_TOKEN' ``` -------------------------------- ### Initiate and Retrieve SERP JS Job with FetchSERP API Source: https://www.fetchserp.com/api This two-step process first starts a SERP JS job to render dynamic content and then retrieves the results using the returned UUID. It's suitable for capturing modern search features requiring JavaScript execution. ```bash # Step 1: Start the SERP JS job curl -X GET "https://www.fetchserp.com/api/v1/serp_js" \ -G \ -d 'country=us' \ -d 'pages_number=1' \ -d 'query=serp+api' \ -H 'accept: application/json'\ -H 'authorization: Bearer YOUR_API_TOKEN' # Step 2: Get the results using the UUID from step 1 curl -X GET "https://www.fetchserp.com/api/v1/serp_js/YOUR_UUID" \ -H 'accept: application/json'\ -H 'authorization: Bearer YOUR_API_TOKEN' ``` -------------------------------- ### API Response Example for Backlinks Source: https://www.fetchserp.com/api This JSON response illustrates the data returned by the Backlinks endpoint, including backlink count and details of individual backlinks. ```json { "backlinks_count": 7, "backlinks": [ { "source_url": "https://www.producthunt.com/products/fetchserp", "target_url": "https://www.fetchserp.com/?ref=producthunt", "anchor_text": "Visit website", "nofollow": false, "rel_attributes": [ "noreferrer" ], "context_text": "Visit websiteFollow", "source_domain": "www.producthunt.com", "target_domain": "www.fetchserp.com", "page_title": "FetchSerp Product Information and Latest Updates (2025) | Product Hunt", "meta_description": "Web scraping, AI analysis, and data extraction API" } ] } ``` -------------------------------- ### API Response Example for Domain Emails Source: https://www.fetchserp.com/api This JSON output shows the emails extracted for a given domain by the Domain Emails endpoint. ```json { "emails": [ "contact@fetchserp.com", "support@fetchserp.com", "info@fetchserp.com" ] } ``` -------------------------------- ### Fetch Ranking Data via REST API Source: https://www.fetchserp.com/api Retrieve domain ranking for a specific keyword using a GET request. ```bash curl -X GET "https://www.fetchserp.com/api/v1/ranking" \ -G \ -d 'search_engine=duckduckgo' \ -d 'country=us' \ -d 'domain=fetchserp.com' \ -d 'keyword=serp+api' \ -H 'accept: application/json'\ -H 'authorization: Bearer YOUR_API_TOKEN' ``` -------------------------------- ### Get SERP HTML Content with FetchSERP API Source: https://www.fetchserp.com/api Use this endpoint to retrieve full HTML content of search engine results. It's useful for content gap analysis and competitor research. ```bash curl -X GET "https://www.fetchserp.com/api/v1/serp_html?query=serp+api&search_engine=duckduckgo&country=us&pages_number=1" \ -H "accept: application/json" \ -H "authorization: Bearer TOKEN" ``` -------------------------------- ### GET /api/v1/web_page_ai_analysis Source: https://www.fetchserp.com/api Analyze any web page using advanced AI by providing a URL and a custom prompt. ```APIDOC ## GET /api/v1/web_page_ai_analysis ### Description Analyze any web page using advanced AI. Provide a URL and a custom prompt to receive a structured, AI-generated analysis of the page's content. ### Method GET ### Endpoint https://www.fetchserp.com/api/v1/web_page_ai_analysis ### Parameters #### Query Parameters - **url** (string) - Required - The URL of the web page to analyze. - **prompt** (string) - Required - The custom prompt to tailor the analysis. ### Response #### Success Response (200) - **ai_analysis** (string) - The AI-generated summary or analysis of the page. #### Response Example { "ai_analysis": "This web page is the official landing page for fetchSERP..." } ``` -------------------------------- ### Get SERP Text Content with FetchSERP API Source: https://www.fetchserp.com/api Retrieve search engine results with extracted text content. Ideal for text analysis, mining, and NLP applications. ```bash curl -X GET "https://www.fetchserp.com/api/v1/serp_text" \ -G \ -d 'search_engine=duckduckgo' \ -d 'country=us' \ -d 'pages_number=1' \ -d 'query=serp+api' \ -H 'accept: application/json' \ -H 'authorization: Bearer TOKEN' ``` -------------------------------- ### GET /api/v1/long_tail_keywords_generator Source: https://www.fetchserp.com/api Generate targeted long-tail keywords based on a seed keyword and search intent. ```APIDOC ## GET /api/v1/long_tail_keywords_generator ### Description Generate targeted long-tail keywords based on a seed keyword and search intent for content optimization. ### Method GET ### Endpoint https://www.fetchserp.com/api/v1/long_tail_keywords_generator ### Parameters #### Query Parameters - **keyword** (string) - Required - The seed keyword. - **search_intent** (string) - Required - The intent of the search (e.g., informational). - **count** (integer) - Required - Number of keywords to generate. ### Response #### Success Response (200) - **long_tail_keywords** (array) - A list of generated keyword strings. #### Response Example { "long_tail_keywords": ["how to use serp api for keyword research", "best serp api alternatives..."] } ``` -------------------------------- ### Domain Scraping Endpoint Source: https://www.fetchserp.com/api Extract all URLs from a domain by first checking for a sitemap, and if not found, scraping the main page for links. Get structured data with URLs and their HTML content. ```APIDOC ## GET /api/v1/domain_scraping ### Description Extract all URLs from a domain by first checking for a sitemap, and if not found, scraping the main page for links. Get structured data with URLs and their HTML content. ### Method GET ### Endpoint https://www.fetchserp.com/api/v1/domain_scraping ### Parameters #### Query Parameters - **domain** (string) - Required - The domain to scrape for URLs. ### Request Example ``` https://www.fetchserp.com/api/v1/domain_scraping?domain=fetchserp.com ``` ### Response #### Success Response (200) - **web_pages** (array) - A list of web pages found on the domain. - **web_pages[].url** (string) - The URL of the web page. - **web_pages[].html** (string) - The HTML content of the web page. #### Response Example ```json { "web_pages": [ { "url": "https://www.fetchserp.com/", "html": "\n\n ...\n ...\n" } ] } ``` ``` -------------------------------- ### Analyze Web Page Content with AI Source: https://www.fetchserp.com/api Use this endpoint to get an AI-generated analysis of any web page. Provide a URL and a custom prompt to tailor the analysis. Requires an API token for authentication. ```curl curl -X GET "https://www.fetchserp.com/api/v1/web_page_ai_analysis" \ -G \ -d 'url=https://fetchserp.com' \ -d 'prompt=Summarize the main purpose of this page' \ -H 'accept: application/json' \ -H 'authorization: Bearer YOUR_API_TOKEN' ``` -------------------------------- ### SERP Endpoint Source: https://www.fetchserp.com/api Fetch search engine results pages from DuckDuckGo, Yahoo and Bing. Get structured data with position rankings, titles, descriptions, and URLs. Perfect for market research, competitor analysis, and content strategy. Track your brand visibility, monitor industry trends, and discover new opportunities across multiple search engines. ```APIDOC ## GET /api/v1/serp ### Description Fetches search engine results pages (SERP) from specified search engines. Provides structured data including rankings, titles, descriptions, and URLs. ### Method GET ### Endpoint /api/v1/serp ### Parameters #### Query Parameters - **search_engine** (string) - Required - The search engine to use (e.g., duckduckgo, yahoo, bing). - **country** (string) - Required - The country code for the search (e.g., us). - **pages_number** (integer) - Required - The number of pages to retrieve. - **query** (string) - Required - The search query. ### Request Example ```json { "example": "curl -X GET \"https://www.fetchserp.com/api/v1/serp\" \ -G \ -d 'search_engine=duckduckgo' \ -d 'country=us' \ -d 'pages_number=1' \ -d 'query=serp+api' \ -H 'accept: application/json'\ -H 'authorization: Bearer YOUR_API_TOKEN'" } ``` ### Response #### Success Response (200) - **site_name** (string) - The name of the website. - **url** (string) - The URL of the search result. - **title** (string) - The title of the search result. - **description** (string) - The description of the search result. - **ranking** (integer) - The ranking position of the result. #### Response Example ```json { "example": "[ { \"site_name\": \"fetchSERP\", \"url\": \"https://www.fetchserp.com/\", \"title\": \"SERP API\", \"description\": \"Search Engine API\", \"ranking\": 1 } ]" } ``` ``` -------------------------------- ### Keywords Suggestions API Source: https://www.fetchserp.com/api Get keyword suggestions based on a URL or seed keywords. Discover new opportunities with search volume and competition data. Expand your keyword universe, find long-tail opportunities, and optimize your content strategy. ```APIDOC ## GET /api/v1/keywords_suggestions ### Description Get keyword suggestions based on a URL or seed keywords. Discover new opportunities with search volume and competition data. Expand your keyword universe, find long-tail opportunities, and optimize your content strategy. Ideal for content ideation, SEO optimization, and PPC campaign expansion. Uncover hidden opportunities and target the right audience. ### Method GET ### Endpoint https://www.fetchserp.com/api/v1/keywords_suggestions ### Query Parameters - **url** (string) - Required - The URL to get keyword suggestions from. - **keywords** (array of strings) - Optional - Seed keywords to get suggestions for. - **country** (string) - Optional - The country code for the search (e.g., 'us'). ### Request Example ```json { "url": "fetchserp.com", "keywords": ["serp api"], "country": "us" } ``` ### Response #### Success Response (200) - **keywords_suggestions** (array) - An array of keyword suggestion objects. - **keyword** (string) - The suggested keyword. - **avg_monthly_searches** (integer) - The average monthly searches for the keyword. - **competition** (string) - The competition level for the keyword (e.g., 'LOW'). - **competition_index** (integer) - The competition index for the keyword. - **low_top_of_page_bid_micros** (integer) - The low end of the top of page bid in micros. - **high_top_of_page_bid_micros** (integer) - The high end of the top of page bid in micros. #### Response Example ```json { "keywords_suggestions": [ { "keyword": "serp api", "avg_monthly_searches": 6600, "competition": "LOW", "competition_index": 36, "low_top_of_page_bid_micros": 1725093, "high_top_of_page_bid_micros": 6214505 } ] } ``` ``` -------------------------------- ### Keywords Search Volume Endpoint Source: https://www.fetchserp.com/api Get search volume data for multiple keywords. Track keyword performance and trends across different countries. Make data-driven content decisions, identify high-value keywords, and optimize your SEO strategy. ```APIDOC ## GET /api/v1/keywords_search_volume ### Description Get search volume data for multiple keywords. Track keyword performance and trends across different countries. ### Method GET ### Endpoint https://www.fetchserp.com/api/v1/keywords_search_volume ### Parameters #### Query Parameters - **keywords** (array of strings) - Required - A list of keywords to get search volume data for. - **country** (string) - Required - The country code for the search volume data (e.g., 'us'). ### Request Example ``` https://www.fetchserp.com/api/v1/keywords_search_volume?keywords[]=serp+api&keywords[]=google+search+api&country=us ``` ### Response #### Success Response (200) - **search_volume** (array) - A list of search volume data for each keyword. - **search_volume[].keyword** (string) - The keyword. - **search_volume[].avg_monthly_searches** (integer) - The average monthly searches for the keyword. - **search_volume[].competition** (string) - The competition level for the keyword (e.g., 'MEDIUM'). - **search_volume[].competition_index** (integer) - The competition index for the keyword. - **search_volume[].low_top_of_page_bid_micros** (integer) - The low end of the top of page bid in micro-currency. - **search_volume[].high_top_of_page_bid_micros** (integer) - The high end of the top of page bid in micro-currency. - **search_volume[].monthly_search_volumes** (array) - Monthly search volumes for the keyword. - **search_volume[].monthly_search_volumes[].year** (integer) - The year. - **search_volume[].monthly_search_volumes[].month** (string) - The month. - **search_volume[].monthly_search_volumes[].monthly_searches** (integer) - The number of monthly searches. #### Response Example ```json { "search_volume": [ { "keyword": "serp api", "avg_monthly_searches": 6600, "competition": "MEDIUM", "competition_index": 36, "low_top_of_page_bid_micros": 1725093, "high_top_of_page_bid_micros": 6214505, "monthly_search_volumes": [ { "year": 2024, "month": "MAY", "monthly_searches": 4400 } ] } ] } ``` ``` -------------------------------- ### Get Domain Information Source: https://www.fetchserp.com/api Retrieve comprehensive domain details including DNS records, WHOIS data, and server information. Useful for domain research and security audits. Requires an API token. ```curl curl -X GET "https://www.fetchserp.com/api/v1/domain_infos" \ -G \ -d 'domain=fetchserp.com' \ -H 'accept: application/json' \ -H 'authorization: Bearer TOKEN' ``` -------------------------------- ### Ranking Endpoint Source: https://www.fetchserp.com/api Get the ranking of a domain for a given keyword on Bing, Yahoo and DuckDuckGo. Monitor your SEO performance, track competitor positions, and identify ranking opportunities. Ideal for SEO agencies managing multiple clients, e-commerce businesses tracking product visibility, and content creators optimizing their reach. ```APIDOC ## GET /api/v1/ranking ### Description Retrieves the search engine ranking position for a specified domain and keyword across different search engines. ### Method GET ### Endpoint /api/v1/ranking ### Parameters #### Query Parameters - **search_engine** (string) - Required - The search engine to use (e.g., duckduckgo, yahoo, bing). - **country** (string) - Required - The country code for the search (e.g., us). - **domain** (string) - Required - The domain to check the ranking for. - **keyword** (string) - Required - The keyword to track. ### Request Example ```json { "example": "curl -X GET \"https://www.fetchserp.com/api/v1/ranking\" \ -G \ -d 'search_engine=duckduckgo' \ -d 'country=us' \ -d 'domain=fetchserp.com' \ -d 'keyword=serp+api' \ -H 'accept: application/json'\ -H 'authorization: Bearer YOUR_API_TOKEN'" } ``` ### Response #### Success Response (200) - **url** (string) - The URL of the domain. - **ranking** (integer) - The ranking position of the domain for the keyword. #### Response Example ```json { "example": "[ { \"url\": \"https://www.fetchserp.com/\", \"ranking\": 1 } ]" } ``` ``` -------------------------------- ### Backlinks API Source: https://www.fetchserp.com/api Get detailed backlink data for any domain. Analyze link profiles, anchor text, and link attributes to improve your SEO strategy. Monitor your backlink growth, identify toxic links, and discover new link building opportunities. ```APIDOC ## GET /api/v1/backlinks ### Description Get detailed backlink data for any domain. Analyze link profiles, anchor text, and link attributes to improve your SEO strategy. Monitor your backlink growth, identify toxic links, and discover new link building opportunities. Perfect for SEO agencies, content marketers, and website owners. Track your link building progress and maintain a healthy backlink profile. ### Method GET ### Endpoint https://www.fetchserp.com/api/v1/backlinks ### Query Parameters - **domain** (string) - Required - The domain to get backlink data for. ### Request Example ```json { "domain": "fetchserp.com" } ``` ### Response #### Success Response (200) - **backlinks_count** (integer) - The total number of backlinks found. - **backlinks** (array) - An array of backlink objects. - **source_url** (string) - The URL of the referring page. - **target_url** (string) - The URL of the page being linked to. - **anchor_text** (string) - The anchor text of the backlink. - **nofollow** (boolean) - Indicates if the backlink has a nofollow attribute. - **rel_attributes** (array of strings) - Any rel attributes associated with the link. - **context_text** (string) - Text surrounding the anchor text. - **source_domain** (string) - The domain of the referring page. - **target_domain** (string) - The domain of the page being linked to. - **page_title** (string) - The title of the referring page. - **meta_description** (string) - The meta description of the referring page. #### Response Example ```json { "backlinks_count": 7, "backlinks": [ { "source_url": "https://www.producthunt.com/products/fetchserp", "target_url": "https://www.fetchserp.com/?ref=producthunt", "anchor_text": "Visit website", "nofollow": false, "rel_attributes": [ "noreferrer" ], "context_text": "Visit websiteFollow", "source_domain": "www.producthunt.com", "target_domain": "www.fetchserp.com", "page_title": "FetchSerp Product Information and Latest Updates (2025) | Product Hunt", "meta_description": "Web scraping, AI analysis, and data extraction API" } ] } ``` ``` -------------------------------- ### Configure Claude Desktop for FetchSERP Source: https://www.fetchserp.com/api Add the FetchSERP MCP server to your Claude Desktop configuration file to enable SEO insights within the chat interface. ```json { "mcpServers": { "fetchserp": { "command": "npx", "args": [ "github:fetchSERP-LLC/fetchserp-mcp-server-node" ], "env": { "FETCHSERP_API_TOKEN": "your_fetchserp_api_token_here" } } } } ``` -------------------------------- ### Configure OpenAI API with MCP Source: https://www.fetchserp.com/api Set environment variables and define the tool configuration to use FetchSERP within OpenAI API requests. ```text MCP_SERVER_URL=https://www.fetchserp.com/mcp FETCHSERP_API_TOKEN=your_fetchserp_api_token_here ``` ```javascript let response = await openai.responses.create({ model: "gpt-4.1", tools: [ { type: "mcp", server_label: "fetchserp", server_url: process.env.MCP_SERVER_URL, headers: { Authorization: `Bearer ${process.env.FETCHSERP_API_TOKEN}` } } ], input: question }); ``` -------------------------------- ### GET /api/v1/page_indexation Source: https://www.fetchserp.com/api Check if a domain is indexed for a specific keyword in search engines. ```APIDOC ## GET /api/v1/page_indexation ### Description Check if a domain is indexed for a specific keyword in search engines to verify content visibility. ### Method GET ### Endpoint https://www.fetchserp.com/api/v1/page_indexation ### Parameters #### Query Parameters - **domain** (string) - Required - The domain to check. - **keyword** (string) - Required - The keyword to verify indexation for. ### Response #### Success Response (200) - **data** (object) - Contains domain, keyword, indexed status, and list of URLs. #### Response Example { "data": { "domain": "fetchserp.com", "keyword": "serp api", "indexed": true, "urls": ["https://www.fetchserp.com/serp-api"] } } ``` -------------------------------- ### Configure Claude API with MCP Source: https://www.fetchserp.com/api Set environment variables and structure the request object to integrate FetchSERP tools into Claude API calls. ```text MCP_SERVER_URL=https://www.fetchserp.com/mcp FETCHSERP_API_TOKEN=your_fetchserp_api_token_here ``` ```javascript const claudeRequest = { model: "claude-sonnet-4-20250514", messages: [ { role: "user", content: question } ], mcp_servers: [ { type: "url", url: process.env.MCP_SERVER_URL, name: "fetchserp", authorization_token: process.env.FETCHSERP_API_TOKEN, tool_configuration: { enabled: true } } ] }; ``` -------------------------------- ### Perform a SERP Search via REST API Source: https://www.fetchserp.com/api Use the FetchSERP REST endpoint to retrieve search engine results. Requires a valid API token in the Authorization header. ```javascript const response = await fetch( 'https://www.fetchserp.com/api/v1/serp?' + new URLSearchParams({ search_engine: 'duckduckgo', country: 'us', pages_number: '1', query: 'serp+api' }), { method: 'GET', headers: { 'accept': 'application/json', 'authorization': 'Bearer TOKEN' } }); const data = await response.json(); console.dir(data, { depth: null }); ``` -------------------------------- ### Execute Playwright MCP Browser Task Source: https://www.fetchserp.com/api Uses natural language prompts to control a headless browser for scraping or automation tasks. ```curl curl -X GET "https://www.fetchserp.com/api/v1/playwright_mcp" \ -G \ -d 'prompt=browse fetchserp.com and get the title' \ -H 'accept: application/json' \ -H 'authorization: Bearer TOKEN' ``` -------------------------------- ### Fetch SERP Results by UUID Source: https://www.fetchserp.com/api Retrieve detailed SERP results, including AI overview and AI mode response, using a previously generated UUID. ```APIDOC ## GET /api/v1/serp_ai/{uuid} ### Description Fetches SERP results using a unique identifier (UUID) obtained from a prior request. This endpoint is useful for retrieving detailed AI-generated content and sources associated with a specific search query. ### Method GET ### Endpoint /api/v1/serp_ai/YOUR_UUID ### Parameters #### Path Parameters - **uuid** (string) - Required - The unique identifier for the SERP results. #### Headers - **accept** (string) - Optional - Specifies the desired response format, typically 'application/json'. - **authorization** (string) - Required - Bearer token for authentication. ### Response #### Success Response (200) - **data** (object) - Contains the SERP results. - **query** (string) - The original search query. - **country** (string) - The country code for the search. - **uuid** (string) - The unique identifier for the results. - **results** (object) - Contains AI-generated content. - **ai_overview** (object) - AI-generated overview of the search query. - **content** (string) - The textual content of the AI overview. - **sources** (array) - List of sources used for the AI overview. - **ai_mode_response** (object) - AI-generated response in AI mode. - **content** (string) - The textual content of the AI mode response. - **sources** (array) - List of sources used for the AI mode response. - **title** (string) - Title of the source. - **url** (string) - URL of the source. - **site_name** (string) - Name of the website. - **description** (string) - Description of the source. - **favicon** (string) - URL of the favicon. - **ranking** (integer) - Ranking of the source. ### Response Example ```json { "data": { "query": "how do pumps work", "country": "us", "uuid": "abc123-def456", "results": { "ai_overview": { "content": "Pumps work by creating pressure differences...", "sources": [] }, "ai_mode_response": { "content": "A pump works by converting energy into fluid movement...", "sources": [ { "title": "How Pumps Work - Wikipedia", "url": "https://en.wikipedia.org/wiki/Pump", "site_name": "Wikipedia", "description": "Comprehensive pump mechanics explanation", "favicon": "https://en.wikipedia.org/favicon.ico", "ranking": 1 } ] } } } } ``` ``` -------------------------------- ### SERP JS Endpoint Source: https://www.fetchserp.com/api Retrieve search engine results with full JavaScript rendering, including AI overview and sources. ```APIDOC ## GET /api/v1/serp_js and GET /api/v1/serp_js/{YOUR_UUID} ### Description Search engine results pages with full JavaScript rendering. Retrieve dynamic SERP data including AI overview, sources, and organic results. Ideal for capturing modern search features and ensuring accuracy when JavaScript execution is required. ### Method GET ### Endpoint - Step 1: `https://www.fetchserp.com/api/v1/serp_js` - Step 2: `https://www.fetchserp.com/api/v1/serp_js/{YOUR_UUID}` ### Query Parameters (Step 1) - **country** (string) - Optional - The country code for the search (e.g., us, gb, de). - **pages_number** (integer) - Optional - The number of pages to retrieve. - **query** (string) - Required - The search query. ### Request Example (Step 1) ```json { "example": "# Step 1: Start the SERP JS job\ncurl -X GET \"https://www.fetchserp.com/api/v1/serp_js\" \ -G \ -d 'country=us' \ -d 'pages_number=1' \ -d 'query=serp+api' \ -H 'accept: application/json'\n -H 'authorization: Bearer YOUR_API_TOKEN'" } ``` ### Request Example (Step 2) ```json { "example": "# Step 2: Get the results using the UUID from step 1\ncurl -X GET \"https://www.fetchserp.com/api/v1/serp_js/YOUR_UUID\" \ -H 'accept: application/json'\n -H 'authorization: Bearer YOUR_API_TOKEN'" } ``` ### Response #### Success Response (200) - **data** (object) - **query** (string) - The search query. - **country** (string) - The country code used for the search. - **results** (object) - **ai_overview** (object) - **content** (string) - The AI overview content. - **sources** (array) - List of sources for the AI overview. - **title** (string) - Title of the source. - **url** (string) - URL of the source. - **site_name** (string) - Name of the site. - **description** (string) - Description of the source. - **ranking** (integer) - Ranking of the source. - **search_results** (array) - List of organic search results. - **site_name** (string) - The name of the website. - **url** (string) - The URL of the search result. - **title** (string) - The title of the search result. - **description** (string) - The description of the search result. - **ranking** (integer) - The ranking of the result. #### Response Example ```json { "data": { "query": "serp api", "country": "us", "results": { "ai_overview": { "content": "SERP APIs allow developers to fetch search results programmatically...", "sources": [ { "title": "fetchSERP - SEO & Web Intelligence API", "url": "https://www.fetchserp.com/", "site_name": "fetchSERP", "description": "Comprehensive SEO & web intelligence API", "ranking": 1 } ] }, "search_results": [ { "site_name": "fetchSERP", "url": "https://www.fetchserp.com/", "title": "SERP API", "description": "Search Engine", "ranking": 1 } ] } } } ``` ``` -------------------------------- ### Get Keywords Search Volume Source: https://www.fetchserp.com/api Retrieve search volume data for multiple keywords across different countries. This is useful for tracking keyword performance, identifying high-value keywords, and optimizing SEO strategies. ```curl curl -X GET "https://www.fetchserp.com/api/v1/keywords_search_volume" \ -G \ -d 'keywords[]=serp+api' \ -d 'keywords[]=google+search+api' \ -d 'country=us' \ -H 'accept: application/json'\ -H 'authorization: Bearer YOUR_API_TOKEN' ``` -------------------------------- ### Get Backlink Data using CURL Source: https://www.fetchserp.com/api Retrieve detailed backlink data for any domain to analyze link profiles, anchor text, and link attributes. This is useful for improving SEO strategy and monitoring backlink growth. ```curl curl -X GET "https://www.fetchserp.com/api/v1/backlinks" \ -G \ -d 'domain=fetchserp.com' \ -H 'accept: application/json'\ -H 'authorization: Bearer YOUR_API_TOKEN' ``` -------------------------------- ### Playwright MCP Endpoint API Source: https://www.fetchserp.com/api Remotely control a headless browser using natural-language prompts. This endpoint passes your prompt to GPT-4.1, which then decides how to navigate, click, type, and scrape, returning the final answer. It's ideal for scraping dynamic websites, automating user flows, or testing complex pages without needing to run Playwright yourself. ```APIDOC ## GET /api/v1/playwright_mcp ### Description Remote Control a headless browser with natural-language prompts. The Playwright MCP endpoint passes your prompt to GPT-4.1, which decides how to navigate, click, type and scrape, returning the final answer. Ideal for scraping dynamic sites, automating user flows, or testing complex pages without running Playwright yourself. ### Method GET ### Endpoint https://www.fetchserp.com/api/v1/playwright_mcp ### Query Parameters - **prompt** (string) - Required - The natural language prompt for browser interaction (e.g., 'browse fetchserp.com and get the title'). ### Request Headers - **accept**: application/json - **authorization**: Bearer TOKEN ### Request Example ```bash curl -X GET "https://www.fetchserp.com/api/v1/playwright_mcp" \ -G \ -d 'prompt=browse fetchserp.com and get the title' \ -H 'accept: application/json' \ -H 'authorization: Bearer TOKEN' ``` ### Response #### Success Response (200) - **data** (object) - **response** (string) - The result of the browser interaction or scraping. #### Response Example ```json { "data": { "response": "Login button clicked successfully." } } ``` ``` -------------------------------- ### SEO Analysis API Source: https://www.fetchserp.com/api Get comprehensive SEO analysis for any web page. Analyze meta tags, headings, content structure, and technical SEO elements. Perfect for content optimization, technical SEO audits, and competitive analysis. ```APIDOC ## GET /api/v1/web_page_seo_analysis ### Description Get comprehensive SEO analysis for any web page. Analyze meta tags, headings, content structure, and technical SEO elements. Perfect for content optimization, technical SEO audits, and competitive analysis. Monitor your SEO performance, identify improvement opportunities, and maintain best practices across your website. ### Method GET ### Endpoint https://www.fetchserp.com/api/v1/web_page_seo_analysis ### Query Parameters - **url** (string) - Required - The URL of the web page to analyze. ### Request Example ```json { "url": "https://fetchserp.com/" } ``` ### Response #### Success Response (200) - **analysis** (object) - An object containing the SEO analysis results. - **title** (string) - The title of the web page. - **title_length** (integer) - The length of the page title. - **meta_description** (string) - The meta description of the web page. - **meta_description_length** (integer) - The length of the meta description. - **title_contains_keyword** (boolean) - Indicates if the title contains a target keyword. - **description_contains_keyword** (boolean) - Indicates if the meta description contains a target keyword. - **canonical_url** (string|null) - The canonical URL of the page. - **robots_meta** (string|null) - The content of the robots meta tag. - **noindex_detected** (boolean|null) - Indicates if a noindex directive is detected. - **nofollow_detected** (boolean|null) - Indicates if a nofollow directive is detected. #### Response Example ```json { "analysis": { "title": "fetchSERP - SEO & Web Intelligence Toolkit API", "title_length": 46, "meta_description": "FetchSERP API: Comprehensive SEO & web intelligence toolkit with search engine results, domain rankings, backlinks analysis, keyword research, and web scraping capabilities. Access data from Bing, Yahoo and DuckDuckGo. Fast, reliable API with low-latency endpoints and simple integration. Start with 250 free credits.", "meta_description_length": 326, "title_contains_keyword": false, "description_contains_keyword": true, "canonical_url": null, "robots_meta": null, "noindex_detected": null, "nofollow_detected": null } } ``` ```