Developer Favorite
Open Source

n8n Integration

Build powerful, self-hosted automation workflows with SearchHive and n8n. Create custom nodes, deploy on your own infrastructure, and maintain full control over your data.

Custom SearchHive Nodes

Pre-built nodes for all SearchHive APIs

SwiftSearch, ScrapeForge, and DeepDive nodes
Drag-and-drop interface
Built-in error handling
Parameter validation

Self-hosted Freedom

Full control over your automation infrastructure

Deploy on your own servers
Complete data privacy
Custom modifications
No vendor lock-in

Developer Community

Open-source community and extensibility

Active community support
Custom node development
Regular updates
Free forever
What you'll build
Self-hosted automation workflows that search the web, scrape content, conduct research, and integrate with your existing tools - all with complete control over your data and infrastructure.

Setup Instructions

1Install n8n with Docker

Deploy n8n with Docker for easy setup and scalability. This configuration includes custom node support.

docker-compose.yml

YAML
version: '3.8'
services:
  n8n:
    image: docker.n8n.io/n8nio/n8n
    restart: always
    ports:
      - "5678:5678"
    environment:
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_BASIC_AUTH_USER=admin
      - N8N_BASIC_AUTH_PASSWORD=your_password_here
      - N8N_HOST=localhost
      - N8N_PORT=5678
      - N8N_PROTOCOL=http
      - WEBHOOK_URL=http://localhost:5678/
      # Custom nodes path
      - N8N_CUSTOM_EXTENSIONS=/home/node/custom-nodes
    volumes:
      - n8n_data:/home/node/.n8n
      # Mount custom SearchHive nodes
      - ./custom-nodes:/home/node/custom-nodes
    networks:
      - n8n-network

  # Optional: PostgreSQL for production
  postgres:
    image: postgres:13
    restart: always
    environment:
      - POSTGRES_USER=n8n
      - POSTGRES_PASSWORD=n8n_password
      - POSTGRES_DB=n8n
    volumes:
      - postgres_data:/var/lib/postgresql/data
    networks:
      - n8n-network

volumes:
  n8n_data:
  postgres_data:

networks:
  n8n-network:
    driver: bridge

Quick Start Commands:

$ docker-compose up -d
$ open http://localhost:5678
2Install SearchHive Nodes

Install the custom SearchHive nodes for seamless integration with all APIs.

Option A: Community Package

Install from n8n community package registry.

npm install n8n-nodes-searchhive

Option B: Manual Installation

Clone and build the nodes yourself.

Note: Custom nodes require n8n restart after installation. Make sure to restart your n8n instance to load the new SearchHive nodes.

3Configure SearchHive Credentials

Set up your SearchHive API credentials in n8n for secure authentication.

Credentials Setup:

  1. Go to n8n Settings → Credentials
  2. Click "Create New" → "SearchHive API"
  3. Enter your SearchHive API key
  4. Test the connection
  5. Save for use across all workflows

Custom Node Development

Learn how to create and customize SearchHive nodes for n8n to fit your specific use cases.

SearchHive Node Structure

SearchHive SwiftSearch Node Implementation

TypeScript
// SearchHive SwiftSearch Node Structure
export class SearchHiveSwiftSearch implements INodeType {
  description: INodeTypeDescription = {
    displayName: 'SearchHive SwiftSearch',
    name: 'searchHiveSwiftSearch',
    icon: 'file:searchhive.svg',
    group: ['input'],
    version: 1,
    subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
    description: 'Interact with SearchHive SwiftSearch API',
    defaults: {
      name: 'SearchHive SwiftSearch',
    },
    inputs: ['main'],
    outputs: ['main'],
    credentials: [
      {
        name: 'searchHiveApi',
        required: true,
      },
    ],
    properties: [
      {
        displayName: 'Query',
        name: 'query',
        type: 'string',
        default: '',
        placeholder: 'Enter search query',
        description: 'The search query to execute',
        required: true,
      },
      {
        displayName: 'Max Results',
        name: 'maxResults',
        type: 'number',
        default: 10,
        description: 'Maximum number of results to return',
      },
      {
        displayName: 'Auto Scrape',
        name: 'autoScrape',
        type: 'boolean',
        default: false,
        description: 'Whether to automatically scrape result pages',
      },
      {
        displayName: 'Extract Contacts',
        name: 'extractContacts',
        type: 'boolean',
        default: false,
        description: 'Whether to extract contact information',
      }
    ],
  };

  async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
    const items = this.getInputData();
    const returnData: INodeExecutionData[] = [];
    
    for (let i = 0; i < items.length; i++) {
      try {
        const query = this.getNodeParameter('query', i) as string;
        const maxResults = this.getNodeParameter('maxResults', i) as number;
        const autoScrape = this.getNodeParameter('autoScrape', i) as boolean;
        const extractContacts = this.getNodeParameter('extractContacts', i) as boolean;

        const credentials = await this.getCredentials('searchHiveApi');
        
        const options: OptionsWithUri = {
          method: 'POST',
          uri: 'https://www.searchhive.dev/api/v1/swiftsearch',
          headers: {
            'Authorization': 'Bearer ' + credentials.apiKey,
            'Content-Type': 'application/json',
          },
          body: {
            query,
            max_results: maxResults,
            auto_scrape: autoScrape,
            extract_contacts: extractContacts,
          },
          json: true,
        };

        const response = await this.helpers.request(options);
        
        returnData.push({
          json: response,
          pairedItem: { item: i },
        });

      } catch (error) {
        if (this.continueOnFail()) {
          returnData.push({
            json: { error: error.message },
            pairedItem: { item: i },
          });
        } else {
          throw error;
        }
      }
    }

