Skip to main content
Our API allows you to programmatically access and leverage your professional network data, search profiles and companies, and map relationships across your team’s connections.

Before You Begin

To use The Swarm API, you’ll need:
  1. An active Swarm account - Sign up at app.theswarm.com
  2. Team owner or admin role - API access requires owner or admin permissions
  3. Appropriate plan - API access is included in the Premium plan (14-day free trial available)
  4. An API key - Generate your key from Team Settings

Getting Your API Key

Follow these steps to obtain your API key:
  1. Navigate to Team Settings by clicking your Team name in the top-left corner of the sidebar
  2. Go to the API tab
  3. Click Generate API Key to create your key
  4. Copy the generated key to your clipboard

Authentication

All API requests must include your API key in the headers:
x-api-key: your_api_key_here
This authenticates your requests and provides access to your team-specific data, including profiles, lists, tags, and network connections. Example Request:
curl -X POST https://api.theswarm.com/v1/profiles/search \
  -H "x-api-key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "query": {
      "match_all": {}
    },
    "limit": 10
  }'

Available Endpoints

The Swarm API provides five core endpoints to help you search, retrieve, and analyze professional network data:

Search Profiles

Search through profiles using powerful OpenSearch query capabilities. Filter by job titles, locations, industries, skills, and more. Perfect for finding specific professionals across your network. View Documentation →

Fetch Profiles

Retrieve detailed information about specific profiles by their IDs. Get comprehensive data including employment history, education, contact information, and connection details. View Documentation →

Search Companies

Find companies based on various criteria such as industry, size, location, and more. Access company intelligence data across your network. View Documentation →

Fetch Companies

Get detailed company information including employee counts, locations, industries, and associated profiles from your network. View Documentation →

Network Mapper

Discover pathways and connections between your team and target profiles or companies. Visualize relationship strength and find warm introductions. View Documentation →

Security Best Practices

Your API key is a powerful credential. Protect it like a password:
  • Keep it private - Never share your API key in public repositories (like GitHub) or client-side code
  • Protect your access - Unauthorized use can compromise your data and system integrity
  • Rotate regularly - Generate new keys periodically and revoke old ones
  • Monitor usage - Track API calls to detect any unusual activity

Getting Started Tips

When beginning with the API, we recommend:
  1. Start small - Test with a small batch of requests first to validate your setup
  2. Review the mapping - Understand the OpenSearch mapping before building complex queries
  3. Check examples - Review our example queries for common use cases
  4. Mind rate limits - Be aware of rate limits to avoid throttling
  5. Use pagination - For large result sets, utilize pagination tokens for efficient data retrieval

Encoding Standards

When working with the API, note these encoding conventions:
  • URLs - Always stored and returned encoded using %<hex> format for special characters
  • Slugs - Stored, returned, and sent in requests decoded, exactly as entered
  • Recommendation - Use encoded URLs and decoded slugs in all requests

Need Help?