Platforms API
Reference for platform-specific actions and operations.
Get All Platforms
List all supported platforms with their available actions.
Endpoint:
GET /api/platformsExample:
curl https://api.browserman.run/api/platforms \
-H "Authorization: Bearer YOUR_API_KEY"Response:
{
"success": true,
"data": {
"platforms": [
{
"id": "twitter",
"name": "Twitter/X",
"actions": ["createTweet", "likeTweet", "reTweet", "replyTweet", "quoteTweet"]
},
{
"id": "xueqiu",
"name": "Xueqiu",
"actions": ["post"]
},
{
"id": "eastmoney",
"name": "Eastmoney",
"actions": ["postWithCode"]
},
{
"id": "tonghuashun",
"name": "Tonghuashun",
"actions": ["post"]
}
]
}
}Get Platform Schema
Get the complete OpenAPI schema for all platforms and actions.
Endpoint:
GET /api/platforms/schemaExample:
curl https://api.browserman.run/api/platforms/schema \
-H "Authorization: Bearer YOUR_API_KEY"This returns a complete OpenAPI 3.0 schema that you can use to:
- Generate API clients
- Validate requests
- Build integrations
- Explore action parameters
Twitter/X
Platform ID: twitter
Available Actions
createTweet
Post a new tweet.
Parameters:
accountName(required) - Name of the Twitter accounttext(required) - Tweet text (max 280 characters)preferredEngine(optional) - "lite" or "full"
Example:
curl -X POST https://api.browserman.run/api/tasks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"platform": "twitter",
"action": "createTweet",
"accountName": "my-twitter",
"parameters": {
"text": "Hello from Browserman! 🚀"
}
}'likeTweet
Like an existing tweet.
Parameters:
accountName(required) - Name of the Twitter accounttweetUrl(required) - URL of the tweet to likepreferredEngine(optional) - "lite" or "full"
Example:
curl -X POST https://api.browserman.run/api/tasks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"platform": "twitter",
"action": "likeTweet",
"accountName": "my-twitter",
"parameters": {
"tweetUrl": "https://x.com/username/status/1234567890"
}
}'reTweet
Retweet an existing tweet.
Parameters:
accountName(required) - Name of the Twitter accounttweetUrl(required) - URL of the tweet to retweetpreferredEngine(optional) - "lite" or "full"
Example:
curl -X POST https://api.browserman.run/api/tasks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"platform": "twitter",
"action": "reTweet",
"accountName": "my-twitter",
"parameters": {
"tweetUrl": "https://x.com/username/status/1234567890"
}
}'replyTweet
Reply to an existing tweet.
Parameters:
accountName(required) - Name of the Twitter accounttweetUrl(required) - URL of the tweet to reply totext(required) - Reply text (max 280 characters)preferredEngine(optional) - "lite" or "full"
Example:
curl -X POST https://api.browserman.run/api/tasks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"platform": "twitter",
"action": "replyTweet",
"accountName": "my-twitter",
"parameters": {
"tweetUrl": "https://x.com/username/status/1234567890",
"text": "Great point! Thanks for sharing."
}
}'quoteTweet
Quote an existing tweet with your own comment.
Parameters:
accountName(required) - Name of the Twitter accounttweetUrl(required) - URL of the tweet to quotetext(required) - Your comment (max 280 characters)preferredEngine(optional) - "lite" or "full"
Example:
curl -X POST https://api.browserman.run/api/tasks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"platform": "twitter",
"action": "quoteTweet",
"accountName": "my-twitter",
"parameters": {
"tweetUrl": "https://x.com/username/status/1234567890",
"text": "This is exactly what we'\''ve been working on!"
}
}'Xueqiu (雪球)
Platform ID: xueqiu
Available Actions
post
Post content to Xueqiu platform.
Parameters:
accountName(required) - Name of the Xueqiu accounttext(required) - Post contentpreferredEngine(optional) - "lite" or "full"
Example:
curl -X POST https://api.browserman.run/api/tasks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"platform": "xueqiu",
"action": "post",
"accountName": "my-xueqiu",
"parameters": {
"text": "今日市场分析:科技股表现强劲..."
}
}'Eastmoney (东方财富)
Platform ID: eastmoney
Available Actions
postWithCode
Post a comment to a specific stock page.
Parameters:
accountName(required) - Name of the Eastmoney accountcode(required) - Stock code (6xxxxx for Shanghai, 0xxxxx/3xxxxx for Shenzhen)text(required) - Comment textpreferredEngine(optional) - "lite" or "full"
Example:
curl -X POST https://api.browserman.run/api/tasks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"platform": "eastmoney",
"action": "postWithCode",
"accountName": "my-eastmoney",
"parameters": {
"code": "600000",
"text": "基本面良好,适合长期持有"
}
}'Stock Code Format:
- Shanghai stocks: Start with 6 (e.g., 600000, 601398)
- Shenzhen stocks: Start with 0 or 3 (e.g., 000001, 300750)
Tonghuashun (同花顺)
Platform ID: tonghuashun
Available Actions
post
Post text and images to Tonghuashun.
Parameters:
accountName(required) - Name of the Tonghuashun accounttext(required) - Post contenturls(optional) - Comma-separated image URLs (max 9 images)preferredEngine(optional) - "lite" or "full"
Example (text only):
curl -X POST https://api.browserman.run/api/tasks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"platform": "tonghuashun",
"action": "post",
"accountName": "my-tonghuashun",
"parameters": {
"text": "Q4财报分析:营收超预期"
}
}'Example (with images):
curl -X POST https://api.browserman.run/api/tasks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"platform": "tonghuashun",
"action": "post",
"accountName": "my-tonghuashun",
"parameters": {
"text": "技术分析图表",
"urls": "https://example.com/chart1.jpg,https://example.com/chart2.jpg"
}
}'Image Requirements:
- Format: JPG, PNG, WebP
- Size: Max 5MB per image
- Count: Up to 9 images per post
- URLs: Must be publicly accessible
Execution Engines
All actions support two execution modes:
Lite Mode (Default)
Characteristics:
- Faster execution
- Lower resource usage
- Good for most tasks
- May be detected by some platforms
When to use:
- High-volume posting
- Simple tasks
- Testing and development
Full Mode
Characteristics:
- Complete browser emulation
- Better platform compatibility
- Higher resource usage
- Less likely to be detected
When to use:
- Important operations
- When lite mode gets detected
- Sensitive accounts
- Complex interactions
Example:
{
"platform": "twitter",
"action": "createTweet",
"accountName": "my-twitter",
"parameters": {
"text": "Important announcement",
"preferredEngine": "full"
}
}Error Handling
Common platform-specific errors:
Twitter/X Errors
TWEET_TOO_LONG- Tweet exceeds 280 charactersRATE_LIMITED- Twitter rate limit exceededTWEET_DUPLICATE- Duplicate tweet contentACCOUNT_SUSPENDED- Twitter account is suspended
Xueqiu Errors
ACCOUNT_NOT_VERIFIED- Xueqiu account needs verificationCONTENT_UNDER_REVIEW- Post requires manual reviewRATE_LIMITED- Daily posting limit exceeded
Eastmoney Errors
INVALID_STOCK_CODE- Stock code format is invalidSTOCK_NOT_FOUND- Stock code doesn't existRATE_LIMITED- Daily comment limit exceeded
Tonghuashun Errors
IMAGE_TOO_LARGE- Image exceeds size limitTOO_MANY_IMAGES- More than 9 images providedIMAGE_DOWNLOAD_FAILED- Cannot download image from URLRATE_LIMITED- Daily posting limit exceeded
Best Practices
1. Respect Rate Limits
// Add delays between posts
for (const post of posts) {
await createTask(post);
await sleep(60000); // 1 minute delay
}2. Handle Errors Gracefully
try {
const task = await createTask(params);
const result = await waitForTask(task.taskId);
} catch (error) {
if (error.code === 'RATE_LIMITED') {
// Wait and retry
await sleep(900000); // 15 minutes
return retry(params);
}
throw error;
}3. Validate Content
// Check tweet length before posting
if (text.length > 280) {
text = text.substring(0, 277) + '...';
}
// Validate stock code format
if (!/^[036]\d{5}$/.test(code)) {
throw new Error('Invalid stock code format');
}4. Use Appropriate Engine
// Use full mode for important posts
const engine = isImportant ? 'full' : 'lite';
await createTask({
platform: 'twitter',
action: 'createTweet',
parameters: {
text: content,
preferredEngine: engine
}
});