    return [returnData];
  }
}

Credentials Configuration

SearchHive API Credentials

TypeScript
// SearchHive API Credentials
export class SearchHiveApi implements ICredentialType {
  name = 'searchHiveApi';
  displayName = 'SearchHive API';
  documentationUrl = 'https://docs.searchhive.com';
  properties: INodeProperties[] = [
    {
      displayName: 'API Key',
      name: 'apiKey',
      type: 'string',
      typeOptions: { password: true },
      default: '',
      description: 'Your SearchHive API key',
      required: true,
    },
    {
      displayName: 'Base URL',
      name: 'baseUrl',
      type: 'string',
      default: 'https://www.searchhive.dev/api',
      description: 'Base URL for SearchHive API',
    },
  ];

  authenticate: IAuthenticateGeneric = {
    type: 'generic',
    properties: {
      headers: {
        'Authorization': 'Bearer {{$credentials.apiKey}}',
      },
    },
  };

  test: ICredentialTestRequest = {
    request: {
      baseURL: '={{$credentials.baseUrl}}',
      url: '/v1/swiftsearch',
      method: 'POST',
      body: {
        query: 'test',
        max_results: 1,
      },
    },
  };
}
Node Development Resources
Download the complete SearchHive node package
Follow n8n's node development documentation
Join the n8n community for support and collaboration
Contribute improvements back to the community

Available SearchHive Nodes

SwiftSearch Node

Enhanced web search with real-time results.

Real-time search results
Auto-scraping options
Contact extraction
Social discovery
ScrapeForge Node

Extract content from any webpage or document.

Text and metadata extraction
Image and link discovery
JavaScript rendering
Custom selectors
DeepDive Node

AI-powered research and analysis automation.

Multi-source research
Trend analysis
Content summarization
Sentiment analysis

Complete Workflow Example

Here's a complete n8n workflow that demonstrates automated lead generation using SearchHive nodes.

Lead Generation Workflow

JSON
{
  "name": "SearchHive Lead Generation Workflow",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "triggerAtHour": 9
            }
          ]
        }
      },
      "id": "f6e1ca5b-1853-4b11-8a81-9a5c7e5e5f52",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.1,
      "position": [250, 300]
    },
    {
      "parameters": {
        "query": "{{$('Set Search Terms').item.json.searchQuery}}",
        "maxResults": 20,
        "extractContacts": true
      },
      "id": "8a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p",
      "name": "SearchHive SwiftSearch",
      "type": "searchHiveSwiftSearch",
      "typeVersion": 1,
      "position": [450, 300],
      "credentials": {
        "searchHiveApi": {
          "id": "1",
          "name": "SearchHive API Key"
        }
      }
    },
    {
      "parameters": {
        "values": {
          "searchQuery": "construction companies Seattle",
          "industry": "construction",
          "location": "Seattle"
        }
      },
      "id": "1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p",
      "name": "Set Search Terms",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.2,
      "position": [650, 300]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "f1e2d3c4-b5a6-9788-3c4d-5e6f7g8h9i0j",
              "leftValue": "={{$json.contact_info.email}}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        }
      },
      "id": "2b3c4d5e-6f7g-8h9i-0j1k-2l3m4n5o6p7q",
      "name": "Filter Valid Contacts",
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2,
      "position": [850, 300]
    },
    {
      "parameters": {
        "resource": "contact",
        "operation": "create",
        "properties": {
          "email": "={{$json.contact_info.email}}",
          "company": "={{$json.title}}",
          "website": "={{$json.link}}",
          "phone": "={{$json.contact_info.phone}}",
          "industry": "={{$('Set Search Terms').item.json.industry}}",
          "location": "={{$('Set Search Terms').item.json.location}}"
        }
      },
      "id": "3c4d5e6f-7g8h-9i0j-1k2l-3m4n5o6p7q8r",
      "name": "Add to CRM",
      "type": "n8n-nodes-base.hubspot",
      "typeVersion": 2,
      "position": [1050, 300]
    },
    {
      "parameters": {
        "channel": "#sales",
        "text": "🎯 New leads found: {{$('Filter Valid Contacts').item.json.length}} companies in {{$('Set Search Terms').item.json.industry}} industry"
      },
      "id": "4d5e6f7g-8h9i-0j1k-2l3m-4n5o6p7q8r9s",
      "name": "Slack Notification",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.1,
      "position": [1250, 300]
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Set Search Terms",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Search Terms": {
      "main": [
        [
          {
            "node": "SearchHive SwiftSearch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SearchHive SwiftSearch": {
      "main": [
        [
          {
            "node": "Filter Valid Contacts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Valid Contacts": {
      "main": [
        [
          {
            "node": "Add to CRM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add to CRM": {
      "main": [
        [
          {
            "node": "Slack Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Workflow Features
Scheduled execution
Contact extraction and filtering
CRM integration
Team notifications
Deployment Options
Self-hosted on your servers
Docker container deployment
Kubernetes orchestration
Team collaboration features

Self-hosting Benefits

Data Privacy & Control
All data stays on your infrastructure
No third-party data sharing
GDPR and compliance friendly
Custom security configurations
Cost & Performance
No per-execution fees
Unlimited workflow executions
Scale based on your needs
Optimize for your workloads
Start Building

Ready to build self-hosted automation? Get your SearchHive API key and deploy n8n.

Community Resources

Join the community and explore more automation platforms.