Serverless
2,700+ APIs

Pipedream Integration

Build serverless automation workflows with SearchHive and Pipedream. Create event-driven, scalable integrations that respond to web data changes in real-time.

Serverless Components

Pre-built SearchHive components for instant integration

No server management
Auto-scaling execution
Pay-per-use pricing
Global edge deployment

Event-Driven Architecture

React to web data changes in real-time

Webhook triggers
Real-time monitoring
Instant notifications
Conditional execution

Developer Experience

Code-first platform with powerful abstractions

TypeScript/JavaScript
Built-in testing
Version control
Collaborative development
What you'll build
Serverless workflows that monitor web data, trigger on changes, process information with AI, and integrate with thousands of apps - all without managing infrastructure.

Setup Instructions

1Create SearchHive App Connection

Configure SearchHive as a custom app in Pipedream for reusable authentication and methods.

SearchHive App Configuration

JavaScript
// searchhive.app.mjs
export default {
  type: "app",
  app: "searchhive",
  propDefinitions: {
    query: {
      type: "string",
      label: "Search Query",
      description: "Enter your search query",
    },
    maxResults: {
      type: "integer",
      label: "Max Results",
      description: "Maximum number of results (1-50)",
      min: 1,
      max: 50,
      default: 10,
    }
  },
  methods: {
    _baseUrl() {
      return "https://www.searchhive.dev/api";
    },
    _headers() {
      return {
        "Authorization": "Bearer " + this.$auth.api_key,
        "Content-Type": "application/json",
      };
    },
    async _makeRequest({ $ = this, path, ...opts }) {
      return await axios($, {
        url: this._baseUrl() + path,
        headers: this._headers(),
        ...opts,
      });
    },
    async search(opts = {}) {
      return await this._makeRequest({
        method: "POST",
        path: "/v1/swiftsearch",
        ...opts,
      });
    },
    async scrape(opts = {}) {
      return await this._makeRequest({
        method: "POST", 
        path: "/v1/scrapeforge",
        ...opts,
      });
    },
    async research(opts = {}) {
      return await this._makeRequest({
        method: "POST",
        path: "/v1/deepdive", 
        ...opts,
      });
    },
  },
};

Authentication Setup:

  1. Create new app in Pipedream Apps directory
  2. Add API key authentication method
  3. Define reusable methods for all SearchHive APIs
  4. Test connection with sample requests
2Build SearchHive Components

Create reusable components for each SearchHive API that can be used across workflows.

SwiftSearch Component

JavaScript
import { axios } from "@pipedream/platform";

export default defineComponent({
  name: "SearchHive SwiftSearch",
  description: "Search the web with enhanced results using SearchHive",
  version: "0.1.0",
  type: "action",
  props: {
    searchhive: {
      type: "app",
      app: "searchhive",
    },
    query: {
      type: "string",
      label: "Search Query",
      description: "The search query to execute",
    },
    maxResults: {
      type: "integer",
      label: "Max Results",
      description: "Maximum number of results to return",
      default: 10,
      min: 1,
      max: 50,
    },
    autoScrape: {
      type: "boolean",
      label: "Auto Scrape",
      description: "Automatically scrape result pages",
      default: false,
    },
    extractContacts: {
      type: "boolean",
      label: "Extract Contacts",
      description: "Extract contact information from results",
      default: false,
    },
  },
  async run({ steps, $ }) {
    const { query, maxResults, autoScrape, extractContacts } = this;
    
    const response = await axios($, {
      method: "POST",
      url: "https://www.searchhive.dev/api/v1/swiftsearch",
      headers: {
        "Authorization": "Bearer " + this.searchhive.$auth.api_key,
        "Content-Type": "application/json",
      },
      data: {
        query,
        max_results: maxResults,
        auto_scrape: autoScrape,
        extract_contacts: extractContacts,
      },
    });

    $.export("$summary", `Found ${response.data.search_results?.length || 0} results for "${query}"`);
    
    return response.data;
  },
});
Component Benefits

Reusable across workflows, built-in validation, consistent error handling, and shared authentication.

Publishing

Publish to Pipedream registry for community use or keep private for your organization.

3Configure API Authentication

Set up secure authentication for SearchHive API in your Pipedream account.

Authentication Steps:

  1. Go to Pipedream → Accounts → Add Account
  2. Select "SearchHive" app (custom or published)
  3. Enter your SearchHive API key
  4. Test the connection
  5. Save for use across all workflows

SearchHive Component Library

SwiftSearch Action

Enhanced web search with real-time results.

Real-time search execution
Auto-scraping integration
Contact extraction
Social discovery
ScrapeForge Action

Extract content from any webpage or document.

Content extraction
JavaScript rendering
Custom selectors
Metadata extraction
DeepDive Action

AI-powered research and analysis.

Multi-source research
Trend analysis
Content summarization
Sentiment analysis

Advanced Workflow Example

Here's a complete serverless workflow that demonstrates intelligent lead generation with multiple SearchHive APIs.

Intelligent Lead Generation Pipeline

JavaScript
import { defineComponent } from "@pipedream/platform";

