ScrapIQ API Documentation

GET

/api/campaigns/active

Returns all active campaigns with their request and contact counts

Response Example:

{
  "campaigns": [
    {
      "id": 1,
      "name": "Campaign Name",
      "status": "active",
      "total_requests": 10,
      "total_contacts": 5
    }
  ]
}
GET

/api/campaign/{campaign_id}/nomail

Returns random contacts that have domains but no emails from the specified campaign (supports batch requests)

Parameters:

  • campaign_id - ID of the campaign
  • batch - Number of contacts to return (0-1000, default: 1)

Example URLs:

  • /api/campaign/1/nomail - Single contact
  • /api/campaign/1/nomail?batch=10 - Batch of 10 contacts

Response Examples:

Single contact (batch=1):

{
  "contacts": [
    {
      "id": "66",
      "domain": "example.com"
    }
  ],
  "count": 1
}

Multiple contacts (batch>1):

{
  "contacts": [
    {
      "id": "66",
      "domain": "example.com"
    },
    {
      "id": "67",
      "domain": "sample.org"
    }
  ],
  "count": 2
}
POST

/api/campaign/{campaign_id}/email_update

Updates emails for one or multiple contacts in a campaign (supports batch updates)

Parameters:

campaign_id - ID of the campaign

Request Body Examples:

Single update:

{
  "id": "66",
  "email": "example@example.com"
}

Batch update (up to 100 contacts):

{
  "contacts": [
    {
      "id": "66",
      "email": "example@example.com"
    },
    {
      "id": "67",
      "email": "test@sample.org"
    }
  ]
}

Response Examples:

Single update response:

{
  "status": "Email updated successfully"
}

Batch update response:

{
  "status": "Batch update completed",
  "updated_count": 2,
  "failed_count": 0,
  "failed_updates": []
}
GET

/api/campaign/{campaign_id}

Returns detailed information about a specific campaign

Parameters:

campaign_id - ID of the campaign

Response Example:

{
  "campaign": {
    "id": 1,
    "name": "Campaign Name",
    "status": "active"
  },
  "requests": [...],
  "contacts": [...]
}
GET

/api/campaign/{campaign_name}/requests

Returns pending requests for a specific campaign

Parameters:

campaign_name - Name of the campaign

Response Example:

{
  "requests": [
    {
      "id": 1,
      "campaign_id": 1,
      "req_text": "search phrase",
      "status": "pending"
    }
  ]
}
GET

/api/request/{request_id}/status/{status}

Updates the status of a specific request

Parameters:

  • request_id - ID of the request
  • status - New status ('inuse' or 'completed')

Response Example:

{
  "status": "Request status updated successfully"
}
GET

/api/campaign/{campaign_id}/complete

Marks a campaign as completed

Parameters:

campaign_id - ID of the campaign to complete

Response Example:

{
  "status": "Campaign marked as completed"
}
POST

/api/contacts

Saves one or multiple contacts for a campaign

JSON Request Body:

Single contact object or array of contact objects with the following properties:

Required Fields:

  • campaign_id - Campaign ID
  • request_id - Request ID
  • business_name - Name of the business
  • review_count - Number of reviews

Basic Optional Fields:

  • phone - Phone number
  • domain - Website domain
  • email - Email address
  • address - Business address
  • category - Business category
  • rating - Business rating
  • place_id - Place ID

Social Media Fields:

  • facebook - Facebook URL
  • instagram - Instagram URL
  • twitter - Twitter URL
  • yelp - Yelp URL

Personal Information:

  • full_name - Full name
  • firstname - First name
  • lastname - Last name
  • industry - Industry
  • city - City
  • state - State
  • country - Country
  • www - Website URL

Company Information:

  • company - Company name
  • company_social - Company social media
  • company_size - Company size
  • personal_job_position - Job position
  • personal_prospect_location - Prospect location
  • personal_user_social - Personal social media

Additional Fields:

  • screenshot - Screenshot URL
  • logo - Logo URL
  • icebreaker - Icebreaker text
  • time_zone_offset_min - Timezone offset in minutes
  • notes - Additional notes
  • tags_import - Import tags

Custom Fields (1-20):

  • custom_1 - Custom field 1
  • custom_2 - Custom field 2
  • custom_3 - Custom field 3
  • custom_4 - Custom field 4
  • custom_5 - Custom field 5
  • custom_6 - Custom field 6
  • custom_7 - Custom field 7
  • custom_8 - Custom field 8
  • custom_9 - Custom field 9
  • custom_10 - Custom field 10
  • custom_11 - Custom field 11
  • custom_12 - Custom field 12
  • custom_13 - Custom field 13
  • custom_14 - Custom field 14
  • custom_15 - Custom field 15
  • custom_16 - Custom field 16
  • custom_17 - Custom field 17
  • custom_18 - Custom field 18
  • custom_19 - Custom field 19
  • custom_20 - Custom field 20

Email Verification:

  • email_status - Email verification status (unverified, verified, invalid, bounced, catch-all, unknown)

Request Example:

[
  {
    "campaign_id": 1,
    "request_id": 2,
    "business_name": "Business 1",
    "review_count": 10,
    "phone": "123-456-7890",
    "domain": "example1.com",
    "email": "contact@example1.com",
    "address": "123 Main St, New York, NY",
    "category": "Restaurant",
    "rating": 4.5,
    "full_name": "John Doe",
    "firstname": "John",
    "lastname": "Doe",
    "company": "Example Corp",
    "city": "New York",
    "state": "NY",
    "country": "USA",
    "industry": "Food & Beverage",
    "www": "https://example1.com",
    "company_size": "50-100",
    "personal_job_position": "Manager",
    "facebook": "https://facebook.com/business1",
    "instagram": "https://instagram.com/business1",
    "custom_1": "Custom value 1",
    "custom_2": "Custom value 2",
    "notes": "High-quality prospect",
    "tags_import": "restaurant,nyc,premium"
  },
  {
    "campaign_id": 1,
    "request_id": 2,
    "business_name": "Business 2",
    "review_count": 20,
    "phone": "098-765-4321",
    "domain": "example2.com",
    "email": "contact@example2.com",
    "address": "456 Oak Ave, Los Angeles, CA",
    "category": "Retail",
    "rating": 4.8,
    "full_name": "Jane Smith",
    "firstname": "Jane",
    "lastname": "Smith",
    "company": "Sample Inc",
    "city": "Los Angeles",
    "state": "CA",
    "country": "USA",
    "industry": "Retail",
    "www": "https://example2.com",
    "company_size": "10-50",
    "personal_job_position": "Owner",
    "twitter": "https://twitter.com/business2",
    "yelp": "https://yelp.com/biz/business2",
    "time_zone_offset_min": -480,
    "icebreaker": "Great reviews on your latest products!"
  }
]

Response Example:

{
  "status": "Contacts saved successfully",
  "saved_contacts": [
    {
      "contact_id": 1,
      "campaign_id": 1,
      "request_id": 2
    },
    {
      "contact_id": 2,
      "campaign_id": 1,
      "request_id": 2
    }
  ]
}