Skip to main content

Available APIs

Trending Society exposes several APIs for internal and external use.
APIPurposeEndpoint
MCP ServerAI agent toolsmcp.trendingsociety.com
Edge FunctionsServerless functionsymdccxqzmhxgbjbppywf.supabase.co/functions/v1
Supabase RESTDatabase accessymdccxqzmhxgbjbppywf.supabase.co/rest/v1

Authentication

MCP Server

Uses API key authentication:
curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://mcp.trendingsociety.com/tools/list

Supabase APIs

Uses anon key for public access, service role for admin:
import { createClient } from '@supabase/supabase-js'

// Public client (RLS enforced)
const supabase = createClient(
  'https://ymdccxqzmhxgbjbppywf.supabase.co',
  'your-anon-key'
)

// Admin client (bypasses RLS)
const supabaseAdmin = createClient(
  'https://ymdccxqzmhxgbjbppywf.supabase.co',
  'your-service-role-key'
)

Rate Limits

APILimit
MCP Server100 requests/minute
Edge Functions500 requests/minute
Supabase REST1000 requests/minute

Error Handling

All APIs return standard error format:
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": {}
  }
}

Common Error Codes

CodeHTTP StatusDescription
UNAUTHORIZED401Missing or invalid API key
FORBIDDEN403Insufficient permissions
NOT_FOUND404Resource doesn’t exist
RATE_LIMITED429Too many requests
INTERNAL_ERROR500Server error