POST
https://spideriq.di-atomic.com
/
api
/
v1
/
jobs
/
spiderMaps
/
campaigns
/
submit
Create Campaign
curl --request POST \
  --url https://spideriq.di-atomic.com/api/v1/jobs/spiderMaps/campaigns/submit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "<string>",
  "country_code": "<string>",
  "name": "<string>",
  "filter": {
    "mode": "<string>",
    "min_population": 123,
    "max_population": 123,
    "location_ids": [
      {}
    ],
    "admin_regions": [
      {}
    ]
  },
  "workflow": {
    "spidersite": {
      "enabled": true,
      "max_pages": 123,
      "crawl_strategy": "<string>",
      "enable_spa": true,
      "extract_team": true,
      "extract_company_info": true,
      "product_description": "<string>",
      "icp_description": "<string>"
    },
    "spiderverify": {
      "enabled": true,
      "max_emails_per_business": 123,
      "check_gravatar": true,
      "check_dnsbl": true
    },
    "filter_social_media": true,
    "filter_review_sites": true,
    "filter_directories": true,
    "filter_maps": true
  }
}
'
{
  "campaign_id": "<string>",
  "status": "<string>",
  "query": "<string>",
  "country_code": "<string>",
  "total_locations": 123,
  "next_location_id": 123,
  "created_at": "<string>",
  "has_workflow": true,
  "workflow_config": {}
}

Overview

Create a new SpiderMaps campaign that will scrape business listings across multiple locations in a country. The campaign system handles location iteration automatically, making it easy to scrape entire countries or regions.
v2.14.0 Feature: The Campaign System includes a location database with 44,691 cities across 240 countries.
v2.15.0 Workflow Orchestration: Enable automatic job chaining with the workflow parameter to run SpiderMaps → SpiderSite → SpiderVerify automatically. See Orchestrated Campaigns Guide.

Request Body

query
string
required
The search query for Google Maps (e.g., “restaurants”, “hotels”, “dentists”)
country_code
string
required
ISO 2-letter country code (e.g., “FR” for France, “DE” for Germany)
name
string
Optional campaign name for identification
filter
object
Location filter configuration
workflow
object
v2.15.0: Workflow orchestration configuration for automatic job chaining.

Filter Modes

ModeDescriptionUse Case
allAll locations in the countryComplete country coverage
populationFilter by population rangeTarget cities of specific size
cities_onlyOnly cities, no postcodesSkip postcode-level granularity
customSpecific location IDsTarget specific pre-selected cities
regionsSpecific admin regionsTarget states/provinces

Response

campaign_id
string
Unique campaign identifier (e.g., “camp_fr_restaurant_20251222_abc123”)
status
string
Campaign status: active, paused, completed, stopped
query
string
The search query used
country_code
string
The country code
total_locations
integer
Number of locations to be scraped
next_location_id
integer
ID of the first location to be processed
created_at
string
ISO timestamp of creation
has_workflow
boolean
v2.15.0: Whether workflow orchestration is enabled for this campaign
workflow_config
object
v2.15.0: The workflow configuration if enabled (mirrors the request)

Examples

Basic Campaign (All Locations)

curl -X POST https://spideriq.di-atomic.com/api/v1/jobs/spiderMaps/campaigns/submit \
  -H "Authorization: Bearer <your_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "restaurants",
    "country_code": "LU"
  }'
Response:
{
  "campaign_id": "camp_lu_restaurants_20251222171302_cee5b94a",
  "status": "active",
  "query": "restaurants",
  "country_code": "LU",
  "total_locations": 12,
  "next_location_id": 28451,
  "created_at": "2025-12-22T17:13:02Z"
}

Population-Filtered Campaign

curl -X POST https://spideriq.di-atomic.com/api/v1/jobs/spiderMaps/campaigns/submit \
  -H "Authorization: Bearer <your_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "hotels",
    "country_code": "DE",
    "name": "Germany Hotels - Major Cities",
    "filter": {
      "mode": "population",
      "min_population": 500000
    }
  }'
Response:
{
  "campaign_id": "camp_de_hotels_20251222171518_f65c4dce",
  "status": "active",
  "query": "hotels",
  "country_code": "DE",
  "total_locations": 14,
  "next_location_id": 12301,
  "created_at": "2025-12-22T17:15:18Z"
}

Orchestrated Campaign (v2.15.0)

Full workflow with SpiderMaps → SpiderSite → SpiderVerify chain:
curl -X POST https://spideriq.di-atomic.com/api/v1/jobs/spiderMaps/campaigns/submit \
  -H "Authorization: Bearer <your_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "restaurants",
    "country_code": "FR",
    "name": "France Restaurants - Lead Gen",
    "filter": {
      "mode": "population",
      "min_population": 100000
    },
    "workflow": {
      "spidersite": {
        "enabled": true,
        "max_pages": 10,
        "crawl_strategy": "bestfirst",
        "enable_spa": true,
        "extract_company_info": true,
        "product_description": "Restaurant management software",
        "icp_description": "Restaurant owners seeking efficiency"
      },
      "spiderverify": {
        "enabled": true,
        "max_emails_per_business": 5,
        "check_gravatar": false
      },
      "filter_social_media": true,
      "filter_review_sites": true
    }
  }'
Response:
{
  "campaign_id": "camp_fr_restaurants_20251223_a1b2c3d4",
  "status": "active",
  "query": "restaurants",
  "country_code": "FR",
  "total_locations": 42,
  "next_location_id": 15201,
  "created_at": "2025-12-23T10:30:00Z",
  "has_workflow": true,
  "workflow_config": {
    "spidersite": {
      "enabled": true,
      "max_pages": 10,
      "crawl_strategy": "bestfirst"
    },
    "spiderverify": {
      "enabled": true,
      "max_emails_per_business": 5
    },
    "filter_social_media": true,
    "filter_review_sites": true
  }
}
For orchestrated campaigns, use the /workflow-results endpoint to get aggregated data from all three services (SpiderMaps + SpiderSite + SpiderVerify) in a single response.

Error Responses

Invalid Country Code

{
  "detail": "No locations found for country XX"
}

No Matching Locations

{
  "detail": "No locations match the specified filter criteria"
}

Next Steps

After creating a campaign, use the /next endpoint to start submitting jobs:

Get Next Location

Get the next location and automatically submit a SpiderMaps job