Skip to content

Platforms API

Reference for platform-specific actions and operations.

Get All Platforms

List all supported platforms with their available actions.

Endpoint:

GET /api/platforms

Example:

bash
curl https://api.browserman.run/api/platforms \
  -H "Authorization: Bearer YOUR_API_KEY"

Response:

json
{
  "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/schema

Example:

bash
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 account
  • text (required) - Tweet text (max 280 characters)
  • preferredEngine (optional) - "lite" or "full"

Example:

bash
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 account
  • tweetUrl (required) - URL of the tweet to like
  • preferredEngine (optional) - "lite" or "full"

Example:

bash
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 account
  • tweetUrl (required) - URL of the tweet to retweet
  • preferredEngine (optional) - "lite" or "full"

Example:

bash
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 account
  • tweetUrl (required) - URL of the tweet to reply to
  • text (required) - Reply text (max 280 characters)
  • preferredEngine (optional) - "lite" or "full"

Example:

bash
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 account
  • tweetUrl (required) - URL of the tweet to quote
  • text (required) - Your comment (max 280 characters)
  • preferredEngine (optional) - "lite" or "full"

Example:

bash
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 account
  • text (required) - Post content
  • preferredEngine (optional) - "lite" or "full"

Example:

bash
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 account
  • code (required) - Stock code (6xxxxx for Shanghai, 0xxxxx/3xxxxx for Shenzhen)
  • text (required) - Comment text
  • preferredEngine (optional) - "lite" or "full"

Example:

bash
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 account
  • text (required) - Post content
  • urls (optional) - Comma-separated image URLs (max 9 images)
  • preferredEngine (optional) - "lite" or "full"

Example (text only):

bash
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):

bash
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:

json
{
  "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 characters
  • RATE_LIMITED - Twitter rate limit exceeded
  • TWEET_DUPLICATE - Duplicate tweet content
  • ACCOUNT_SUSPENDED - Twitter account is suspended

Xueqiu Errors

  • ACCOUNT_NOT_VERIFIED - Xueqiu account needs verification
  • CONTENT_UNDER_REVIEW - Post requires manual review
  • RATE_LIMITED - Daily posting limit exceeded

Eastmoney Errors

  • INVALID_STOCK_CODE - Stock code format is invalid
  • STOCK_NOT_FOUND - Stock code doesn't exist
  • RATE_LIMITED - Daily comment limit exceeded

Tonghuashun Errors

  • IMAGE_TOO_LARGE - Image exceeds size limit
  • TOO_MANY_IMAGES - More than 9 images provided
  • IMAGE_DOWNLOAD_FAILED - Cannot download image from URL
  • RATE_LIMITED - Daily posting limit exceeded

Best Practices

1. Respect Rate Limits

javascript
// Add delays between posts
for (const post of posts) {
  await createTask(post);
  await sleep(60000); // 1 minute delay
}

2. Handle Errors Gracefully

javascript
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

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

javascript
// Use full mode for important posts
const engine = isImportant ? 'full' : 'lite';

await createTask({
  platform: 'twitter',
  action: 'createTweet',
  parameters: {
    text: content,
    preferredEngine: engine
  }
});

Next Steps