Region Business Type Research
Researches and generates business types for specific geographic regions based on business context and keywords, providing intelligent business type suggestions for lead generation campaigns.
Endpoint
POST /api/agents/sales/regionSearchRequest Body
| Parameter | Type | Required | Description |
|---|---|---|---|
siteId or site_id | string | Yes | ID of the website requesting the search |
userId | string | No | ID of the user requesting the search (auto-assigned if agent found) |
agent_id | string | No | ID of the agent to use (auto-searches for sales agent if not provided) |
region | string | No | Geographic region to focus on (agent will determine if not provided) |
businessType | string | No | Base business type to expand upon |
keywords | array | No | Keywords to consider in business type generation |
maxBusinessTypes | number | No | Maximum number of business types to generate (default: 3) |
priority | string | No | Priority level for the research (default: “medium”) |
webhook | object | No | Webhook configuration for notifications |
Example Request
{
"siteId": "site_456abc",
"userId": "user_123xyz",
"agent_id": "agent_789def",
"region": "Madrid",
"businessType": "consulting",
"keywords": ["digital marketing", "small business"],
"maxBusinessTypes": 5,
"priority": "high"
}Try It
Region Business Type Research API Tester
Use this tester to research and generate business types for specific geographic regions.
You can test this API directly using our API Tester interface. The Region Business Type Research API tester allows you to generate intelligent business type suggestions for lead generation.
Required fields:
- Site ID: The ID of the website requesting the search
Optional fields:
- User ID: The ID of the user requesting the search
- Agent ID: ID of the agent to use (system will find sales agent if not provided)
- Region: Geographic region to focus on (agent will determine optimal region if not provided)
- Business Type: Base business type to expand upon
- Keywords: Keywords to consider in business type generation
- Max Business Types: Maximum number of business types to generate (default: 3)
The API Tester makes it easy to see example requests in various programming languages and test the endpoint directly.
Response
Success Response
{
"success": true,
"data": {
"command_id": "cmd_123abc",
"site_id": "site_456abc",
"agent_id": "agent_789def",
"agent_auto_assigned": false,
"status": "completed",
"completed_at": "2024-01-15T10:30:00Z",
"target_city": "Madrid",
"target_region": "Madrid",
"initial_region_input": "Madrid",
"business_types_requested": 5,
"business_research_topic": "consulting businesses and similar service providers in Madrid with focus on technology, finance, consulting sectors",
"business_types": [
{
"name": "Digital Marketing Consulting",
"description": "Specialized consulting services for digital marketing strategies, SEO, and online presence",
"relevance": "High demand in Madrid's tech ecosystem",
"market_potential": "Growing market with increasing digital adoption"
},
{
"name": "Business Strategy Consulting",
"description": "Strategic consulting for business development, market entry, and operational improvement",
"relevance": "Strong corporate presence in Madrid creates opportunities",
"market_potential": "Established market with consistent demand"
},
{
"name": "Technology Implementation Consulting",
"description": "Consulting services for technology adoption, digital transformation, and IT strategy",
"relevance": "Madrid's position as a tech hub drives demand",
"market_potential": "High growth potential with digital transformation trends"
}
],
"region_insights": {
"popularIndustries": ["Technology", "Finance", "Consulting", "Marketing", "Real Estate"],
"growingBusinessTypes": ["FinTech", "PropTech", "E-commerce", "Digital Marketing", "Coworking"],
"marketTrends": ["Digital transformation", "Remote work solutions", "Sustainability"],
"economicData": {
"population": 6700000,
"avgIncome": 35000,
"businessDensity": 8.5
},
"competitorAnalysis": {
"dominantTypes": ["Corporate services", "Tech startups", "Financial services"],
"gaps": ["Niche consulting", "Specialized services", "Local artisans"]
}
},
"search_context": {
"initial_business_type": "consulting",
"keywords_provided": ["digital marketing", "small business"],
"region_provided": "Madrid",
"region_determined": "Madrid"
},
"location_strategy": {
"method": "agent_determined_from_background",
"determined_location": "Madrid, Madrid",
"previously_searched_cities": ["Barcelona", "Valencia"],
"note": "Location determined by agent based on business background/context or market analysis"
},
"process_info": {
"stage": "completed",
"progress_percentage": 100
}
}
}Error Response
{
"success": false,
"error": {
"code": "COMMAND_EXECUTION_FAILED",
"message": "El comando no completó exitosamente y no se generaron resultados válidos"
}
}Error Codes
| Code | Description |
|---|---|
INVALID_REQUEST | Missing required parameters (siteId/site_id) |
AGENT_NOT_FOUND | The specified agent was not found |
COMMAND_EXECUTION_FAILED | Command execution failed or timed out |
SYSTEM_ERROR | An internal system error occurred |
Response Fields
Business Type Object
| Field | Type | Description |
|---|---|---|
name | string | Name of the business type |
description | string | Detailed description of the business type |
relevance | string | Why this business type is relevant to the region |
market_potential | string | Assessment of market potential and opportunities |
Location Strategy Object
| Field | Type | Description |
|---|---|---|
method | string | How the location was determined |
determined_location | string | The final location determined by the agent |
previously_searched_cities | array | Cities that have been searched before |
note | string | Additional notes about location strategy |
Key Features
- Intelligent Region Selection: Agent automatically determines optimal target region based on business context
- Business Type Generation: Creates relevant business types based on market analysis and regional insights
- Agent Auto-Assignment: Automatically finds and assigns sales agents if not specified
- Regional Market Analysis: Provides comprehensive insights about the target region’s business landscape
- Contextual Recommendations: Considers business background, keywords, and market trends
- Duplicate Prevention: Tracks previously searched cities to avoid redundant searches
Notes
- The agent will analyze business background/context to determine the most appropriate target region
- Business types are generated based on regional market analysis and business potential
- Regional insights include economic data, market trends, and competitive analysis
- The system maintains memory of previously searched locations to optimize future searches
- Response includes detailed process information for transparency and debugging
Last updated on