Social API

Social-data endpoints sourced from X/Twitter. Use them to gauge sentiment around a topic, surface recent posts, or score the influence of a single account.

Base URL

https://api.mangrovedeveloper.ai/api/v1/social

Authentication

All endpoints require a JWT bearer token.
Authorization: Bearer YOUR_JWT_TOKEN

Endpoints

Get sentiment

GET /api/v1/social/sentiment/{topic} Aggregated sentiment score for a topic or symbol over a lookback window. Path Parameters:
  • topic (string, required): Topic, symbol, or keyword. Examples: BTC, ETH, Solana.
Query Parameters:
  • hours_back (integer, optional): Time window in hours. Default: 24.
curl -H "Authorization: Bearer $TOKEN" \
  "https://api.mangrovedeveloper.ai/api/v1/social/sentiment/BTC?hours_back=24"
Response (200 OK):
{
  "success": true,
  "topic": "BTC",
  "sentiment": "bullish",
  "score": 72.3,
  "mentions": 18420,
  "data": {}
}
sentiment is one of bullish, bearish, or neutral. score is 0–100 (higher = more bullish).

Get mentions

GET /api/v1/social/mentions/{topic} Recent posts matching a topic, ordered most recent first. Path Parameters:
  • topic (string, required): Topic or keyword. Examples: BTC, defi, restaking.
Query Parameters:
  • hours_back (integer, optional): Time window in hours. Default: 24.
  • limit (integer, optional): Max posts to return. Default: 20.
curl -H "Authorization: Bearer $TOKEN" \
  "https://api.mangrovedeveloper.ai/api/v1/social/mentions/restaking?hours_back=12&limit=5"
Response (200 OK):
{
  "success": true,
  "topic": "restaking",
  "count": 5,
  "posts": [
    {
      "id": "1788234567890123456",
      "author": "@example_user",
      "text": "Restaking TVL just crossed $20B...",
      "likes": 128,
      "reposts": 34,
      "created_at": "2026-05-06T19:12:08Z"
    }
  ]
}

Get influence

GET /api/v1/social/influence/{username} Influence score and follower metrics for a single X/Twitter account. Path Parameters:
  • username (string, required): X/Twitter handle without the @. Example: VitalikButerin.
curl -H "Authorization: Bearer $TOKEN" \
  "https://api.mangrovedeveloper.ai/api/v1/social/influence/VitalikButerin"
Response (200 OK):
{
  "success": true,
  "username": "VitalikButerin",
  "score": 98.7,
  "followers": 5300000,
  "data": {
    "verified": true,
    "engagement_rate_30d": 0.024
  }
}
score is 0–100. It blends follower count, engagement rate, and reach.

Error Codes

CodeHTTP StatusDescription
AUTH_REQUIRED401Missing or invalid bearer token
INTERNAL_ERROR500Upstream provider (X/Twitter) error