Nodeshub
  • Docs
  • Pricing
  • Become Affiliate
  • Use in your AI CLIClaude Code
Try for free
    Nodeshub
    • Docs
    • Pricing
    • Become Affiliate
    • Use in your AI CLIClaude Code
    Try for free
    Nodeshub
    • Docs
    • Pricing
    • Become Affiliate
    • Use in your AI CLIClaude Code
    Try for free
    HomeDocs
    HomeDocs

    Documentation

    General

    API Endpoints

    What is Nodeshub?

    Nodeshub is a powerful API that delivers structured data from Google search results. Instead of complicated scraping, you get ready-to-use JSON data in seconds. Perfect for SEO analysis, competitor monitoring, market research, and marketing automation.

    Quick Start

    Method 1: API Playground

    The fastest way to try Nodeshub — no setup required. You get 100 free crawls instantly.

    1. Go to nodeshub.io and scroll to the API Playground section
    2. Your API key is generated automatically — copy it from the bottom of the playground
    3. Type a keyword (e.g. "best crm tools") and click Run
    4. See the structured JSON response in real time — organic results, People Also Ask, Knowledge Graph, and more
    5. Switch between tabs to test SERPdata, Query fan-out, and Intent Classifier

    Important — save your API key!

    • Your API key with 100 free crawls is generated automatically in the playground
    • If you need more crawls, purchase a paid plan — tokens will be added to the same key
    • Copy the key and store it somewhere safe (password manager, .env file, notes app)
    • The key is tied to your browser session — if you switch browsers or clear cookies, you won't be able to access it from the playground anymore
    • There is no user panel, no accounts, and no password recovery — your saved key is the only way to access your balance

    Method 2: cURL / Command Line

    Use your API key to make requests directly from the terminal. Replace YOUR_API_KEY with your actual key.

    curl -X GET "https://api.nodeshub.io/v1/search" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -d "keyword=pizza warszawa" \
      -d "gl=pl" \
      -d "hl=pl" \
      -d "device=desktop"

    Parameters explained:

    • keyword — the search query you want to analyze
    • gl — country code for Google results (e.g. "us", "pl", "de")
    • hl — language code for the interface (e.g. "en", "pl", "de")
    • device — "desktop" or "mobile"

    The response is a JSON object containing organic results, SERP features, rankings, snippets, and more. See the Response Structure section for full details.

    Method 3: n8n / Make.com / Zapier (No-Code)

    Connect Nodeshub to no-code platforms like n8n, Make.com, or Zapier using a simple HTTP request node with your API key. Perfect for scheduled SERP monitoring, automated reports, and competitive analysis.

    For step-by-step setup instructions for each platform, see the No-Code Automations section below.

    Pricing & Plans

    Starter

    Try-it-out plan. No strings attached.

    Free/100 tokens

    Lite

    Perfect for small projects and testing

    $19/5000 tokens

    Basic

    Great for regular use and medium-sized projects

    $99/40 000 tokens

    BigData

    Ideal for large-scale analysis and heavy usage

    $299/175 000 tokens

    Authorization

    How to get your API key:

    1. Visit nodeshub.io
    2. See API playground
    3. Click "Copy to clipboard" next to API key field
    4. Instantly get:
      • 100 free crawls
      • Ready-to-use cURL command
      • Sample API response

    Basic Authorization:

    Header format:

    Authorization: Bearer YOUR_API_KEY

    API Key Security Guidelines:

    • Never share publicly
    • Use environment variables in production
    • Keep safe - key tied to browser session
    • Monitor usage on nodeshub.io

    Key Features:

    • No email verification
    • No credit card required
    • No registration forms
    • Instant API access
    • 100 free crawls

    MCP – Claude Desktop Integration

    Use Nodeshub directly inside Claude Desktop with the Model Context Protocol (MCP). Search Google, analyze SERPs, and get structured data without leaving your conversation.

    1. Get your API key

    Visit nodeshub.io and copy your API key from the playground. You get 100 free crawls instantly.

    2. Open Claude Desktop config

    Open the configuration file for your OS:

    macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    Windows: %APPDATA%\Claude\claude_desktop_config.json

    3. Add MCP configuration

    Add this to your config file:

    {
      "mcpServers": {
        "nodeshub": {
          "command": "npx",
          "args": ["-y", "nodeshub-mcp"],
          "env": {
            "NODESHUB_API_KEY": "your-api-key-here"
          }
        }
      }
    }

    4. Start using

    Restart Claude Desktop and start using Nodeshub in your conversations. Try asking:

    • "Search Google for best pizza in Warsaw and analyze the results"
    • "Check what SERP features appear for keyword 'iPhone 16 review'"
    • "Track my domain position for 'web development courses'"

    No-Code Automations

    Connect Nodeshub to your favorite automation tools. Schedule SERP checks, build reports, and monitor competitors — without writing a single line of code.

    n8n

    Open-source workflow automation. Add an HTTP Request node, point it at Nodeshub, and connect to 400+ integrations.

    1. Add a Schedule Trigger node (e.g. daily or weekly)
    2. Add an HTTP Request node
    3. Set method to GET, URL: https://api.nodeshub.io/v1/search
    4. Add header: Authorization: Bearer YOUR_API_KEY
    5. Add query parameters: keyword, hl, gl, device
    6. Process the JSON response with a Set or Function node
    7. Send results to Google Sheets, Slack, Email, or any other integration

    Make.com

    Visual automation platform. Use the HTTP module to call Nodeshub and route SERP data to any app.

    1. Create a new scenario with a Schedule or Webhook trigger
    2. Add an HTTP module → Action: "Make a request"
    3. URL: https://api.nodeshub.io/v1/search?keyword=YOUR_KEYWORD&hl=en&gl=us
    4. Method: GET
    5. Headers: Authorization: Bearer YOUR_API_KEY
    6. Add a JSON module to parse the response
    7. Route data to Airtable, Notion, CRM, or any other module

    Zapier

    Connect Nodeshub to 6,000+ apps. Use Webhooks by Zapier to call the API and trigger downstream actions.

    1. Create a new Zap with a Schedule by Zapier or Webhook trigger
    2. Add a Webhooks by Zapier action → Event: "GET"
    3. URL: https://api.nodeshub.io/v1/search?keyword=YOUR_KEYWORD&hl=en&gl=us
    4. Headers: Authorization | Bearer YOUR_API_KEY
    5. Optionally add a Filter step to check for specific conditions
    6. Add a Formatter step to extract and format the data you need
    7. Send results to any connected app — Google Sheets, Slack, HubSpot, Mailchimp, and more

    SEO Skills

    An open-source toolkit of ready-made SEO skills for Claude Code, Gemini CLI, or any AI CLI. Clone the repo, type a slash command, and get structured SEO results instantly.

    Quick Start

    1. Clone the repository:
      git clone https://github.com/nodes-hub/nodeshub_seo_skills.git
    2. Set your Nodeshub API key as an environment variable:
      export NODESHUB_API_KEY=your-api-key-here
    3. Use skills directly in your AI CLI with slash commands

    Available Skills

    12 ready-made skills covering common SEO workflows:

    /nod_keyword-research

    Keyword clustering and intent analysis

    /nod_serp-analysis

    Analyze SERP features and competition

    /nod_content-brief

    Generate content briefs from SERP data

    /nod_rank-tracker

    Track keyword positions over time

    /nod_competitor-check

    Monitor competitor SERP presence

    /nod_paa-extractor

    Extract People Also Ask questions

    See the full list and documentation on GitHub, or visit the SEO Skills page.

    Example Usage

    In Claude Code or any compatible AI CLI:

    > /nod_keyword-research "best CRM tools"
    
    ✓ 52 keywords found
    ✓ 7 clusters identified
    ✓ Intent mapped for each keyword
    ✓ Search volume & difficulty estimated

    Error Codes

    CodeMeaningSolution
    400Bad RequestCheck query parameters (keyword, gl, hl)
    401UnauthorizedCheck Authorization: Bearer YOUR_API_KEY
    429Too Many RequestsSlow down request rate or upgrade plan
    500Internal Server ErrorTry again later

    API Endpoints

    API Query

    Endpoint: https://api.nodeshub.io/v1/search

    Request Structure:

    GET https://api.nodeshub.io/v1/search?keyword=pizza+warszawa&hl=pl&gl=pl&device=desktop
    Authorization: Bearer YOUR_API_KEY

    Query Parameters

    Required Parameters:

    ParameterTypeDescriptionExample
    keywordStringSearch phrase"best+programming+courses"

    Optional Parameters:

    ParameterTypeDescriptionExample Values
    hlStringInterface language"en", "pl", "de", "fr", "es"
    glStringGeographic location (country)"us", "pl", "de", "uk", "fr"
    deviceStringDevice type"desktop", "mobile"
    numIntegerNumber of results Currently unavailable10, 20, 30, 50, 100

    Important Note: The num parameter is temporarily unavailable due to Google API changes. All queries currently return the default number of results (around 10).

    Use Cases

    SEO Analysis

    • Track rankings
    • Analyze SERP features

    Competitor Monitoring

    • Monitor competitor positions
    • Analyze competitor strategies

    Content Strategy

    • Find related searches
    • Discover popular questions

    Market Research

    • Analyze product trends
    • Investigate pricing dynamics

    Automation

    • Integrate with existing tools
    • Create workflow pipelines

    Response Structure

    Top level: data, totalResponseTime. Snippets live under data.results.snippets (not snippets_data). Organic results use pos, url, domain, description.

    {
      "data": {
        "success": true,
        "search_engine": "google",
        "location": "pl",
        "language": "pl",
        "timestamp": "2026-02-26T12:00:00Z",
        "results": {
          "query": "pizza warszawa",
          "organic_results": [
            {
              "pos": 1,
              "global_pos": 2,
              "title": "Best pizza in Warsaw - 24/7 Delivery",
              "url": "https://pizzawarszawa.pl",
              "domain": "pizzawarszawa.pl",
              "description": "Best pizza in Warsaw with home delivery..."
            }
          ],
          "snippets": {
            "people_also_ask": { "questions": [], "rank_absolute": 3 },
            "related_searches": { "queries": [], "rank_absolute": 12 },
            "ai_overview": {},
            "local_pack": [],
            "ads": []
          },
          "snippets_found": []
        }
      },
      "totalResponseTime": 1240
    }

    Use response.data.results.snippets.people_also_ask, response.data.results.snippets.related_searches, etc. Metadata is in data (location, language, timestamp).

    Snippets – your window to Google

    Snippets are SERP elements returned under data.results.snippets. Which keys are present depends on the query. You can check data.results.snippets_found (array of names) to see which snippets were found for your request.

    AI Overviews

    An AI-generated summary by Google that provides a synthesized answer to a user's query.

    Business Use Cases:

    • Understand search intent
    • Monitor how AI summaries affect click-through rate (CTR)
    • Create E-E-A-T optimized content
    • Track AI content patterns and sources
    • Optimize for AI Overview inclusion

    JSON Preview

    {
      "ai_overview": {
        "has_listen_button": false,
        "rank_absolute": 1,
        "sources": [
          {
            "display_url": "Facebook Business",
            "rank_inner": 1,
            "snippet": "Facebook advertising helps businesses...",
            "title": "Facebook Advertising Guide",
            "url": "https://www.facebook.com/business/ads"
          }
        ],
        "status": "success",
        "text": "Facebook advertising allows businesses to target specific..."
      }
    }

    Ads

    Paid Google Advertisements that appear at the top of search results.

    Business Applications:

    • Monitor advertising competition
    • Analyze competitor pricing strategies
    • Track companies paying for specific keywords
    • Analyze ad titles and descriptions
    • Plan Google Ads campaigns

    JSON Preview

    {
      "ads": [
        {
          "description": "Order The New Galaxy S25 Ultra...",
          "display_url": "https://www.samsung.com",
          "rank_absolute": 1,
          "rating": {
            "reviews": null,
            "stars": null
          },
          "sitelinks": [
            { "title": "Shop Now", "url": "https://..." }
          ]
        }
      ]
    }

    People Also Ask

    A dynamic section showing related questions that users frequently ask.

    Business Use Cases:

    • Understand user search intent
    • Discover content ideas
    • Identify common user questions
    • Optimize content for long-tail keywords
    • Improve FAQ and help center content

    JSON Preview

    {
      "people_also_ask": {
        "questions": [
          { "rank_inner": 1, "text": "How do Facebook ads work?", "expanded": false },
          { "rank_inner": 2, "text": "What is the best audience for ads?", "expanded": false }
        ],
        "rank_absolute": 3
      }
    }

    Knowledge Graph

    A Google feature that provides quick, structured information about entities like people, places, or things.

    Business Use Cases:

    • Understand entity relationships
    • Track brand knowledge representation
    • Analyze semantic search capabilities
    • Optimize content for knowledge panel inclusion

    JSON Preview

    {
      "knowledge_graph": {
        "title": "OpenAI",
        "subtitle": "Artificial intelligence company",
        "description": "OpenAI is an American AI research organization...",
        "image_url": "https://...",
        "attributes": {
          "Founded": "December 11, 2015",
          "Headquarters": "San Francisco, California",
          "CEO": "Sam Altman"
        },
        "rank_absolute": 1
      }
    }

    Local Pack

    A map-based snippet showing local businesses related to a search query. Access via data.results.snippets.local_pack.

    Business Use Cases:

    • Local SEO analysis
    • Competitor location tracking
    • Understanding geographic business visibility
    • Local market research

    JSON Preview

    {
      "local_pack": [
        {
          "title": "Best Pizza Warsaw",
          "address": "ul. Marszalkowska 12, Warsaw",
          "phone": "+48 22 123 4567",
          "rating": 4.5,
          "reviews_count": 120,
          "website": "https://bestpizzawarsaw.pl",
          "open_now": true,
          "rank_inner": 1
        }
      ]
    }

    Things to Know

    Quick answers to popular questions related to the query. Access via data.results.snippets.things_to_know.

    • Identify key aspects of a topic
    • Create landing pages that answer key questions
    • Optimize content for featured snippets

    JSON Preview

    {
      "things_to_know": {
        "items": [
          {
            "title": "Types of pizza ovens",
            "snippet": "The main types include wood-fired, gas, and electric...",
            "url": "https://...",
            "rank_inner": 1
          }
        ],
        "rank_absolute": 5
      }
    }

    Related Searches

    Related searches suggested by Google at the bottom of results. Use data.results.snippets.related_searches.queries.

    • Automated keyword research
    • Discovering long-tail keywords
    • Planning site structure

    JSON Preview

    {
      "related_searches": {
        "queries": [
          "best pizza delivery warsaw",
          "pizza near me open now",
          "neapolitan pizza warsaw",
          "pizza warszawa ranking"
        ],
        "rank_absolute": 12
      }
    }

    Perspectives

    Posts and insights from Reddit, YouTube, Quora, etc. Access via data.results.snippets.perspectives.

    • Analyze user-generated feedback
    • Track brand sentiment
    • Identify influencers and discussions

    JSON Preview

    {
      "perspectives": [
        {
          "source": "Reddit",
          "author": "u/pizzalover",
          "title": "Best pizza spots in Warsaw - my top picks",
          "snippet": "After trying 50+ places, here are my favorites...",
          "url": "https://reddit.com/r/warsaw/...",
          "votes": 245,
          "date": "3 weeks ago",
          "rank_inner": 1
        }
      ]
    }

    Refine Chips

    Chips under the search bar for quick narrowing (e.g. "Under $500", "On sale"). Use for long-tail keyword research via data.results.snippets.refine_chips.

    JSON Preview

    {
      "refine_chips": [
        { "label": "On sale", "url": "https://google.com/search?q=...&tbs=..." },
        { "label": "Under $500", "url": "https://google.com/search?q=..." },
        { "label": "Free shipping", "url": "https://google.com/search?q=..." },
        { "label": "4+ stars", "url": "https://google.com/search?q=..." }
      ]
    }

    Recipe Results

    Recipe cards with ingredients, time, rating. Access via data.results.snippets.recipes_results. Ideal for food blogs and recipe SEO.

    JSON Preview

    {
      "recipes_results": [
        {
          "title": "Classic Margherita Pizza",
          "source": "Bon Appetit",
          "rating": 4.8,
          "reviews_count": 340,
          "total_time": "45 min",
          "ingredients": ["flour", "mozzarella", "tomato sauce", "basil"],
          "thumbnail_url": "https://...",
          "url": "https://...",
          "rank_inner": 1
        }
      ]
    }

    Featured Snippets

    Highlighted answer box at the top of search results with extracted content. Access via data.results.snippets.featured_snippets.

    • Track position zero rankings
    • Analyze featured snippet content structure
    • Identify paragraph, list, and table snippet types

    JSON Preview

    {
      "featured_snippets": [
        {
          "type": "paragraph",
          "title": "What is SEO?",
          "description": "Search engine optimization is the process of...",
          "url": "https://...",
          "display_url": "example.com › seo-guide",
          "rank_absolute": 1,
          "rank_inner": 1
        }
      ]
    }

    Top Stories

    Recent news articles related to the search query. Access via data.results.snippets.top_stories.

    • News monitoring and media tracking
    • Trending topic identification
    • Content freshness analysis

    JSON Preview

    {
      "top_stories": [
        {
          "rank_absolute": 6,
          "stories": [
            {
              "title": "Here's how the new Samsung Galaxy S26 compares...",
              "source": "The Verge",
              "url": "https://www.theverge.com/...",
              "published": "19 hours ago",
              "is_live": false,
              "rank_inner": 1
            }
          ]
        }
      ]
    }

    Videos Pack

    Video results carousel from YouTube and other sources. Access via data.results.snippets.videos_pack.

    • Video content strategy insights
    • Competitor video analysis
    • Track video ranking positions

    JSON Preview

    {
      "videos_pack": [
        {
          "rank_absolute": 3,
          "title": "Videos",
          "videos": [
            {
              "title": "Python Full Course for Beginners",
              "channel": "Programming with Mosh",
              "duration": "6:14:07",
              "source": "YouTube",
              "published": "Feb 18, 2019",
              "url": "https://www.youtube.com/watch?v=...",
              "rank_inner": 1
            }
          ]
        }
      ]
    }

    Popular Products

    Product carousels with prices, ratings, and merchant info. Access via data.results.snippets.popular_products.

    • Monitor competitor pricing
    • Track product availability and ratings
    • Analyze merchant distribution

    JSON Preview

    {
      "popular_products": [
        {
          "products": [
            {
              "title": "Nike Air Max SC Men's",
              "price": 94.99,
              "merchant": "DICK'S Sporting Goods",
              "delivery_info": "Free delivery",
              "discount_percent": null,
              "rating": { "stars": 4.6, "reviews": 5100 },
              "rank_inner": 1
            }
          ]
        }
      ]
    }

    Images Pack

    Image results carousel embedded in search results. Access via data.results.snippets.images_pack.

    • Track image search visibility
    • Monitor visual content rankings
    • Analyze image SEO opportunities

    JSON Preview

    {
      "images_pack": [
        {
          "images": [
            {
              "title": "Nike Air Max 90 By You Custom Men's Shoes",
              "alt_text": "Nike Air Max 90 By You Custom Men's Shoes",
              "source": "Nike",
              "url": "https://www.nike.com/...",
              "rank_inner": 1
            }
          ]
        }
      ]
    }

    Discussions & Forums

    Forum posts and community discussions from Reddit, Quora, and other platforms. Access via data.results.snippets.discussions_and_forums.

    • Monitor community sentiment
    • Identify user pain points and needs
    • Find content opportunities from real discussions

    JSON Preview

    {
      "discussions_and_forums": [
        {
          "answer_count_text": "80+ comments",
          "details": "r/samsung · 80+ comments · 1 month ago",
          "rank_inner": 1
        }
      ]
    }

    Scholarly Articles

    Academic papers from Google Scholar embedded in search results. Access via data.results.snippets.scholarly_articles.

    • Monitor academic discourse in your industry
    • Track research trends and citations
    • Identify authoritative sources for content

    JSON Preview

    {
      "scholarly_articles": [
        {
          "title": "A review of the final US Climate Change...",
          "citation_text": "National Research Council",
          "cited_by_text": "Cited by 1381",
          "url": "https://scholar.google.com/...",
          "rank_absolute": 13
        }
      ]
    }

    Product Info Right

    Detailed product panel on the right side of results with description, filters, and merchant offers. Access via data.results.snippets.product_info_right.

    • Monitor product detail visibility
    • Track pricing across merchants
    • Analyze product filters shown by Google

    JSON Preview

    {
      "product_info_right": {
        "description": "Discover the Samsung Galaxy S25 5G...",
        "filters": ["Color", "Storage"],
        "offers": [
          {
            "seller": "AT&T",
            "price": "$15.99",
            "condition": "New",
            "url": "https://www.att.com/..."
          },
          {
            "seller": "Samsung",
            "price": "$799.99",
            "condition": "New",
            "url": "https://www.samsung.com/..."
          }
        ]
      }
    }

    People Also Search Products

    Related product suggestions shown for product queries. Access via data.results.snippets.people_also_search_products.

    • Discover related products in your market
    • Track cross-product shopping behavior
    • Identify competitor product positioning

    JSON Preview

    {
      "people_also_search_products": [
        {
          "products": [
            {
              "name": "Samsung Galaxy S25+",
              "image_url": "https://...",
              "position": 1,
              "url": "https://google.com/search?q=..."
            }
          ]
        }
      ]
    }

    Stores Nearby

    Local store listings with availability for product queries. Access via data.results.snippets.stores_nearby.

    • Track local product availability
    • Monitor brick-and-mortar competitors
    • Analyze local vs online presence

    JSON Preview

    {
      "stores_nearby": [
        {
          "store_name": "Best Buy",
          "address": "123 Main St",
          "availability": "In stock",
          "price": "$799.99"
        }
      ]
    }

    Organic Results – TOP 10 analysis

    Organic results are in data.results.organic_results. Each item has pos, global_pos, title, url, domain, description.

    1. Position tracking

    // Track your website position for target keywords
    function trackPosition(targetDomain, searchResults) {
        const organicResults = searchResults.data.results.organic_results;
    
        const position = organicResults.findIndex(result =>
            result.url.includes(targetDomain)
        ) + 1;
    
        if (position > 0) {
            console.log(`Your domain ranks at position ${position}`);
    
            // Analyze competitors above you
            const betterResults = organicResults.slice(0, position - 1);
            console.log('Competitors ranking higher:');
            betterResults.forEach((result, index) => {
                console.log(`${index + 1}. ${result.title} - ${result.url}`);
            });
    
            return position;
        } else {
            console.log('Your domain not found in top results');
            return null;
        }
    }
    
    // Usage example
    const myPosition = trackPosition('mywebsite.com', searchResponse);

    2. SERP features analysis

    // Analyze SERP features for keyword difficulty assessment
    function analyzeSerpFeatures(searchResponse) {
        const features = searchResponse.data.results.snippets_found || [];
    
        console.log('SERP Features detected:', features);
    
        // Calculate keyword difficulty based on features
        let difficulty = 'Easy';
    
        if (features.includes('knowledge_graph')) {
            difficulty = 'Hard';
            console.log('Knowledge Graph detected - High competition');
        }
    
        if (features.includes('ai_overview')) {
            difficulty = 'Very Hard';
            console.log('AI Overview present - Very high competition');
        }
    
        if (features.includes('videos_pack')) {
            console.log('Video results present - Consider video content');
        }
    
        if (features.includes('popular_products')) {
            console.log('Shopping results - Commercial intent keyword');
        }
    
        return {
            difficulty,
            features,
            recommendations: generateRecommendations(features)
        };
    }
    
    function generateRecommendations(features) {
        const recommendations = [];
    
        if (features.includes('people_also_ask')) {
            recommendations.push('Create FAQ content addressing PAA questions');
        }
    
        if (features.includes('videos_pack')) {
            recommendations.push('Develop video content strategy');
        }
    
        if (features.includes('related_searches')) {
            recommendations.push('Target related search terms for long-tail SEO');
        }
    
        return recommendations;
    }

    3. Competitor analysis

    // Comprehensive competitor analysis
    function analyzeCompetitors(searchResults) {
        const organicResults = searchResults.data.results.organic_results;
    
        // Domain frequency analysis
        const domainStats = {};
        organicResults.forEach((result, index) => {
            const domain = result.domain;
            if (!domainStats[domain]) {
                domainStats[domain] = {
                    positions: [],
                    titles: [],
                    descriptions: [],
                    averagePosition: 0
                };
            }
    
            domainStats[domain].positions.push(index + 1);
            domainStats[domain].titles.push(result.title);
            domainStats[domain].descriptions.push(result.description);
        });
    
        // Calculate average positions
        Object.keys(domainStats).forEach(domain => {
            const positions = domainStats[domain].positions;
            domainStats[domain].averagePosition =
                positions.reduce((a, b) => a + b, 0) / positions.length;
        });
    
        // Sort by average position (best first)
        const sortedCompetitors = Object.entries(domainStats)
            .sort(([, a], [, b]) => a.averagePosition - b.averagePosition);
    
        console.log('Top competitors:');
        sortedCompetitors.slice(0, 5).forEach(([domain, stats], index) => {
            console.log(`${index + 1}. ${domain}`);
            console.log(`   Average position: ${stats.averagePosition.toFixed(1)}`);
            console.log(`   Appears in positions: ${stats.positions.join(', ')}`);
            console.log(`   Sample titles: ${stats.titles.slice(0, 2).join(' | ')}`);
        });
    
        return sortedCompetitors;
    }
    
    // Usage
    const competitors = analyzeCompetitors(searchResponse);

    Pro Tips

    Query strategy

    • Batch requests – group similar keywords to reduce calls
    • Match gl/hl – use parameters that match your target market
    • Monitor usage – stay within your plan limits

    Handle responses efficiently

    • Parse only the snippet types you need
    • Cache results for frequently checked phrases
    • Implement retry logic for failed requests

    Scale your applications

    • Use webhooks for real-time monitoring
    • Implement queuing for high-volume requests
    • Track crawl consumption and upgrade when needed

    Data analysis best practices

    • Focus on trends over time, not single snapshots
    • Combine SERP data with your analytics
    • Automate alerts for significant ranking changes

    Code Examples

    cURL

    curl -X GET "https://api.nodeshub.io/v1/search" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -d "keyword=pizza warszawa" \
      -d "gl=pl" \
      -d "hl=pl" \
      -d "device=desktop"

    JavaScript/Node.js

    const API_KEY = process.env.NODESHUB_API_KEY;
    
    const response = await fetch(
      'https://api.nodeshub.io/v1/search?keyword=pizza+warszawa&hl=pl&gl=pl',
      { headers: { 'Authorization': `Bearer ${API_KEY}` } }
    );
    const data = await response.json();
    const organic = data?.data?.results?.organic_results ?? [];
    const related = data?.data?.results?.snippets?.related_searches?.queries ?? [];

    Python

    import os
    import requests
    
    url = "https://api.nodeshub.io/v1/search"
    headers = {"Authorization": f"Bearer {os.environ.get('NODESHUB_API_KEY')}"}
    params = {"keyword": "pizza warszawa", "gl": "pl", "hl": "pl"}
    
    response = requests.get(url, headers=headers, params=params)
    data = response.json()
    organic = data.get("data", {}).get("results", {}).get("organic_results", [])
    related = (data.get("data", {}).get("results", {}).get("snippets", {}) or {}).get("related_searches", {}).get("queries", [])

    PHP

    $url = 'https://api.nodeshub.io/v1/search?' . http_build_query([
      'keyword' => 'pizza warszawa', 'gl' => 'pl', 'hl' => 'pl'
    ]);
    $ctx = stream_context_create([
      'http' => [
        'header' => 'Authorization: Bearer ' . getenv('NODESHUB_API_KEY')
      ]
    ]);
    $data = json_decode(file_get_contents($url, false, $ctx), true);
    $organic = $data['data']['results']['organic_results'] ?? [];
    $related = $data['data']['results']['snippets']['related_searches']['queries'] ?? [];

    Frequently Asked Questions

    Nodeshub

    Senuto Sp. z o.o.

    ul. Dominikańska 13

    02-738 Warszawa

    VAT ID: PL9512367837

    Products

    • NodesHub.io

    Additional services

    • Senuto
    • Enterprise Products

    Help

    • Terms of Service
    • Privacy Policy

    © 2026 Senuto. All rights reserved.