Developers
API Documentation
Everything you need to integrate with the SocialSweep API and MCP server — search professional networks in natural language, import connections, and connect AI assistants.
Getting Started
The SocialSweep API is a REST API served over HTTPS. All routes use the /v1 prefix.
Base URL
https://api.socialsweep.ai/v1
Getting an API key
- Already have a SocialSweep account? Generate a key under Settings → Developers in the app.
- Building a partner integration and want a test key to evaluate the API? Email support@socialsweep.ai and we’ll set you up with a demo account.
Keep your key private. Anyone with it can access the account and network data it belongs to. Creating a new key automatically revokes the previous one.
Authentication
Authentication uses a simple API key passed as a Bearer token in the Authorization header. No OAuth flow is required. Keys start with ss_ak_ and are long-lived until rotated or revoked.
Using your API key
Authorization: Bearer ss_ak_YOUR_API_KEY
Quick test
curl -H "Authorization: Bearer ss_ak_YOUR_API_KEY" \ https://api.socialsweep.ai/v1/me
Search
Search a network using natural language queries. This is the primary endpoint for mining a network.
/v1/search/peopleRequest body
| Field | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Natural language search query (max 1,000 chars) |
limit | integer | No | Results per page (1–500, default 25) |
offset | integer | No | Pagination offset (default 0) |
filters | object | No | Explicit filter criteria (location, role, etc.) |
minQuality | integer | No | Minimum match quality score (0–100) |
Example request
curl -X POST https://api.socialsweep.ai/v1/search/people \
-H "Authorization: Bearer ss_ak_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "software engineers in San Francisco",
"limit": 10
}'Example response
{
"results": [
{
"person": {
"publicId": "abc-123-def",
"fullName": "John Smith",
"title": "Senior Software Engineer",
"company": "Acme Corp",
"location": "San Francisco, CA",
"connections": [
{ "platform": "linkedin", "handle": "johnsmith" }
]
},
"matchScore": {
"percentage": 87,
"displayScore": 8.7,
"grade": "excellent",
"components": {
"similarity": { "score": 0.85, "weight": 0.35 },
"relationship": { "score": 0.92, "weight": 0.20 },
"filterMatch": { "score": 1.0, "weight": 0.20 },
"quality": { "score": 0.75, "weight": 0.10 },
"queryContext": { "score": 0.80, "weight": 0.05 },
"personalization": { "score": 0.60, "weight": 0.10 }
}
}
}
],
"total": 42,
"processingTimeMs": 245,
"pagination": { "limit": 10, "offset": 0 },
"interpretation": {
"originalQuery": "software engineers in San Francisco",
"searchTerms": ["software", "engineer"],
"intent": "find_people"
}
}Match score grades
| Grade | Percentage | Meaning |
|---|---|---|
excellent | 80–100% | Very strong match |
good | 60–80% | Good match |
fair | 40–60% | Moderate match |
poor | 0–40% | Weak match |
/v1/search/chatConversational AI-powered search. Interprets complex queries and returns results with context.
/v1/search/chat/streamSame as chat search, but returns results via Server-Sent Events (SSE) for real-time streaming.
Projects
Organize searches into projects for recruiting, sales, or research.
/v1/projects| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Project name (max 500 chars) |
queryValue | string | No | Default search query (max 5,000 chars) |
dataSourcePlatforms | string[] | No | linkedin, gmail, twitter, calendar |
status | string | No | draft, active, or completed |
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/projects | List all projects |
GET | /v1/projects/:id | Get a project |
PUT | /v1/projects/:id | Update a project |
DELETE | /v1/projects/:id | Delete a project |
POST | /v1/projects/:id/search | Run a search within the project |
GET | /v1/projects/:id/candidates | Get people found across all searches |
GET | /v1/projects/:id/searches | Get search history for the project |
Conversations
Track multi-turn search conversations and their results.
| Method | Endpoint | Description |
|---|---|---|
POST | /v1/conversations | Create a conversation |
GET | /v1/conversations | List conversations |
GET | /v1/conversations/:id | Get a conversation |
GET | /v1/conversations/:id/results | Get conversation results (people) |
PUT | /v1/conversations/:id | Update a conversation |
DELETE | /v1/conversations/:id | Delete a conversation |
POST | /v1/conversations/:conversationId/messages | Add a message |
GET | /v1/conversations/:conversationId/messages | List messages in a conversation |
Create message body
| Field | Type | Required | Description |
|---|---|---|---|
content | string | Yes | Message content (max 10,000 chars) |
Imports
Import connections from various platforms to build a network graph.
Platform file uploads
Upload platform export files as multipart/form-data with a file field. Max 50 MB per file.
| Method | Endpoint | Description |
|---|---|---|
POST | /v1/imports/linkedin/connections | Upload LinkedIn connections CSV |
POST | /v1/imports/twitter/followers | Upload Twitter/X followers data |
POST | /v1/imports/twitter/following | Upload Twitter/X following data |
POST | /v1/imports/instagram/followers | Upload Instagram followers data |
POST | /v1/imports/instagram/following | Upload Instagram following data |
POST | /v1/imports/facebook/friends | Import Facebook friends (JSON body) |
curl -X POST https://api.socialsweep.ai/v1/imports/linkedin/connections \ -H "Authorization: Bearer ss_ak_YOUR_API_KEY" \ -F "file=@Connections.csv"
CSV contact import (two-step)
For generic CSV files with contacts, use a preview → import flow.
/v1/imports/contacts/csv/preview| Field | Type | Required | Description |
|---|---|---|---|
file | File | Yes | CSV file (max 50 MB) |
columnMappings | JSON string | Yes | Array of column-to-field mappings |
delimiter | string | Yes | ,;\t or | |
Supported target fields: email (required), fullName, firstName, lastName, company, title, phone, linkedinUrl, notes, tags.
/v1/imports/contacts/csv Same parameters as preview, plus ownerUserId (your user ID).
Checking import status
/v1/imports/:id| Status | Description |
|---|---|
PENDING | Created, waiting to be processed |
VALIDATING | File is being validated |
PROCESSING | Contacts are being imported |
COMPLETED | Successfully finished |
PARTIALLY_COMPLETED | Finished with some failures |
FAILED | Processing failed |
CANCELED | Import was cancelled |
Linked Accounts
Manage social platform accounts linked to a profile.
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/me/linked-accounts | List your linked accounts |
POST | /v1/me/linked-accounts | Link a new account |
PATCH | /v1/me/linked-accounts/:linkId | Update a linked account |
DELETE | /v1/me/linked-accounts/:linkId | Remove a linked account |
Link account body
| Field | Type | Required | Description |
|---|---|---|---|
platformId | integer | Yes | Platform ID |
handle | string | Conditional | Platform username (at least one identifier required) |
externalUid | string | Conditional | External user ID |
url | string | Conditional | Profile URL |
isPrimary | boolean | No | Mark as primary account for this platform |
OAuth Integrations
Connect email and contacts providers to automatically sync a network.
Supported providers
| Provider | Code | Syncs |
|---|---|---|
| Gmail | gmail | Email contacts and interaction history |
| Outlook | outlook | Email contacts and interaction history |
| Google Contacts | google-contacts | Contact list |
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/oauth/:provider/auth | Get authorization URL to start OAuth flow |
GET | /v1/oauth/:provider/status | Check if provider is connected |
DELETE | /v1/oauth/:provider/disconnect | Disconnect a provider |
Profile & Anchor
The “anchor” is the Person entity that represents the account owner in the SocialSweep graph.
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/me | Get your user profile |
GET | /v1/me/anchor | Get your anchor person |
PUT | /v1/me/anchor | Update your anchor |
GET | /v1/me/network | Network summary |
GET | /v1/me/account-edges/count | Total resolved connections |
Update anchor body
| Field | Type | Required | Description |
|---|---|---|---|
fullName | string | Conditional | Your name (max 255 chars) |
headline | string | No | Short headline (max 255 chars) |
bio | string | No | Bio (max 2,000 chars) |
Rate Limits
Requests that exceed the limit receive a 429 response.
| Endpoint | Limit |
|---|---|
POST /v1/search/people | 100 requests/min |
POST /v1/imports/contacts/csv/preview | 10 requests/min |
POST /v1/imports/contacts/csv | 5 requests/min |
OAuth /auth | 10 requests/min |
OAuth /status | 30 requests/min |
Rate limit headers are included in every response:
X-RateLimit-Limit: 100 X-RateLimit-Remaining: 97 X-RateLimit-Reset: 1709472000
Error Codes
All errors return a JSON object with error.code and error.message.
{
"error": {
"code": "INVALID_QUERY",
"message": "Query cannot be empty"
}
}| HTTP Status | Meaning |
|---|---|
400 | Bad request — invalid parameters or validation failure |
401 | Unauthorized — missing or invalid API key |
403 | Forbidden — insufficient permissions |
404 | Not found |
429 | Rate limited — too many requests |
500 | Internal server error |
| Code | Description |
|---|---|
SEARCH_ERROR | General search failure |
INVALID_QUERY | Malformed or empty search query |
UNAUTHORIZED | Missing or invalid API key |
RATE_LIMITED | Too many requests |
NO_FILE_UPLOADED | File parameter is missing |
VALIDATION_FAILED | CSV has too many invalid rows (>30%) |
PROVIDER_NOT_FOUND | Invalid OAuth provider |
INTERNAL_ERROR | Server error — contact support |
MCP Server
The SocialSweep MCP (Model Context Protocol) server lets AI assistants like Claude and Manus search a network on the user's behalf. Connect it once and your AI assistant can find people, run queries, and access the social graph.
SSE URL — Manus, Cursor, Windsurf
https://mcp.socialsweep.ai/sseStreamable HTTP URL — Claude
https://mcp.socialsweep.ai/mcpCu Setting up with Cursor
- Open Cursor and go to Settings → MCP.
- Click “Add new global MCP server”.
- Add the following configuration:
{
"mcpServers": {
"socialsweep": {
"url": "https://mcp.socialsweep.ai/sse",
"headers": {
"x-api-key": "ss_ak_YOUR_API_KEY"
}
}
}
} Replace ss_ak_YOUR_API_KEY with your actual API key.
Save and the MCP server should connect automatically. You can now ask Cursor to search your SocialSweep network in Agent mode.
M Setting up with Manus
- Open Manus and navigate to Settings → Integrations → MCP Servers.
- Click “Add Server” and enter:
| Field | Value |
|---|---|
| Name | SocialSweep |
| Server URL | https://mcp.socialsweep.ai/sse |
| API Key / Header | Header x-api-key = ss_ak_YOUR_API_KEY |
Save. Manus can now search your SocialSweep network. Try: “Find engineers in my network who work at YC companies.”
W Setting up with Windsurf
- Open Windsurf and go to Settings → Cascade → MCP.
- Click “Add Server” and select SSE as the transport.
- Enter the server URL and header:
{
"mcpServers": {
"socialsweep": {
"serverUrl": "https://mcp.socialsweep.ai/sse",
"headers": {
"x-api-key": "ss_ak_YOUR_API_KEY"
}
}
}
}Replace the API key with your actual key, save, and reconnect.
* Any MCP-compatible client
For any other MCP client, use the following details:
| Setting | Value |
|---|---|
| SSE transport URL | https://mcp.socialsweep.ai/sse |
| Streamable HTTP URL | https://mcp.socialsweep.ai/mcp |
| Auth header | x-api-key: ss_ak_YOUR_API_KEY |
Use the SSE URL for clients that support Server-Sent Events transport (most clients). Use the Streamable HTTP URL for clients that support the newer MCP HTTP transport (e.g. Claude).
Available MCP tools
Once connected, your AI assistant will have access to these tools:
| Tool | Description |
|---|---|
search_people | Search your network with a natural language query |
get_query_results | Retrieve full results for a previous search query |
Code Examples
Quick-start examples in popular languages.
Python
import requests
API_KEY = "ss_ak_YOUR_API_KEY"
BASE = "https://api.socialsweep.ai/v1"
HEADERS = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
}
resp = requests.post(
f"{BASE}/search/people",
headers=HEADERS,
json={"query": "designers who freelance", "limit": 20},
)
for r in resp.json()["results"]:
p = r["person"]
s = r["matchScore"]["percentage"]
print(f"{p['fullName']} - {p.get('title', 'N/A')} ({s}% match)")JavaScript / TypeScript
const API_KEY = "ss_ak_YOUR_API_KEY";
const BASE = "https://api.socialsweep.ai/v1";
const res = await fetch(`${BASE}/search/people`, {
method: "POST",
headers: {
Authorization: `Bearer ${API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
query: "engineers at YC companies",
limit: 10,
}),
});
const data = await res.json();
console.log(`Found ${data.total} people`);Support
If you run into issues, contact us at support@socialsweep.ai with your request ID (from response headers), the endpoint and request body, and the full error response.
