UpKuaJing map merchants search, discover local businesses, retail stores, and verified sellers via global map data. UpKuaJing helps field sales, distributors, and brand teams find geo-targeted merchan
by @upkuajing
Official skill for upkuajing (跨境魔方). Search merchants on map (地图获客). Find merchants by region or nearby location, get merchant details including name, addres...
clawhub install upkuajing-map-merchants-search📖 About This Skill
name: upkuajing-map-merchants-search description: Official skill for upkuajing (跨境魔方). Search merchants on map (地图获客). Find merchants by region or nearby location, get merchant details including name, address, phone, industry, and more. Includes geographic data APIs (country, province, city lists) to support location-based search. metadata: {"version":"1.0.2","homepage":"https://www.upkuajing.com","clawdbot":{"emoji":"📍","requires":{"bins":["python"],"env":["UPKUAJING_API_KEY"]},"primaryEnv":"UPKUAJING_API_KEY"}}
UpKuaJing Map Merchants Search
Query merchant information using the UpKuaJing Open Platform API. This skill provides map-based merchant search with two search modes: region search and nearby search.
Overview
This skill provides access to UpKuaJing's map merchant database through:
merchants_search.py): Search merchants by keywords and locationgeography_list.py): Get country/province/city lists for location parametersRunning Scripts
Environment Setup
1. Check Python: python --version
2. Install dependencies: pip install -r requirements.txt
Script directory: scripts/*.py
Run example: python scripts/*.py
Important: Always use direct script invocation like python scripts/merchants_search.py. Do NOT use shell compound commands like cd scripts && python merchants_search.py.
Two Main APIs
Merchant Search (merchants_search.py)
Search merchants by keywords and geographic area.
Parameters: See Merchants Search API
Two Search Modes:
geoDistanceExamples:
# Country search - Find restaurants in Brazil
python scripts/merchants_search.py \
--params '{"keywords":["restaurant"],"countryCodes":["BR"]}' \
--query_count 100Multi-country search with phone filter - Find restaurants in US or China with phone
python scripts/merchants_search.py \
--params '{"keywords":["restaurant"],"countryCodes":["US","CN"],"existPhone":true}' \
--query_count 50Industry filter - Find car dealers in Thailand
python scripts/merchants_search.py \
--params '{"keywords":["car dealer"],"countryCodes":["TH"],"industries":["Cars"]}' \
--query_count 100Nearby search - Find hotels within 5km of a point
python scripts/merchants_search.py \
--params '{"keywords":["hotel"],"geoDistance":{"location":{"lat":31.1104643,"lon":29.7602221},"distance":"5km"}}'Province and city filter - Find restaurants in a specific province/city
python scripts/merchants_search.py \
--params '{"keywords":["restaurant"],"provinceIds":["2277"],"cityIds":["19975"]}' \
--query_count 50Shop name filter - Find shops by specific name
python scripts/merchants_search.py \
--params '{"companyNames":["car care"],"countryCodes":["TH"]}' \
--query_count 100Multi-filter search - Combine multiple filters
python scripts/merchants_search.py \
--params '{"keywords":["restaurant"],"countryCodes":["US"],"provinceIds":["1447"],"industries":["Cars"],"existPhone":true}' \
--query_count 50
Task Resume: Use --task_id to resume interrupted large queries:
python scripts/merchants_search.py --task_id 'your-task-id-here' --query_count 2000
Geography List (geography_list.py)
Get geographic hierarchy data for building search parameters.
Examples:
# Get country list
python scripts/geography_list.py --type countryGet province list for a country
python scripts/geography_list.py --type province --country_id 1Get city list for a country
python scripts/geography_list.py --type city --country_id 1
API Key and UpKuaJing Account
~/.upkuajing/.env file as UPKUAJING_API_KEYAPI Key Not Set
First check if the~/.upkuajing/.env file has UPKUAJING_API_KEY;
If UPKUAJING_API_KEY is not set, prompt the user to choose:
1. User has one: User provides it (manually add to ~/.upkuajing/.env file)
2. User doesn't have one: Guide user to apply at UpKuaJing Open Platform
Wait for user selection;Account Top-up
When API response indicates insufficient balance, explain and guide user to top up: 1. Create top-up order (auth.py --new_rec_order)
2. Based on order response, send payment page URL to user, guide user to open URL and pay, user confirms after successful payment;Get Account Information
Use this script to get account information for UPKUAJING_API_KEY:auth.py --account_infoAPI Key and UpKuaJing Account
Fees
Merchant search API calls incur fees, different interfaces have different billing methods.
Latest pricing: Users can visit Detailed Price Description
Or use: python scripts/auth.py --price_info (returns complete pricing for all interfaces)
Merchant Search Billing Rules
Billed by number of calls, each call returns up to 100 records:
ceil(query_count / 100) timesGeography List Billing Rules
Free of charge — No fees for country/province/city list queries.
Fee Confirmation Principle
Any operation that incurs fees must first inform and wait for explicit user confirmation. Do not execute in the same message as the notification.
Workflow
Decision Guide
| User Intent | Use API | |-------------|---------| | "Find merchants by country/region" | Merchants Search (countryCodes) | | "Find merchants by province/city" | Merchants Search (provinceIds, cityIds) | | "Find merchants near a location" | Merchants Search (geoDistance) | | "Filter by industry or contact info" | Merchants Search (industries, existPhone, existWebsite) | | "Find shops by name" | Merchants Search (companyNames) | | "Get country/province/city data" | Geography List |
Search Flow
1. For region search: Use Geography List to get country/province/city IDs first 2. Build search parameters: Combine keywords with geographic filters 3. Execute search: Use merchants_search.py with appropriate parameters 4. Handle large queries: Use task_id to resume interrupted searches
Error Handling
UPKUAJING_API_KEY in ~/.upkuajing/.env fileBest Practices
Choosing the Right Search Mode
1. Understand user intent: - Find merchants by country/region? → Use Country Search (countryCodes) - Find merchants by province/city? → Use provinceIds, cityIds - Find merchants near a location? → Use Nearby Search (geoDistance) - Filter by industry or contact availability? → Use industries, existPhone, existWebsite - Find shops by name? → Use companyNames
2. Check API documentation: - Before executing searches, must first check the corresponding API reference documentation - Merchant search: Check references/merchants-search-api.md - Geography list: Check corresponding files in references/ directory - Do not guess parameter names, get accurate parameter names and formats from documentation
Location-Based Search
1. Country search for regional coverage: Use countryCodes with keywords
2. Nearby search for precise location: Use geoDistance with location and distance
Parameter Guidelines
existPhone=true or existWebsite=true to filter by contact availabilityindustries to filter by business typeprovinceIds and cityIds to filter by specific province or citycompanyNames to find shops by specific nameHandling Results
1. Be mindful of file size for large queries: jsonl files can grow large 2. Use task_id to resume interrupted queries: avoid redundant API calls and fees
Notes
python scripts/auth.py --price_info to get accurate pricing informationRelated Skills
Other UpKuaJing skills you might find useful:
📋 Tips & Best Practices
Choosing the Right Search Mode
1. Understand user intent: - Find merchants by country/region? → Use Country Search (countryCodes) - Find merchants by province/city? → Use provinceIds, cityIds - Find merchants near a location? → Use Nearby Search (geoDistance) - Filter by industry or contact availability? → Use industries, existPhone, existWebsite - Find shops by name? → Use companyNames
2. Check API documentation: - Before executing searches, must first check the corresponding API reference documentation - Merchant search: Check references/merchants-search-api.md - Geography list: Check corresponding files in references/ directory - Do not guess parameter names, get accurate parameter names and formats from documentation
Location-Based Search
1. Country search for regional coverage: Use countryCodes with keywords
2. Nearby search for precise location: Use geoDistance with location and distance
Parameter Guidelines
existPhone=true or existWebsite=true to filter by contact availabilityindustries to filter by business typeprovinceIds and cityIds to filter by specific province or citycompanyNames to find shops by specific nameHandling Results
1. Be mindful of file size for large queries: jsonl files can grow large 2. Use task_id to resume interrupted queries: avoid redundant API calls and fees