Skip to Content
Uncodie Market Fit está disponible 🎉
Rest APIAgentsSalesRegion Business Type Research

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/regionSearch

Request Body

ParameterTypeRequiredDescription
siteId or site_idstringYesID of the website requesting the search
userIdstringNoID of the user requesting the search (auto-assigned if agent found)
agent_idstringNoID of the agent to use (auto-searches for sales agent if not provided)
regionstringNoGeographic region to focus on (agent will determine if not provided)
businessTypestringNoBase business type to expand upon
keywordsarrayNoKeywords to consider in business type generation
maxBusinessTypesnumberNoMaximum number of business types to generate (default: 3)
prioritystringNoPriority level for the research (default: “medium”)
webhookobjectNoWebhook 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

CodeDescription
INVALID_REQUESTMissing required parameters (siteId/site_id)
AGENT_NOT_FOUNDThe specified agent was not found
COMMAND_EXECUTION_FAILEDCommand execution failed or timed out
SYSTEM_ERRORAn internal system error occurred

Response Fields

Business Type Object

FieldTypeDescription
namestringName of the business type
descriptionstringDetailed description of the business type
relevancestringWhy this business type is relevant to the region
market_potentialstringAssessment of market potential and opportunities

Location Strategy Object

FieldTypeDescription
methodstringHow the location was determined
determined_locationstringThe final location determined by the agent
previously_searched_citiesarrayCities that have been searched before
notestringAdditional 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