export default defineComponent({
  name: "Lead Generation Pipeline",
  description: "Automated lead discovery and CRM integration",
  version: "0.1.0",
  async run({ steps, $ }) {
    // Step 1: Search for companies
    const searchResults = await this.searchhive.search({
      query: "construction companies Seattle",
      maxResults: 20,
      extractContacts: true,
    });

    // Step 2: Filter valid leads
    const validLeads = searchResults.search_results.filter(result => 
      result.contact_info?.email && 
      !result.contact_info.email.includes('noreply')
    );

    // Step 3: Enrich with additional data
    const enrichedLeads = await Promise.all(
      validLeads.map(async (lead) => {
        const scrapeResult = await this.searchhive.scrape({
          url: lead.link,
          extractOptions: ["title", "text", "metadata"]
        });
        
        return {
          ...lead,
          company_size: this.extractCompanySize(scrapeResult.primary_content?.text),
          technology_stack: this.extractTechStack(scrapeResult.primary_content?.text),
          scraped_at: new Date().toISOString(),
        };
      })
    );

    // Step 4: Add to CRM
    const crmResults = await Promise.all(
      enrichedLeads.map(async (lead) => {
        return await this.hubspot.createContact({
          email: lead.contact_info.email,
          company: lead.title,
          website: lead.link,
          phone: lead.contact_info.phone,
          lead_source: "SearchHive Automation",
          company_size: lead.company_size,
        });
      })
    );

    // Step 5: Send notification
    await this.slack.sendMessage({
      channel: "#sales",
      text: `🎯 Found ${enrichedLeads.length} new qualified leads in construction industry`,
      attachments: [{
        color: "good",
        fields: [
          {
            title: "Companies Found",
            value: enrichedLeads.length.toString(),
            short: true
          },
          {
            title: "With Contact Info",
            value: enrichedLeads.filter(l => l.contact_info?.email).length.toString(),
            short: true
          }
        ]
      }]
    });

    $.export("$summary", `Processed ${enrichedLeads.length} leads successfully`);
    return {
      leads: enrichedLeads,
      crm_results: crmResults,
      processed_at: new Date().toISOString()
    };
  },

  extractCompanySize(text) {
    if (!text) return "Unknown";
    const sizeIndicators = {
      "startup": ["startup", "founded", "early stage"],
      "small": ["small business", "10-50 employees", "team of"],
      "medium": ["growing company", "50-200 employees", "established"],
      "large": ["enterprise", "500+ employees", "fortune", "publicly traded"]
    };
    
    for (const [size, indicators] of Object.entries(sizeIndicators)) {
      if (indicators.some(indicator => text.toLowerCase().includes(indicator))) {
        return size;
      }
    }
    return "Unknown";
  },

  extractTechStack(text) {
    if (!text) return [];
    const technologies = ["WordPress", "React", "Angular", "Vue", "Shopify", "Salesforce", "HubSpot"];
    return technologies.filter(tech => 
      text.toLowerCase().includes(tech.toLowerCase())
    );
  }
});
Serverless Benefits
This workflow automatically scales based on demand, only charges for execution time, and can handle millions of events without infrastructure management.

Event-Driven Triggers

Create triggers that monitor web data and automatically execute workflows when conditions are met.

SearchHive Monitoring Trigger

JavaScript
export default defineComponent({
  name: "SearchHive Webhook Trigger",
  description: "Trigger workflow when SearchHive finds new results",
  version: "0.1.0",
  type: "source",
  dedupe: "unique",
  props: {
    http: {
      type: "$.interface.http",
      customResponse: true,
    },
    searchhive: {
      type: "app", 
      app: "searchhive",
    },
    query: {
      type: "string",
      label: "Search Query",
      description: "Query to monitor for new results",
    },
    checkInterval: {
      type: "integer",
      label: "Check Interval (minutes)",
      description: "How often to check for new results",
      default: 60,
      min: 5,
    },
  },
  hooks: {
    async activate() {
      // Store the last check timestamp
      this.db.set("lastCheck", Date.now());
    },
  },
  async run({ body, headers }) {
    const lastCheck = this.db.get("lastCheck") || 0;
    const now = Date.now();
    
    // Only run if enough time has passed
    if (now - lastCheck < this.checkInterval * 60 * 1000) {
      return;
    }

    try {
      const results = await this.searchhive.search({
        query: this.query,
        maxResults: 20,
      });

      // Filter results newer than last check
      const newResults = results.search_results.filter(result => {
        const resultDate = new Date(result.date || 0).getTime();
        return resultDate > lastCheck;
      });

      if (newResults.length > 0) {
        this.db.set("lastCheck", now);
        
        this.$emit({
          query: this.query,
          new_results: newResults,
          total_found: newResults.length,
          timestamp: new Date().toISOString(),
        }, {
          id: `${this.query}-${now}`,
          summary: `Found ${newResults.length} new results for "${this.query}"`,
          ts: now,
        });
      }
    } catch (error) {
      console.error("SearchHive trigger error:", error);
    }
  },
});
Trigger Types
Webhook triggers from external systems
Scheduled interval monitoring
Database change detection
Web data change monitoring
Use Cases
Brand mention monitoring
Competitor price tracking
News and trend detection
Lead generation automation

Best Practices

Performance Optimization
Use async/await for parallel API calls
Implement proper error handling and retries
Cache frequently accessed data
Use Pipedream's built-in deduplication
Cost Management
Monitor SearchHive credit usage
Set execution limits in Pipedream
Use filters to process only relevant data
Optimize polling intervals
Start Building

Ready for serverless automation? Get your SearchHive API key and start building with Pipedream.

More Integrations

Explore other automation platforms and developer tools.