# Credits & Usage Source: https://docs.theswarm.com/docs/api-reference/credits-usage How API credits are counted and how to retrieve your team's current usage. API credits are consumed based on **results returned, not requests made**. You're charged for what you actually receive — failed calls and empty responses cost 0 credits. ## What costs credits | Endpoint | Cost | | - | - | | [Search Profiles](/docs/endpoints/v3/search-profiles), [Search Companies](/docs/endpoints/v3/search-companies) | Free | | [Fetch Profile](/docs/endpoints/v3/fetch-profile), [Fetch Company](/docs/endpoints/v3/fetch-company) | **1 credit per record returned** | | [Relationships](/docs/endpoints/v3/relationships) | Free | | [Network Mapper](/docs/endpoints/v3/network-mapper) (for Partners) | **1 credit per non-empty response** | ## Examples | Action | Credits | | - | - | | Search returning 250 profiles | 0 | | Fetch 10 profiles, all returned | 10 | | Fetch 10 profiles, 0 returned | 0 | | Any failed request (non-200) | 0 | ## Plans and overages Each plan includes a monthly credit allowance that resets at the start of every billing cycle — credits don't roll over. Once the included credits are used, additional usage is billed at the plan's overage rate. See [Plans, Billing & API Credits](https://help.theswarm.com/en/articles/14121950-plans-billing-connector-limits-api-credits) and [Understanding API credit overages](https://help.theswarm.com/en/articles/14125438-understanding-api-credit-overages). ## Overage protection Overage protection lets you cap API spend at your plan's included credits. It applies to all paid plans (Premium and Enterprise) and is **off by default** — additional usage beyond your monthly allowance is billed at the plan's overage rate (see [pricing](https://www.theswarm.com/pricing)). Toggle it from the [API settings in your dashboard](https://app.theswarm.com/api#overage-protection): * **Off (default):** Requests continue to succeed after you exhaust your included credits. Any additional credits are billed as overages. * **On:** Requests to endpoints that consume credits are paused as soon as your team reaches its monthly credit limit. No overage charges will occur. Access resumes automatically at the start of the next billing cycle. When overage protection is on and the limit is reached, credit-consuming endpoints return a `402 Payment Required` response: ```json theme={null} { "status": 402, "errors": [ { "code": "OVERAGE_PROTECTION_ENABLED", "message": "Requests paused by Overage Protection. Turn it off to continue at overage rates, or upgrade your plan.", "resolution": { "enable_overages": "https://app.theswarm.com/api#overage-protection", "upgrade_plan": "https://app.theswarm.com/upgrade-plan" } } ] } ``` To restore access before the next cycle, either turn overage protection off or [upgrade your plan](https://app.theswarm.com/upgrade-plan). ## Check your usage Retrieve your team's credit usage for the current billing period. ```text theme={null} GET https://bee.theswarm.com/credits/usage ``` Authenticate with your API key in the `x-api-key` header. ### Response ```json theme={null} { "usage": 2255235 } ``` | Field | Type | Description | | :- | :- | :- | | `usage` | integer | Credits consumed in the current billing period. | ### Example request ```bash theme={null} curl -X GET "https://bee.theswarm.com/credits/usage" \ -H "x-api-key: " ``` # Errors Source: https://docs.theswarm.com/docs/api-reference/errors Diagnose and resolve API errors with ease. In case of errors during API requests, appropriate HTTP status codes will be returned to indicate the nature of the issue. These status codes help in understanding and resolving errors efficiently. Additionally, error messages may be provided in the response body to offer further insight into the encountered problem. Refer to the specific HTTP status codes and accompanying error messages to troubleshoot and resolve any encountered errors: | Status code | | Description | | - | - | - | | 200 | OK | Everything worked as expected. | | 400 | Bad Request | The request was unacceptable, often due to missing a required parameter. | | 401 | Unauthorized | No valid API key provided in the `x-api-key` header. | | 402 | Payment Required | Your team has reached its monthly API credit limit with [overage protection](/docs/api-reference/credits-usage#overage-protection) enabled. | | 403 | Forbidden | The API key doesn’t have permissions to perform the request. | | 404 | Not Found | The requested resource doesn’t exist. | | 409 | Conflict | The request conflicts with another request (perhaps due to using the same idempotent key). | | 429 | Too Many Requests | Too many requests hit the API too quickly. We recommend an exponential backoff of your requests. | | 500, 502, 503, 504 | Server Errors | Something went wrong on The Swarm end. (These are rare.) | ## **Need Help?** If you’re experiencing persistent errors or need assistance with error handling, please contact support at [**support@theswarm.com**](mailto:support@theswarm.com). When reporting errors, please include: * The endpoint you’re calling * The request payload * The full error response * Steps to reproduce the issue # API Reference Source: https://docs.theswarm.com/docs/api-reference/introduction 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](http://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**](https://app.theswarm.com/team-settings/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: ```text theme={null} 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. The same key also authenticates [The Swarm MCP](/docs/mcp/overview), if you'd rather query your network from an AI assistant — see [Connect with an API key](/docs/mcp/connect-api-key). ### Partner accounts: acting on behalf of a child team If you're a Swarm Partner, you can execute a request in the context of a child team you manage by adding the `x-authenticate-team` header: ```text theme={null} x-authenticate-team: ``` Omit the header to run the request as the team that owns the API key (default). This header is supported by the [Search Profiles](/docs/endpoints/v3/search-profiles), [Fetch Profile](/docs/endpoints/v3/fetch-profile), [Search Companies](/docs/endpoints/v3/search-companies), [Fetch Company](/docs/endpoints/v3/fetch-company), [Relationships](/docs/endpoints/v3/relationships), and [Add Connector](/docs/endpoints/v3/add-connector) endpoints. See [Create Team](/docs/endpoints/v3/create-team) for how to obtain a `child_team_id`. **Example Request:** ```text theme={null} curl -X POST https://api.theswarm.com/v3/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 these 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 →](/docs/endpoints/v3/search-profiles) ### **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 →](/docs/endpoints/v3/fetch-profile) ### **Search Companies** Find companies based on various criteria such as industry, size, location, and more. Access company intelligence data across your network. [View Documentation →](/docs/endpoints/v3/search-companies) ### **Fetch Companies** Get detailed company information including employee counts, locations, industries, and associated profiles from your network. [View Documentation →](/docs/endpoints/v3/fetch-company) ### **Relationships** Find profiles connected to your team, with connection details. Free to call. [View Documentation →](/docs/endpoints/v3/relationships) ### **Network Mapper** Discover pathways and connections across the partner network. Visualize relationship strength and find warm introductions. [View Documentation →](/docs/endpoints/v3/network-mapper) ## 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 [field mappings](/docs/enrichment-data/profile/mappings-v3) before building complex queries 3. **Check examples** - Review our [example queries](/docs/examples/search-endpoint) for common use cases 4. **Mind rate limits** - Be aware of [rate limits](/docs/api-reference/rate-limiting) 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 `%` 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? * **Support** - Contact our team at [support@theswarm.com](mailto:support@theswarm.com) * **Examples** - Check out example for common patterns * **Pricing** - Learn more about [plans and pricing](https://www.theswarm.com/pricing) # Pagination Source: https://docs.theswarm.com/docs/api-reference/pagination Handling queries with large responses ## Basics * By default, search endpoints for Profiles and Companies return 100 items per page. * The amount can be controlled via the `limit` parameter. * The maximum is 1000 items. ## Pagination When the number of items in the search results exceeds the page limit, a `pagination_token` is returned. This token allows iterating through multiple pages of search results. The pagination token supports Point in Time (PIT) functionality. PIT takes a "snapshot" of the data at a specific moment, creating a fixed view of the index and preventing changes from affecting your search results when iterating across pages. PIT expires 5 minutes after the search query. Control PIT with the `stable_pagination` parameter. When `false`, the search results don't use PIT — you may encounter the same items on subsequent pages, but response times are faster. Use `"stable_pagination": true` only for queries where you expect many results and need to iterate through all of them (for example, pulling all profiles with a certain job title or all employees of a large company). For targeted queries, use `"stable_pagination": false`. You can also increase `limit` (max 1000) to avoid pagination altogether. ### Example **Initial search request** ```json theme={null} { "query": { "match_phrase": { "profile_info.current_company_name": { "value": "google" } } }, "stable_pagination": true } ``` **Response** ```json theme={null} { "ids": [ "d18d9b89-af5d-492c-8ec0-f4ecd06673c7", "58965b08-95d2-4023-a0f9-373bedc16d68", "5a7ba72f-d60c-4ef8-acbb-1424e025361e", "02d2bca9-c43d-4adc-b10e-cb91421d74f5", "02d52528-fdc6-4f29-8639-c1c1f6072799", "02d5f637-f048-41d1-aea5-8d9c64a09ea1" ], "total_count": 451647, "pagination_token": "eyJzYXAiOnsic2VhcmNoX2FmdGVyIjpbeyJmaWVsZCI6Il9zY29yZSIsInZhbHVlIjoxMC4yNTQ3ODF9LHsiZmllbGQiOiJwcm9maWxlX2luZm8uaWQiLCJ2YWx1ZSI6IjAyZDVmNjM3LWYwNDgtNDFkMS1hZWE1LThkOWM2NGEwOWVhMSJ9XX19" } ``` **Request for the next page** ```json theme={null} { "query": { "match_phrase": { "profile_info.current_company_name": { "value": "google" } } }, "stable_pagination": true, "pagination_token": "eyJzYXAiOnsic2VhcmNoX2FmdGVyIjpbeyJmaWVsZCI6Il9zY29yZSIsInZhbHVlIjoxMC4yNTQ3ODF9LHsiZmllbGQiOiJwcm9maWxlX2luZm8uaWQiLCJ2YWx1ZSI6IjAyZDVmNjM3LWYwNDgtNDFkMS1hZWE1LThkOWM2NGEwOWVhMSJ9XX19" } ``` # Rate limiting Source: https://docs.theswarm.com/docs/api-reference/rate-limiting Optimize API usage with rate limits and retry guidance. To ensure fair usage and optimal performance of the API, default rate limiting has been implemented with a threshold set at **60 requests per minute**. Please [contact us](https://www.theswarm.com/company/contact) if you would like to increase it. > [!NOTE] > > If the rate limit is exceeded, subsequent requests will receive a 429 Too Many Requests status code, indicating that the limit has been reached for the current time window. > [!NOTE] > > Users are encouraged to implement appropriate throttling mechanisms on their end to avoid exceeding the rate limit and to handle 429 responses gracefully by backing off and retrying requests after a brief delay. # Add Connector Source: https://docs.theswarm.com/docs/endpoints/v3/add-connector openapi.json POST /team/add-connector Add one or more LinkedIn profiles as connectors to your team. Adds LinkedIn profiles as connectors to your team. A single request can include multiple usernames, making it efficient to onboard connectors in bulk. Connectors are the team members whose LinkedIn connections form your searchable network. The more connectors you have, the broader your network coverage. For a conceptual overview, see [Team Management — Add Connector](/docs/team-management/connector). ## Processing Connector mapping happens asynchronously after the request is accepted. A **202** response means the job was queued successfully — mapping typically completes within seconds but may take a few minutes for profiles with large connection networks. A **200** response means none of the provided usernames were found. No connectors were queued, and the usernames are listed in `usernames_not_found`. In this case, `users_added` and `users_exist` are returned as `null` rather than empty arrays. If every provided username already belongs to a connector in the team, the response is still **202**. `users_added` is empty and the usernames are listed in `users_exist`. Check `users_added` to see whether new connectors were actually added. If a username already exists as a connector in the team, it is skipped (no duplicates) and reported in `users_exist`. The overall response remains 202. ## Groups The optional `group` parameter categorizes connectors within your team. All connectors in a single request receive the same assignment. | Value | Use for | | - | - | | `employees` | Current or former employees of your organization | | `investors` | Investors in your organization | | `customers` | Customers | | `portfolio` | Portfolio companies | | `advisors` | Advisors | | `others` | Any other relationship type | Omit the parameter to add connectors without a group assignment. ## Partner teams Use the `x-authenticate-team` header to add connectors to a specific child team: ```http theme={null} x-authenticate-team: ``` Omitting the header adds connectors to the team associated with your API key. The `child_team_id` is returned when you [create a child team](/docs/endpoints/v3/create-team). # Create Team Source: https://docs.theswarm.com/docs/endpoints/v3/create-team openapi.json POST /team/create-team Create a new child team under your partner account. > [!NOTE] > > Available for Swarm Partners only. [Get in touch](mailto:hello@theswarm.com) to learn more about becoming a partner. Creates a new child team under your partner account. The response returns a `team_id` — save this value, as it is required to authenticate subsequent requests on behalf of that team. For a conceptual overview, see [Team Management — Create Team](/docs/team-management/team). ## Using the team\_id Pass the returned `team_id` in the `x-authenticate-team` header to perform actions in the context of the child team: ```http theme={null} x-authenticate-team: ``` This header is supported by the following endpoints: * [Search Profiles](/docs/endpoints/v3/search-profiles) * [Fetch Profile](/docs/endpoints/v3/fetch-profile) * [Search Companies](/docs/endpoints/v3/search-companies) * [Fetch Company](/docs/endpoints/v3/fetch-company) * [Relationships](/docs/endpoints/v3/relationships) * [Add Connector](/docs/endpoints/v3/add-connector) When the header is omitted, the action is performed in the context of the parent team. ## Team ownership If `owner_email` is omitted, the parent team's owner automatically becomes the owner of the newly created child team. # Fetch Company Source: https://docs.theswarm.com/docs/endpoints/v3/fetch-company openapi.json POST /v3/companies/fetch Retrieve detailed information about companies by their unique identifiers. The Fetch Company endpoint returns comprehensive data for a given company ID. By default, the response contains basic company info and firmographic data. The `fields` array accepts the following values: * **company\_info** — Basic company information and firmographic data (returned by default). * **tags** — Tags assigned to the company. For more details see [Models > Company](/docs/enrichment-data/company). ## Limits Each identifier array (`ids`, `linkedin_slugs`, `linkedin_ids`) accepts up to **1,000 values per request**. Combine arrays freely up to the per-array cap. ## Responses In addition to the standard error responses, this endpoint may return: * **`402 Payment Required`** — your team's API credit allowance has been exceeded. Top up or upgrade your plan to continue. See [Credits & Usage](/docs/api-reference/credits-usage). ## Partner teams Partners can execute a request in the context of a child team by passing the child team's ID in the `x-authenticate-team` header: ```http theme={null} x-authenticate-team: ``` * **With the header** — the fetch runs in the context of the child team (e.g. tag membership reflects the child team). * **Without the header** — the fetch runs in the context of the team that owns the API key (default). The `child_team_id` is returned when you [create a child team](/docs/endpoints/v3/create-team). ```bash Example request theme={null} curl -X POST https://bee.theswarm.com/v3/companies/fetch \ -H "x-api-key: YOUR_API_KEY" \ -H "x-authenticate-team: child-team-id-123" \ -H "Content-Type: application/json" \ -d '{ "linkedin_slugs": ["theswarm"], "fields": ["company_info", "tags"] }' ``` # Fetch Profile Source: https://docs.theswarm.com/docs/endpoints/v3/fetch-profile openapi.json POST /v3/profiles/fetch Retrieve detailed information about specific profiles by their unique identifiers. The Fetch Profile endpoint retrieves specific profiles based on their unique identifiers (profile IDs or LinkedIn usernames). The `fields` array accepts the following values: * **tags** — Tags assigned to the profile. * **lists** — Lists the profile is assigned to. * **profile\_info** — Detailed profile data (work experience, education, etc.). For request examples, see [Fetch endpoint examples](/docs/examples/fetch-endpoint). For the full response schema, see [Models > Profile](/docs/enrichment-data/profile). ## Limits Each identifier array (`ids`, `linkedin_usernames`, `linkedin_ids`, `linkedin_entity_ids`) accepts up to **1,000 values per request**. Combine arrays freely up to the per-array cap. ## Responses In addition to the standard error responses, this endpoint may return: * **`402 Payment Required`** — your team's API credit allowance has been exceeded. Top up or upgrade your plan to continue. See [Credits & Usage](/docs/api-reference/credits-usage). ## Partner teams Partners can execute a request in the context of a child team by passing the child team's ID in the `x-authenticate-team` header: ```http theme={null} x-authenticate-team: ``` * **With the header** — the fetch runs in the context of the child team (e.g. list/tag membership reflects the child team). * **Without the header** — the fetch runs in the context of the team that owns the API key (default). The `child_team_id` is returned when you [create a child team](/docs/endpoints/v3/create-team). ```bash Example request theme={null} curl -X POST https://bee.theswarm.com/v3/profiles/fetch \ -H "x-api-key: YOUR_API_KEY" \ -H "x-authenticate-team: child-team-id-123" \ -H "Content-Type: application/json" \ -d '{ "linkedin_usernames": ["john-doe"], "fields": ["profile_info", "tags", "lists"] }' ``` # Network Mapper Source: https://docs.theswarm.com/docs/endpoints/v3/network-mapper openapi.json POST /v3/network-mapper Map connections across the partner network. Partner permission required. > [!WARNING] > > **Partner permission required.** Calls from an API key not tied to a team with the partner permission in Stripe return **403 Forbidden**. The Network Mapper (Partner) endpoint maps connections across the partner network. It is only available to teams with partner permissions. For team-owned connections, use the free [Relationships](/docs/endpoints/v3/relationships) endpoint instead. ## Pricing | Response | Cost | | - | - | | Non-empty response | **1 credit per response** | | Empty response | Free | Usage is reported under [`GET /credits/usage`](/docs/api-reference/credits-usage). ## Permissions | Caller | Behavior | | - | - | | API key tied to a team with partner permission in Stripe | Endpoint available | | Any other API key | Returns **403 Forbidden** | If you believe your team should have partner access, contact [support@theswarm.com](mailto:support@theswarm.com). ## Responses In addition to the standard error responses, this endpoint may return: * **`402 Payment Required`** — your team's API credit allowance has been exceeded. Top up or upgrade your plan to continue. See [Credits & Usage](/docs/api-reference/credits-usage). ## Response schema See [Models > Network Mapper Partner](/docs/intelligence/network-mapper). ## Task status Long-running queries can be polled with the [Network Mapper Status](/docs/endpoints/v3/network-mapper-status) endpoint. # Network Mapper Status Source: https://docs.theswarm.com/docs/endpoints/v3/network-mapper-status openapi.json GET /v3/network-mapper/status Poll the status of a long-running Network Mapper (Partner) task. Poll the status of a long-running [Network Mapper (Partner)](/docs/endpoints/v3/network-mapper) task. > [!WARNING] > > **Partner permission required.** Calls from an API key not tied to a team with the partner permission in Stripe return **403 Forbidden**. # Relationships Source: https://docs.theswarm.com/docs/endpoints/v3/relationships openapi.json POST /v3/relationships Find connected profiles with their connection details. Renamed from Network Mapper in v3. > [!NOTE] > > Relationships requests do not consume API credits. See [Credits & Usage](/docs/api-reference/credits-usage). By default, the Relationships endpoint returns profiles connected to the team that owns the API key, along with connection details. Responses are returned synchronously. Partners can scope the query to a specific child team by passing the child team's ID in the `x-authenticate-team` header — the response then reflects the connectors and connections of that child team's network instead. See [Partner teams](#partner-teams) below. The request body accepts a standard OpenSearch DSL `query` plus optional `limit` and `pagination_token` top-level parameters. For request and response examples, see [Relationships endpoint examples](/docs/examples/relationships-endpoint). For the response schema, see [Models > Network Mapper](/docs/intelligence/relationships). ## Filtering by indexed fields The OpenSearch DSL `query` body lets you filter on any indexed field on the profile document. The most common patterns are: * **Filter by a specific team member (connector)** — query the top-level `connected_users` field (`keyword`) with a `term` clause. * **Filter by how the connection was synced** — query the nested `team_connections.origins` field (`keyword`) with a `nested` query, typically scoped to your `team_connections.team_id`. * **Filter by profile attributes** — query any indexed profile field (title, company, location, seniority, etc.) the same way you would in [Search Profiles](/docs/endpoints/v3/search-profiles). See [OpenSearch Profile Mappings (v3)](/docs/enrichment-data/profile/mappings-v3) for the full list of indexed fields, and [Relationships endpoint examples](/docs/examples/relationships-endpoint) for ready-to-use queries. ## Partner teams Partners can execute a request in the context of a child team by passing the child team's ID in the `x-authenticate-team` header: ```http theme={null} x-authenticate-team: ``` * **With the header** — the query runs against the child team's network (its connectors and their connections). * **Without the header** — the query runs against the network of the team that owns the API key (default). The `child_team_id` is returned when you [create a child team](/docs/endpoints/v3/create-team). ### Example request ```bash theme={null} curl -X POST https://bee.theswarm.com/v3/relationships \ -H "x-api-key: YOUR_API_KEY" \ -H "x-authenticate-team: child-team-id-123" \ -H "Content-Type: application/json" \ -d '{ "query": { "term": { "profile_info.current_company_website": { "value": "theswarm.com" } } }, "limit": 10 }' ``` # Search Companies Source: https://docs.theswarm.com/docs/endpoints/v3/search-companies openapi.json POST /v3/companies/search Search the company database using OpenSearch DSL queries. Returns a list of company IDs that can be passed to the Fetch Company endpoint. The Search Companies endpoint searches the internal database of Companies using OpenSearch DSL. See [OpenSearch Mapping](/docs/enrichment-data/company/mappings-v3) for available fields. Replace `"query"` with your OpenSearch DSL query and set the `x-api-key` header. Search returns up to **1000 results per page**. Pagination works the same as the [Search Profiles](/docs/endpoints/v3/search-profiles) endpoint. ```json Response example theme={null} { "ids": [ "09d9c510-c9f6-4c6e-9e62-fe5fedbeda87" ], "total_count": 1, "pagination_token": "eyJzZWFyY2hfYWZ0ZXIiOlt7ImZpZWxkIjoiX3Njb3JlIiwidmFsdWUiOjF9LHsiZmllbGQiOiJwcm9maWxlX2luZm8uaWQiLCJ2YWx1ZSI6IjAwMDE2MTU4LWYyY2EtNDYzZC05YWEzLTIyOWZkMzk0ZWQ0MSJ9XX0=" } ``` For query examples, see [Search endpoint examples](/docs/examples/search-endpoint). ## Partner teams Partners can execute a request in the context of a child team by passing the child team's ID in the `x-authenticate-team` header: ```http theme={null} x-authenticate-team: ``` * **With the header** — the search runs in the context of the child team. * **Without the header** — the search runs in the context of the team that owns the API key (default). The `child_team_id` is returned when you [create a child team](/docs/endpoints/v3/create-team). ```bash Example request theme={null} curl -X POST https://bee.theswarm.com/v3/companies/search \ -H "x-api-key: YOUR_API_KEY" \ -H "x-authenticate-team: child-team-id-123" \ -H "Content-Type: application/json" \ -d '{ "query": { "match": { "company_info.industry": { "query": "Software" } } }, "limit": 10 }' ``` # Search Profiles Source: https://docs.theswarm.com/docs/endpoints/v3/search-profiles openapi.json POST /v3/profiles/search Search for profiles using OpenSearch DSL queries. Returns a list of profile IDs that can be passed to the Fetch Profile endpoint. The Search Profiles endpoint searches the profile database based on attributes using OpenSearch DSL. See [OpenSearch Mapping](/docs/enrichment-data/profile/mappings-v3) for available fields. Search returns up to **1000 results per page**. > [!NOTE] > > Replace `"query"` with your OpenSearch DSL query. The response contains a list of profile IDs that can be used in the [Fetch Profile](/docs/endpoints/v3/fetch-profile) endpoint. ```json Response example theme={null} { "ids": [ "00007d1c-a048-480a-8c14-1f33a161a3db", "0000ad61-2eda-4061-a20e-793d41016f03" ], "total_count": 125867, "pagination_token": "eyJzZWFyY2hfYWZ0ZXIiOlt7ImZpZWxkIjoiX3Njb3JlIiwidmFsdWUiOjF9LHsiZmllbGQiOiJwcm9maWxlX2luZm8uaWQiLCJ2YWx1ZSI6IjAwMDE2MTU4LWYyY2EtNDYzZC05YWEzLTIyOWZkMzk0ZWQ0MSJ9XX0=" } ``` For query examples, see [Search endpoint examples](/docs/examples/search-endpoint). For a reference on AND/OR, exact phrase matching, and other operators, see [Query operators](/docs/examples/query-operators). ## Partner teams Partners can execute a request in the context of a child team by passing the child team's ID in the `x-authenticate-team` header: ```http theme={null} x-authenticate-team: ``` * **With the header** — the search is scoped to the child team's context. * **Without the header** — the search runs in the context of the team that owns the API key (default). The `child_team_id` is returned when you [create a child team](/docs/endpoints/v3/create-team). ```bash Example request theme={null} curl -X POST https://bee.theswarm.com/v3/profiles/search \ -H "x-api-key: YOUR_API_KEY" \ -H "x-authenticate-team: child-team-id-123" \ -H "Content-Type: application/json" \ -d '{ "query": { "match": { "profile_info.job_title": { "query": "Data Scientist" } } }, "limit": 10 }' ``` ### Pagination The response includes a `pagination_token` to fetch the next page. See [Pagination](/docs/api-reference/pagination) for full details. The `from` parameter must be `>= 0`. # OpenSearch Company Mappings (v3) Source: https://docs.theswarm.com/docs/enrichment-data/company/mappings-v3 OpenSearch field mapping for v3 company data. Employ this mapping while formulating OpenSearch queries within the Company Search API to precisely refine your search results. ```json opensearch_company_mapping_v3 lines theme={null} { "mappings": { "dynamic": "false", "properties": { "company_info": { "properties": { "alternative_names": { "type": "text", "fields": { "raw": { "type": "keyword" } } }, "business_data": { "properties": { "customer_types": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" }, "is_acquired": { "type": "boolean" }, "is_exited": { "type": "boolean" }, "is_government": { "type": "boolean" }, "is_non_profit": { "type": "boolean" }, "is_shut_down": { "type": "boolean" }, "is_startup": { "type": "boolean" }, "is_stealth": { "type": "boolean" }, "ownership_status": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" }, "ownership_status_detailed": { "type": "text", "fields": { "raw": { "type": "keyword" } } }, "stock_exchange": { "type": "keyword", "normalizer": "lowercase_trim_normalizer" } } }, "canonical_name": { "type": "keyword", "normalizer": "lowercase_trim_normalizer" }, "data_updated_at": { "type": "date" }, "description": { "type": "text" }, "founded": { "type": "date" }, "id": { "type": "keyword" }, "industries": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" }, "industry": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" }, "linkedin_slugs": { "type": "keyword", "normalizer": "lowercase_trim_normalizer" }, "locations": { "type": "nested", "properties": { "country": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" }, "headquarter": { "type": "text", "fields": { "raw": { "type": "keyword" } } }, "name": { "type": "text", "fields": { "raw": { "type": "keyword" } } } } }, "name": { "type": "text", "fields": { "raw": { "type": "keyword" } } }, "size": { "properties": { "class": { "type": "keyword" }, "class_sort": { "type": "integer" } } }, "social_media": { "type": "nested", "properties": { "id": { "type": "keyword" }, "network": { "type": "keyword" }, "slug": { "type": "keyword" }, "url": { "type": "keyword" } } }, "summary": { "type": "text" }, "updated_at": { "type": "date" }, "website": { "type": "text", "fields": { "raw": { "type": "keyword" } } }, "websites": { "type": "text", "fields": { "raw": { "type": "keyword" } } }, "workforce": { "properties": { "class": { "type": "keyword" }, "class_sort": { "type": "integer" }, "headcount": { "type": "integer" } } } } }, "connected_team_ids": { "type": "keyword" }, "crm_ids": { "type": "keyword" }, "funding_data": { "properties": { "last_round_amount_usd": { "type": "long" }, "last_round_date": { "type": "date" }, "last_round_investors": { "type": "nested", "properties": { "crunchbase_id": { "type": "keyword" }, "crunchbase_slug": { "type": "keyword" }, "id": { "type": "keyword" }, "kind": { "type": "keyword" }, "name": { "type": "text" } } }, "last_round_type": { "type": "keyword" }, "rounds": { "type": "nested", "properties": { "amount_usd": { "type": "long" }, "date": { "type": "date" }, "investors": { "type": "nested", "properties": { "crunchbase_id": { "type": "keyword" }, "crunchbase_slug": { "type": "keyword" }, "id": { "type": "keyword" }, "kind": { "type": "keyword" }, "name": { "type": "text" } } }, "type": { "type": "keyword" } } }, "total_funding_amount_usd": { "type": "long" } } }, "investor_data": { "properties": { "check_size": { "type": "keyword" }, "geography_focus": { "type": "keyword" }, "industry_focus": { "type": "keyword" }, "portfolio_companies": { "type": "nested", "properties": { "company_id": { "type": "keyword" } } }, "stage_focus": { "type": "keyword" }, "type": { "type": "keyword" } } }, "team_connections": { "type": "nested", "properties": { "connected_members_count": { "type": "integer" }, "team_id": { "type": "keyword" } } }, "text_search": { "type": "text" }, "updated_at": { "type": "date" } } } } ``` # Company Endpoint Overview Source: https://docs.theswarm.com/docs/enrichment-data/company/overview Overview of the data model representing a record returned by the Fetch Company endpoint. ## Fill rate Data completeness for selected fields: | Field | Total | US | | - | - | - | | company\_info.name | 100% | 100% | | company\_info.website | 15% | 75% | | company\_info.locations | 18% | 100% | | company\_info.industry | 15% | 80% | | company\_info.linkedin\_slugs | 22% | 99% | ## JSON schema Here you can find the full Company JSON Schema (v3): ```json theme={null} { "type": "object", "properties": { "id": { "type": "string" }, "company_info": { "type": "object", "properties": { "id": { "type": "string" }, "linkedin_slugs": { "type": "array", "items": { "type": "string" } }, "name": { "type": "string" }, "canonical_name": { "type": "string" }, "alternative_names": { "type": "array", "items": { "type": "string" } }, "description": { "type": "string" }, "summary": { "type": "string" }, "contact_info": { "type": "object", "properties": { "email": { "type": "string" }, "phone": { "type": "string" }, "url": { "type": "string" } } }, "founded": { "type": "string" }, "industries": { "type": "array", "items": { "type": "string" } }, "websites": { "type": "array", "items": { "type": "string" } }, "workforce": { "type": "object", "properties": { "headcount": { "type": "integer" }, "historical_headcount": { "type": "array", "items": { "type": "object", "properties": { "timestamp": { "type": "integer" }, "count": { "type": "integer" } } } }, "size_class": { "type": "string" } } }, "tech_stack": { "type": "object", "properties": { "products": { "type": "array", "items": { "type": "string" } } } }, "business_data": { "type": "object", "properties": { "identifiers": { "type": "object", "properties": { "stock_ticker": { "type": "string" }, "duns_code": { "type": "string" }, "cage_code": { "type": "string" }, "naics_code": { "type": "string" } } }, "customer_types": { "type": "array", "items": { "type": "string" } }, "stock_exchange": { "type": "string" }, "is_acquired": { "type": "boolean" }, "is_exited": { "type": "boolean" }, "is_government": { "type": "boolean" }, "is_non_profit": { "type": "boolean" }, "is_shut_down": { "type": "boolean" }, "is_startup": { "type": "boolean" }, "is_stealth": { "type": "boolean" }, "ownership_status": { "type": "string" }, "ownership_status_detailed": { "type": "string" }, "patent_count": { "type": "integer" }, "financing_profile": { "type": "object", "properties": { "status": { "type": "string" }, "ipo_date": { "type": "string" }, "outstanding_shares": { "type": "number" }, "market_cap": { "type": "number" } } } } }, "social_media": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "network": { "type": "string" }, "url": { "type": "string" }, "slug": { "type": "string" } } } }, "locations": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "country": { "type": "string" }, "is_primary": { "type": "boolean" } } } }, "logo_url": { "type": "string" }, "investor": { "type": "object", "properties": { "type": { "type": "array", "items": { "type": "string" } }, "specialities": { "type": "array", "items": { "type": "string" } }, "investments": { "type": "array", "items": { "type": "string" } }, "geography_focus": { "type": "array", "items": { "type": "string" } } } }, "funding": { "type": "object", "properties": { "last_round": { "type": "object", "properties": { "last_round_type": { "type": "string" }, "last_round_amount_usd": { "type": "integer" }, "last_round_date": { "type": "string" }, "last_round_investors": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "kind": { "type": "string", "enum": [ "Unknown", "Profile", "Company" ] }, "name": { "type": "string" }, "crunchbase_slug": { "type": "string" } } } } } }, "rounds": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string" }, "amount_usd": { "type": "integer" }, "date": { "type": "string" }, "investors": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "kind": { "type": "string", "enum": [ "Unknown", "Profile", "Company" ] }, "name": { "type": "string" }, "crunchbase_slug": { "type": "string" } } } } } } }, "total_funding_amount_usd": { "type": "integer" } } }, "updated_at": { "type": "string" } } }, "tags": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } } }, "found_by": { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "string" } }, "linkedin_names": { "type": "array", "items": { "type": "string" } }, "linkedin_ids": { "type": "array", "items": { "type": "integer" } } } } } } ``` # Company Sample Data Source: https://docs.theswarm.com/docs/enrichment-data/company/sample-data Example JSON response payload for a company record returned by the v3 Fetch Company endpoint. The example below shows the full shape of a company record as returned by the [v3 Fetch Company](/docs/endpoints/v3/fetch-company) endpoint. Use it as a reference when wiring up your client code or mapping fields into your own data model. For field-by-field descriptions, see the [Company Endpoint Overview](/docs/enrichment-data/company/overview). ```json Company theme={null} { "id": "09d9c510-c9f6-4c6e-9e62-fe5fedbeda87", "company_info": { "id": "09d9c510-c9f6-4c6e-9e62-fe5fedbeda87", "name": "The Swarm", "canonical_name": "wearetheswarm", "alternative_names": [ "Swarm Holdings, Inc.", "The Swarm", "The Network Relationship Management (NRM) Platform", "GTN Platform" ], "description": "The Swarm curates a rich dataset of 580M profiles with daily job changes, 100M companies with fundraising data, and a unique relationship mapping AI engine for builders and investors.\n\nInterested in exploring? Chat with our new AI CEO at theswarm.com/ai-ceo", "summary": "Your Go-To-Network Platform.", "contact_info": { "email": "hello@theswarm.com", "phone": "+1 (415) 966-5539", "url": "www.theswarm.com/start" }, "founded": "2021-01-01T00:00:00Z", "industries": [ "Business Development", "Software Development" ], "websites": [ "theswarm.com" ], "workforce": { "headcount": 19, "historical_headcount": [ { "timestamp": 1627776000000, "count": 1 }, { "timestamp": 1643554476000, "count": 3 }, { "timestamp": 1646184222000, "count": 7 } ], "size_class": "11-50" }, "tech_stack": { "products": [ "mongodb", "mysql", "nosql", "userzoom", "ios" ] }, "business_data": { "identifiers": { "stock_ticker": "SWRM", "duns_code": "884745530", "cage_code": "1A2B3", "naics_code": "884745530" }, "customer_types": [ "B2G", "B2C" ], "stock_exchange": "NASDAQ", "is_acquired": false, "is_exited": false, "is_government": false, "is_non_profit": false, "is_shut_down": false, "is_startup": false, "is_stealth": false, "ownership_status": "active", "ownership_status_detailed": "Privately Held (backing)", "patent_count": 4, "financing_profile": { "status": "Venture Capital-Backed", "ipo_date": "2017-05-15T13:30:00Z", "outstanding_shares": 2200000000, "market_cap": 1984507936768 } }, "social_media": [ { "network": "crunchbase", "slug": "the-swarm-e90d", "url": "crunchbase.com/organization/the-swarm-e90d" }, { "network": "dealroom", "url": "app.dealroom.co/companies/the_swarm_1" }, { "network": "facebook", "url": "www.facebook.com/wearetheswarm" }, { "network": "linkedin", "slug": "wearetheswarm", "url": "linkedin.com/company/wearetheswarm" }, { "network": "pitchbook", "url": "pitchbook.com/profiles/company/496661-59" }, { "network": "twitter", "url": "twitter.com/wearetheswarm" } ], "linkedin_slugs": [ "wearetheswarm" ], "locations": [ { "name": "San Francisco, California, United States", "country": "United States", "is_primary": true }, { "name": "Kraków", "country": "Poland", "is_primary": false } ], "logo_url": "https://cdn.theswarm.com/companies/logos/09d/9c5/09d9c510-c9f6-4c6e-9e62-fe5fedbeda87/300x300/c246b0439337c792a9651899b27570bc.jpeg", "investor": { "type": [ "fund of funds", "venture fund" ], "specialities": [ "network", "network management", "sales", "go-to-network" ], "investments": [ "pre-seed", "seed" ], "geography_focus": [ "united states" ] }, "funding": { "last_round": { "last_round_type": "seed", "last_round_amount_usd": 1000000, "last_round_date": "2023-12-01T00:00:00Z", "last_round_investors": [ { "id": "aa17de4b-bff3-470e-b2e2-69e3d048b50b", "kind": "Company", "name": "Microsoft", "crunchbase_slug": "microsoft" } ] }, "rounds": [ { "type": "seed", "amount_usd": 1000000, "date": "2023-12-01T00:00:00Z", "investors": [ { "id": "aa17de4b-bff3-470e-b2e2-69e3d048b50b", "kind": "Company", "name": "Microsoft", "crunchbase_slug": "microsoft" } ] } ], "total_funding_amount_usd": 1000000 }, "updated_at": "2026-06-08T20:58:40.995418Z" } } ``` # OpenSearch Profile Mappings (v3) Source: https://docs.theswarm.com/docs/enrichment-data/profile/mappings-v3 OpenSearch field mapping for v3 profile data. Use this mapping when building OpenSearch DSL queries against the [v3 Search Profiles](/docs/endpoints/v3/search-profiles) and [Relationships](/docs/endpoints/v3/relationships) endpoints. The mapping defines which fields are indexed and how (`keyword`, `text`, `nested`, etc.), which determines the query clauses you can use against each field. v3 adds `recruiting_signals`, `job_seeking_signals`, `probably_fake`, and the nested `team_connections.origins` field to the profile index, among other changes from v2. ## Boolean signal fields `profile_info.recruiting_signals`, `profile_info.job_seeking_signals`, and `profile_info.probably_fake` are `boolean` fields you can filter on. They are stored only when the value is `true`, so an absent field means `false`. To match profiles where a signal is `true`, use a `term` query: ```json theme={null} { "query": { "term": { "profile_info.recruiting_signals": true } } } ``` To match profiles where a signal is `false`, exclude `true` with `must_not` instead of querying for `false`: ```json theme={null} { "query": { "bool": { "must_not": [ { "term": { "profile_info.job_seeking_signals": true } } ] } } } ``` > [!WARNING] > > `profile_info.hiring` and `profile_info.open_to_work` are deprecated and will be removed after 2026/12/07. Use `profile_info.recruiting_signals` and `profile_info.job_seeking_signals` instead. ## Full-text search field `text_search` is a top-level `text` field (no `profile_info.` prefix). Values from `profile_info.first_name`, `last_name`, `linkedin_usernames`, `emails`, `job_company_name`, and `job_title` are copied into it, so one `match` query searches across all of them: ```json theme={null} { "query": { "match": { "text_search": "jane acme" } } } ``` ## Deprecated fields These fields are still indexed but deprecated. Use the replacement in new queries. | Deprecated field | Use instead | | - | - | | `profile_info.hiring` | `profile_info.recruiting_signals` | | `profile_info.open_to_work` | `profile_info.job_seeking_signals` | | `profile_info.linkedin_usernames` | `profile_info.linkedin_accounts` | | `profile_info.industry` | `profile_info.industries` | | `profile_info.job_company_id` | `profile_info.current_company_id` | | `profile_info.job_company_name` | `profile_info.current_company_name` | | `profile_info.job_company_industry`, `profile_info.current_company_industry` | `profile_info.current_company_industries` | | `profile_info.job_company_location_name` | `profile_info.current_company_location` | | `profile_info.job_company_location_country` | `profile_info.current_company_location_country` | | `profile_info.job_company_size` | `profile_info.current_company_size` | | `profile_info.job_company_website`, `profile_info.current_company_website` | `profile_info.current_company_websites` | | `profile_info.job_company_linkedin_slugs` | `profile_info.current_company_linkedin_slugs` | | `profile_info.job_title` | `profile_info.current_title` | | `profile_info.job_start_date` | `profile_info.current_start_date` | | `profile_info.recent_job_title` | `profile_info.recent_title` | | `profile_info.all_time_job_title` | `profile_info.all_time_title` | | `profile_info.job_seniority`, `profile_info.current_seniority` | `profile_info.current_seniorities` | | `profile_info.job_title_role` | `profile_info.current_job_function` | | `profile_info.location_name` | `profile_info.current_location` | | `profile_info.experience.is_primary` | `profile_info.experience.is_current` | | `profile_info.experience.seniority` | `profile_info.experience.seniorities` | | `profile_info.experience.company.industry` | `profile_info.experience.company.industries` | | `profile_info.experience.company.website` | `profile_info.experience.company.websites` | > [!NOTE] > > Many replacements are aliases that point to the deprecated field (for example `current_title` → `job_title`). Aliases work for `match` queries. For `term`/`terms` on `.raw`, target the underlying field, as described in [Query operators](/docs/examples/query-operators). ## Mapping > [!NOTE] > > **Querying `team_connections.origins`** — accepted values (provisional, may change): `csv`, `plugin`, `overlaps`, `google`, `google-calendar`, `user-profile`, `manual-csv`, `education-overlaps`, `investor-overlaps`, `manual-url`, `social-engagement`. Use a [nested query](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-nested-query.html) scoped to your `team_connections.team_id` — see [Relationships endpoint examples](/docs/examples/relationships-endpoint#filtering-by-team-connection-origin). This query-side vocabulary differs from the response-side `connections[].sources[].origin` enum. ```json opensearch_profile_mapping_v3 lines theme={null} { "mappings": { "dynamic": "false", "properties": { "profile_info": { "properties": { "about": { "type": "text" }, "all_time_job_title": { "type": "text", "fields": { "raw": { "type": "keyword" } } }, "all_time_title": { "type": "alias", "path": "profile_info.all_time_job_title" }, "certifications": { "type": "nested", "properties": { "company_name": { "type": "text", "fields": { "raw": { "type": "keyword" } } }, "name": { "type": "text", "fields": { "raw": { "type": "keyword" } } } } }, "created_at": { "type": "date" }, "current_company_id": { "type": "alias", "path": "profile_info.job_company_id" }, "current_company_industries": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" }, "current_company_industry": { "type": "alias", "path": "profile_info.job_company_industry" }, "current_company_linkedin_slugs": { "type": "alias", "path": "profile_info.job_company_linkedin_slugs" }, "current_company_location": { "type": "alias", "path": "profile_info.job_company_location_name" }, "current_company_location_country": { "type": "alias", "path": "profile_info.job_company_location_country" }, "current_company_name": { "type": "alias", "path": "profile_info.job_company_name" }, "current_company_size": { "type": "alias", "path": "profile_info.job_company_size" }, "current_company_website": { "type": "alias", "path": "profile_info.job_company_website" }, "current_company_websites": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" }, "current_job_function": { "type": "alias", "path": "profile_info.job_title_role" }, "current_job_updated_at": { "type": "date" }, "current_location": { "type": "alias", "path": "profile_info.location_name" }, "current_seniorities": { "type": "alias", "path": "profile_info.job_seniority" }, "current_seniority": { "type": "alias", "path": "profile_info.job_seniority" }, "current_start_date": { "type": "alias", "path": "profile_info.job_start_date" }, "current_title": { "type": "alias", "path": "profile_info.job_title" }, "data_updated_at": { "type": "date" }, "education": { "type": "nested", "properties": { "degrees": { "type": "text" }, "end_date": { "type": "date" }, "majors": { "type": "text" }, "school": { "properties": { "linkedin_slugs": { "type": "keyword", "normalizer": "lowercase_trim_normalizer" }, "location": { "properties": { "name": { "type": "text", "fields": { "raw": { "type": "keyword" } } } } }, "name": { "type": "text", "fields": { "raw": { "type": "keyword" } } }, "website": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" } } }, "start_date": { "type": "date" } } }, "emails": { "type": "keyword", "normalizer": "lowercase_trim_normalizer" }, "experience": { "type": "nested", "properties": { "company": { "properties": { "id": { "type": "keyword" }, "industries": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" }, "industry": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" }, "linkedin_slugs": { "type": "keyword", "normalizer": "lowercase_trim_normalizer" }, "location": { "properties": { "continent": { "type": "text", "fields": { "raw": { "type": "keyword" } } }, "country": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" }, "name": { "type": "text", "fields": { "raw": { "type": "keyword" } } } } }, "name": { "type": "text", "fields": { "raw": { "type": "keyword" } } }, "size": { "type": "keyword" }, "website": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" }, "websites": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" } } }, "description": { "type": "text" }, "end_date": { "type": "date" }, "function": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" }, "is_current": { "type": "alias", "path": "profile_info.experience.is_primary" }, "is_primary": { "type": "boolean" }, "location": { "properties": { "name": { "type": "text", "fields": { "raw": { "type": "keyword" } } } } }, "job_type": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" }, "seniorities": { "type": "alias", "path": "profile_info.experience.seniority" }, "seniority": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" }, "skills": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" }, "start_date": { "type": "date" }, "status": { "type": "keyword" }, "title": { "properties": { "name": { "type": "text", "fields": { "raw": { "type": "keyword" } } } } } } }, "first_name": { "type": "keyword", "normalizer": "lowercase_trim_normalizer" }, "full_name": { "type": "text" }, "headline": { "type": "text" }, "hiring": { "type": "boolean" }, "id": { "type": "keyword" }, "industries": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" }, "industry": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" }, "job_company_id": { "type": "keyword" }, "job_company_industry": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" }, "job_company_linkedin_slugs": { "type": "keyword", "normalizer": "lowercase_trim_normalizer" }, "job_company_location_country": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" }, "job_company_location_name": { "type": "text", "fields": { "raw": { "type": "keyword" } } }, "job_company_name": { "type": "text", "fields": { "raw": { "type": "keyword" } } }, "job_company_size": { "type": "keyword" }, "job_company_website": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" }, "job_seeking_signals": { "type": "boolean" }, "job_seniority": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" }, "job_start_date": { "type": "date" }, "job_title": { "type": "text", "fields": { "raw": { "type": "keyword" } } }, "job_title_role": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" }, "languages": { "type": "keyword", "normalizer": "lowercase_acsiifold_normalizer" }, "last_name": { "type": "keyword", "normalizer": "lowercase_trim_normalizer" }, "latest_company_change_at": { "type": "date" }, "latest_role_change_at": { "type": "date" }, "linkedin_accounts": { "properties": { "connections": { "type": "integer" }, "entity_id": { "type": "keyword" }, "followers": { "type": "integer" }, "id": { "type": "keyword" }, "join_date": { "type": "date" }, "status": { "type": "keyword" }, "username": { "type": "keyword", "normalizer": "lowercase_trim_normalizer" } } }, "linkedin_usernames": { "type": "keyword", "normalizer": "lowercase_trim_normalizer" }, "location_locality": { "type": "text", "fields": { "raw": { "type": "keyword" } } }, "location_name": { "type": "text", "fields": { "raw": { "type": "keyword" } } }, "location_country": { "type": "text", "fields": { "raw": { "type": "keyword" } } }, "location_continent": { "type": "text", "fields": { "raw": { "type": "keyword" } } }, "location_region": { "type": "text", "fields": { "raw": { "type": "keyword" } } }, "open_to_work": { "type": "boolean" }, "probably_fake": { "type": "boolean" }, "recent_job_title": { "type": "text", "fields": { "raw": { "type": "keyword" } } }, "recent_title": { "type": "alias", "path": "profile_info.recent_job_title" }, "recruiting_signals": { "type": "boolean" }, "refreshed_at": { "type": "date" }, "skills": { "type": "text", "fields": { "raw": { "type": "keyword" } } }, "smart_tags": { "type": "keyword", "normalizer": "lowercase_trim_normalizer" }, "updated_at": { "type": "date" }, "work_emails": { "type": "keyword", "normalizer": "lowercase_trim_normalizer" } } }, "tags": { "type": "keyword" }, "tags_company": { "type": "keyword" }, "text_search": { "type": "text" }, "team_connections": { "type": "nested", "properties": { "connected_members_count": { "type": "integer" }, "origins": { "type": "keyword" }, "strength": { "type": "long" }, "strength_normalized": { "type": "keyword" }, "team_id": { "type": "keyword" } } }, "connections": { "type": "nested", "properties": { "origins": { "type": "keyword" }, "sources": { "type": "keyword" }, "strength": { "type": "long" }, "strength_normalized": { "type": "keyword" }, "user_id": { "type": "keyword" } } } } } } ``` # Profile Endpoint Overview Source: https://docs.theswarm.com/docs/enrichment-data/profile/overview Overview of the data model representing a profile returned by the Fetch endpoint Explore the detailed breakdown of each item model component, complete with properties and their descriptions. ## Response keys (v3) The Profile JSON response from `POST /v3/profiles/fetch` is built around four keys: | Key | Description | | - | - | | id | ID of the person assigned by The Swarm that was previously returned by the `/search` endpoint. | | `profile_info` | Detailed profile data, e.g. work experience, education, etc. | | `lists` | A list of Lists that the person is assigned to along with the status in the list. | | `tags` | All tags assigned to the profile by any of the team members. | > [!NOTE] > > **v2 also returned `connections` and `notes`.** Both are removed in v3. > > * For connections, use the [Relationships](/docs/endpoints/v3/relationships) endpoint — it's free and exposes the same data. > * The notes feature is being retired and has no v3 replacement. ## New fields in v3 The following fields are added to profile responses in v3: | Field | Type | Description | | - | - | - | | `profile_info.recruiting_signals` | boolean (only present when `true`) | `true` when the person shows signals that they recruit. Same value as `hiring`. | | `profile_info.job_seeking_signals` | boolean (only present when `true`) | `true` when the person shows signals that they look for a job. Same value as `open_to_work`. | | `profile_info.probably_fake` | boolean (only present when `true`) | `true` when the profile is probably fake. | | `profile_info.hiring` | boolean (only present when `true`) | **Deprecated.** Use `recruiting_signals` instead. Will be removed after 2026/12/07. | | `profile_info.open_to_work` | boolean (only present when `true`) | **Deprecated.** Use `job_seeking_signals` instead. Will be removed after 2026/12/07. | | `profile_info.current_company_logo_url` | string (CDN URL) | Logo URL for the profile's current company. | | `profile_info.experience[].company.logo_url` | string (CDN URL) | Logo URL on each experience entry's company. | | `profile_info.experience[].start_date_confidence` | string (`"validated"` or `"low"`) | Confidence indicator on each experience entry's start date. | > [!WARNING] > > **Absent means false.** `recruiting_signals`, `job_seeking_signals`, `probably_fake`, `hiring`, and `open_to_work` appear only when their value is `true`. If a field is missing from a response, treat it as `false`. The API never returns these fields with a `false` value. This applies to [Fetch Profile](/docs/endpoints/v3/fetch-profile), [Search Profiles](/docs/endpoints/v3/search-profiles), the fetch-refresh endpoint, and the [MCP server](/docs/mcp/overview). > [!NOTE] > > `hiring` and `open_to_work` are deprecated and will be removed after 2026/12/07. Switch to `recruiting_signals` and `job_seeking_signals`, which return the same values. ## Fill rate Data completeness for selected fields: | Field | Total | US | | :- | :- | :- | | `profile_info.id` | 100.0% | 100.0% | | `profile_info.full_name` | 100.0% | 100.0% | | `profile_info.first_name` | 99.5% | 99.7% | | `profile_info.last_name` | 99.2% | 99.5% | | `profile_info.linkedin_url` | 100.0% | 100.0% | | `profile_info.social_media` | 100.0% | 100.0% | | `profile_info.headline` | 56.5% | 50.4% | | `profile_info.about` | 25.8% | 24.3% | | `profile_info.current_location` | 99.5% | 100.0% | | `profile_info.work_email` | 20.7% | 45.8% | | `profile_info.personal_emails` | 18.1% | 28.6% | | `profile_info.current_title` | 93.1% | 93.6% | | `profile_info.current_function` | 50.4% | 62.6% | | `profile_info.current_seniorities` | 88.8% | 90.0% | | `profile_info.current_job_updated_at` | 74.1% | 75.4% | | `profile_info.current_company_id` | 62.0% | 65.5% | | `profile_info.current_company_name` | 92.4% | 93.0% | | `profile_info.current_company_logo_url` | 49.1% | 53.4% | | `profile_info.current_company_websites` | 56.4% | 61.4% | | `profile_info.current_company_size` | 55.7% | 59.5% | | `profile_info.current_company_industries` | 58.2% | 63.3% | | `profile_info.current_company_location` | 56.8% | 62.2% | | `profile_info.current_company_linkedin_url` | 60.1% | 64.9% | | `profile_info.experience` | 93.4% | 94.0% | | `profile_info.education` | 57.4% | 57.4% | | `profile_info.skills` | 50.1% | 50.4% | | `profile_info.languages` | 13.2% | 9.4% | | `profile_info.certifications` | 12.8% | 12.9% | | `profile_info.smart_tags` | 49.9% | 46.0% | | `profile_info.hiring` | 57.1% | 51.3% | | `profile_info.open_to_work` | 57.1% | 51.3% | | `profile_info.latest_role_change_at` | 65.4% | 65.4% | | `profile_info.latest_company_change_at` | 45.6% | 47.5% | | `profile_info.last_refresh_at` | 54.8% | 49.2% | | `profile_info.created_at` | 100.0% | 100.0% | | `profile_info.updated_at` | 100.0% | 100.0% | ## Timestamp fields | Field | Description | | :- | :- | | latest\_role\_change\_at | Timestamp representing the start date of the most recent job detected for the profile. | | current\_job\_updated\_at | Timestamp of the most recent change detected in the current primary job, which includes changes in company, title, or both. | | updated\_at | Timestamp of the last update to any field in the profile document. Reflects any modification to the profile data. | | created\_at | Timestamp indicating when the profile was created in our database. | | last\_refresh\_at | Timestamp of the latest attempt to refresh the profile data - either via rescraping the internet or receiving updated information from a data partner. | ## JSON schema Here you can find the full Profile JSON Schema (v3): ```json theme={null} { "type": "object", "properties": { "id": { "type": "string" }, "lists": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "string" } } } }, "tags": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } } }, "profile_info": { "type": "object", "properties": { "id": { "type": "string" }, "full_name": { "type": "string" }, "first_name": { "type": "string" }, "last_name": { "type": "string" }, "headline": { "type": "string" }, "about": { "type": "string" }, "linkedin_url": { "type": "string" }, "work_email": { "type": "string" }, "personal_emails": { "type": "array", "items": { "type": "string" } }, "current_title": { "type": "string" }, "current_function": { "type": "string" }, "current_seniorities": { "type": "array", "items": { "type": "string" } }, "current_company_id": { "type": "string" }, "current_company_name": { "type": "string" }, "current_company_logo_url": { "type": "string" }, "current_company_size": { "type": "object", "properties": { "min": { "type": "integer" }, "max": { "type": "integer" } } }, "current_company_location": { "type": "string" }, "current_company_linkedin_url": { "type": "string" }, "current_company_websites": { "type": "array", "items": { "type": "string" } }, "current_company_industries": { "type": "array", "items": { "type": "string" } }, "experience": { "type": "array", "items": { "type": "object", "properties": { "is_current": { "type": "boolean" }, "company_id": { "type": "string" }, "company": { "type": "object", "properties": { "id": { "type": "string" }, "canonical_name": { "type": "string" }, "name": { "type": "string" }, "founded": { "type": "string" }, "size": { "type": "object", "properties": { "min": { "type": "integer" }, "max": { "type": "integer" } } }, "social_media": { "type": "array", "items": { "type": "object", "properties": { "network": { "type": "string" }, "id": { "type": "string" }, "slug": { "type": "string" }, "url": { "type": "string" }, "url_status": { "type": "string" } } } }, "locations": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "country": { "type": "string" }, "is_primary": { "type": "boolean" } } } }, "industries": { "type": "array", "items": { "type": "string" } }, "websites": { "type": "array", "items": { "type": "string" } }, "logo_url": { "type": "string" } } }, "title": { "type": "string" }, "seniorities": { "type": "array", "items": { "type": "string" } }, "function": { "type": "string" }, "location": { "type": "array", "items": { "type": "string" } }, "description": { "type": "string" }, "start_date": { "type": "string" }, "end_date": { "type": "string" }, "status": { "type": "string" }, "start_date_confidence": { "type": "string" } } } }, "current_location": { "type": "string" }, "skills": { "type": "array", "items": { "type": "string" } }, "education": { "type": "array", "items": { "type": "object", "properties": { "school": { "type": "object", "properties": { "name": { "type": "string" }, "location": { "type": "object", "properties": { "name": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "country": { "type": "string" } } }, "website": { "type": "string" }, "linkedin_url": { "type": "string" }, "linkedin_id": { "type": "integer" } } }, "start_date": { "type": "string" }, "end_date": { "type": "string" }, "degrees": { "type": "array", "items": { "type": "string" } }, "majors": { "type": "array", "items": { "type": "string" } }, "activities": { "type": "string" }, "grade": { "type": "string" }, "description": { "type": "string" } } } }, "social_media": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "entity_id": { "type": "string" }, "network": { "type": "string" }, "url": { "type": "string" }, "url_status": { "type": "string" }, "connections": { "type": "integer" }, "followers": { "type": "integer" }, "join_date": { "type": "string" } } } }, "certifications": { "type": "array", "items": { "type": "object", "properties": { "end_date": { "type": "string" }, "name": { "type": "string" }, "organization": { "type": "string" }, "start_date": { "type": "string" } } } }, "smart_tags": { "type": "array", "items": { "type": "string" } }, "hiring": { "type": "boolean", "deprecated": true }, "open_to_work": { "type": "boolean", "deprecated": true }, "recruiting_signals": { "type": "boolean" }, "job_seeking_signals": { "type": "boolean" }, "probably_fake": { "type": "boolean" }, "latest_role_change_at": { "type": "string" }, "latest_company_change_at": { "type": "string" }, "current_job_updated_at": { "type": "string" }, "updated_at": { "type": "string" }, "created_at": { "type": "string" }, "last_refresh_at": { "type": "string" }, "image_url": { "type": "string" } } }, "found_by": { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "string" } }, "linkedin_names": { "type": "array", "items": { "type": "string" } }, "linkedin_ids": { "type": "array", "items": { "type": "integer" } }, "linkedin_entity_ids": { "type": "array", "items": { "type": "string" } } } } } } ``` # Profile Sample Data Source: https://docs.theswarm.com/docs/enrichment-data/profile/sample-data Example JSON response payload for a profile record returned by the v3 Fetch Profile endpoint. The example below shows the full shape of a profile record as returned by the [v3 Fetch Profile](/docs/endpoints/v3/fetch-profile) endpoint. Use it as a reference when wiring up your client code or mapping fields into your own data model. For field-by-field descriptions, see the [Profile Endpoint Overview](/docs/enrichment-data/profile/overview). ```json Profile theme={null} { "id": "f0f9f467-7798-4b15-a913-3d1375c85390", "lists": [ { "id": "58bb21af-6777-4a5d-a763-45df10258727", "name": "Tech Leaders", "status": "suggested" } ], "tags": [ { "id": "faa5ba2a-23e9-40fd-8efe-720a2b6246d3", "name": "Contact soon" } ], "profile_info": { "id": "f0f9f467-7798-4b15-a913-3d1375c85390", "full_name": "David Connors", "first_name": "David", "last_name": "Connors", "headline": "Co-Founder/CEO at The Swarm ☀️ The Go-To-Network Platform", "about": "• Co-Founder/CEO @ The Swarm\n• Founder-in-Residence @ Sequoia Capital\n• Co-Founder/CEO @ Automately.io (acquired by Sequoia)\n• Co-Founder @ RevDev.io (Revenue Development advisory)", "linkedin_url": "linkedin.com/in/connorsdavid", "work_email": "david@theswarm.com", "personal_emails": [ "davidjulianconnors@gmail.com" ], "current_title": "Co-Founder & CEO", "current_function": "Sales & business development", "current_seniorities": [ "c-level" ], "current_company_id": "09d9c510-c9f6-4c6e-9e62-fe5fedbeda87", "current_company_name": "The Swarm", "current_company_logo_url": "https://cdn.theswarm.com/companies/logos/09d/9c5/09d9c510-c9f6-4c6e-9e62-fe5fedbeda87/original/logo.png", "current_company_size": { "min": 11, "max": 50 }, "current_company_location": "San Francisco, California, United States", "current_company_linkedin_url": "linkedin.com/company/wearetheswarm", "current_company_websites": [ "theswarm.com" ], "current_company_industries": [ "Business Development", "Software Development" ], "experience": [ { "is_current": true, "company_id": "09d9c510-c9f6-4c6e-9e62-fe5fedbeda87", "company": { "id": "09d9c510-c9f6-4c6e-9e62-fe5fedbeda87", "canonical_name": "wearetheswarm", "name": "The Swarm", "founded": "2021-01-01T00:00:00Z", "size": { "min": 11, "max": 50 }, "social_media": [ { "network": "dealroom", "slug": "the_swarm_1", "url": "app.dealroom.co/companies/the_swarm_1" }, { "network": "facebook", "slug": "wearetheswarm", "url": "www.facebook.com/wearetheswarm" }, { "network": "twitter", "slug": "wearetheswarm", "url": "twitter.com/wearetheswarm" }, { "network": "crunchbase", "slug": "the-swarm-e90d", "url": "crunchbase.com/organization/the-swarm-e90d" }, { "network": "pitchbook", "id": "496661-59", "url": "pitchbook.com/profiles/company/496661-59"}, { "network": "linkedin", "id": "76647462", "slug": "wearetheswarm", "url": "linkedin.com/company/wearetheswarm" } ], "locations": [ { "name": "San Francisco, California, United States", "city": "San Francisco", "state": "California", "country": "United States", "is_primary": true } ], "industries": [ "Business Development", "Software Development" ], "websites": [ "theswarm.com" ], "logo_url": "https://cdn.theswarm.com/companies/logos/09d/9c5/09d9c510-c9f6-4c6e-9e62-fe5fedbeda87/original/logo.png" }, "title": "Co-Founder & CEO", "seniorities": [ "c-level" ], "location": [ "San Francisco Bay Area" ], "start_date": "2021-08-01", "status": "ongoing", "start_date_confidence": "validated" }, { "is_current": false, "company_id": "f5d8c962-7987-4786-8754-5c85f8ba4bc3", "company": { "id": "f5d8c962-7987-4786-8754-5c85f8ba4bc3", "canonical_name": "sequoia", "name": "Sequoia Capital", "founded": "1972-11-01T00:00:00Z", "size": { "min": 201, "max": 500 }, "social_media": [ { "network": "angelList", "url": "angel.co/sequoia-capital" }, { "network": "blog", "url": "sequoiacap.com/build/" }, { "network": "builtin", "url": "builtin.com/company/sequoia-capital" }, { "network": "facebook", "url": "www.facebook.com/sequoiacap" }, { "network": "golden", "url": "golden.com/wiki/sequoia_capital-gerv6z" }, { "network": "levels", "url": "www.levels.fyi/companies/sequoia-capital" }, { "network": "signalNFX", "url": "signal.nfx.com/firms/sequoia-capital" }, { "network": "twitter", "url": "www.twitter.com/sequoia" }, { "network": "crunchbase", "url": "crunchbase.com/organization/sequoia-capital" }, { "network": "linkedin", "id": "11190", "url": "linkedin.com/company/sequoia" } ], "locations": [ { "name": "Menlo Park, California, United States", "city": "Menlo Park", "state": "California", "country": "United States", "is_primary": true } ], "industries": [ "Finance", "Venture Capital and Private Equity Principals" ], "websites": [ "sequoiacap.com" ] }, "title": "Founder-in-Residence", "seniorities": [ "c-level" ], "location": [ "San Francisco Bay Area" ], "description": "Built products for investors, founders & recruiters.", "start_date": "2019-06-01", "end_date": "2021-08-01", "status": "past", "start_date_confidence": "validated" }, { "is_current": false, "company_id": "b91ca025-b55e-485d-9838-40b64e9402d5", "company": { "id": "b91ca025-b55e-485d-9838-40b64e9402d5", "canonical_name": "automately", "name": "Automately", "founded": "2017-01-01T00:00:00Z", "size": { "min": 1, "max": 10 }, "social_media": [ { "network": "linkedin", "id": "17934171", "url": "linkedin.com/company/automately" } ], "locations": [ { "name": "Los Angeles, California, United States", "city": "Los Angeles", "state": "California", "country": "United States", "is_primary": true } ], "industries": [ "Staffing and Recruiting", "Human Resources" ], "websites": [ "sequoiacap.com" ] }, "title": "Co-Founder & CEO", "seniorities": [ "c-level" ], "location": [ "San Francisco" ], "description": "Founder and CEO of Automately.io, a San Francisco-based startup that provides Candidate Sourcing-as-a-Service for venture-backed companies looking to scale quickly. Our systematized approach saves you hours of time, speeds up recruiting, and generates a robust pipeline of quality candidates, rapidly.", "start_date": "2016-11-01", "end_date": "2019-06-01", "status": "past", "start_date_confidence": "validated" }, { "is_current": false, "company_id": "ea2f0978-eeb6-4c72-a67e-7fbfb095c022", "company": { "id": "ea2f0978-eeb6-4c72-a67e-7fbfb095c022", "canonical_name": "revdevio", "name": "revdev.io", "founded": "2018-01-01T00:00:00Z", "size": { "min": 1, "max": 10 }, "social_media": [ { "network": "linkedin", "id": "27225590", "url": "linkedin.com/company/revdevio" } ], "locations": [ { "name": "Portland, Oregon, United States", "city": "Portland", "state": "Oregon", "country": "United States", "is_primary": true } ], "industries": [ "Management Consulting", "Business Consulting and Services" ], "websites": [ "revdev.io" ] }, "title": "Co-Founder", "seniorities": [ "c-level" ], "function": "Consulting & Strategy", "location": [ "San Francisco Bay Area" ], "description": "RevDev is a collective of Revenue Development advisors helping teams with great products build and scale great companies.", "start_date": "2018-01-01", "end_date": "2019-01-01", "status": "past", "start_date_confidence": "validated" }, { "is_current": false, "company_id": "bcdfc1cb-7e6b-4e61-825b-c9306adcecb0", "company": { "id": "bcdfc1cb-7e6b-4e61-825b-c9306adcecb0", "canonical_name": "docmatter", "name": "DocMatter", "founded": "2012-01-01T00:00:00Z", "size": { "min": 11, "max": 50 }, "social_media": [ { "network": "angelList", "url": "angel.co/docmatter-1" }, { "network": "builtin", "url": "builtin.com/company/docmatter-inc" }, { "network": "dealroom", "url": "app.dealroom.co/companies/docmatter" }, { "network": "facebook", "url": "www.facebook.com/docmatter" }, { "network": "golden", "url": "golden.com/wiki/docmatter-8aam5g4" }, { "network": "levels", "url": "www.levels.fyi/companies/docmatter" }, { "network": "twitter", "url": "twitter.com/docmatterinc" }, { "network": "wellfound", "url": "wellfound.com/company/docmatter-1" }, { "network": "crunchbase", "url": "crunchbase.com/organization/docmatter" }, { "network": "linkedin", "id": "3242905", "url": "linkedin.com/company/docmatter" }, { "network": "pitchbook", "id": "227048-05", "url": "pitchbook.com/profiles/company/227048-05" } ], "locations": [ { "name": "San Francisco, California, United States", "city": "San Francisco", "state": "California", "country": "United States", "is_primary": true } ], "industries": [ "Software", "Software Development" ], "websites": [ "docmatter.com" ], "logo_url": "https://cdn.theswarm.com/companies/logos/bcd/fc1/bcdfc1cb-7e6b-4e61-825b-c9306adcecb0/original/logo.png" }, "title": "Growth", "seniorities": [ "senior" ], "function": "Marketing & Product Management", "location": [ "San Francisco Bay Area" ], "start_date": "2015-09-01", "end_date": "2016-11-01", "status": "past", "start_date_confidence": "validated" }, { "is_current": false, "company_id": "6963a3df-a185-4c69-88fe-7e2b95786688", "company": { "id": "6963a3df-a185-4c69-88fe-7e2b95786688", "canonical_name": "pwc", "name": "PwC", "founded": "1998-01-01T00:00:00Z", "size": { "min": 10001 }, "social_media": [ { "network": "angelList", "url": "angel.co/pricewaterhousecoopers-20" }, { "network": "facebook", "url": "www.facebook.com/execpress" }, { "network": "golden", "url": "golden.com/wiki/pwc_(pricewaterhousecoopers)-k36a3rp" }, { "network": "twitter", "url": "twitter.com/pwc_llp" }, { "network": "crunchbase", "id": "5394225", "url": "crunchbase.com/organization/pwc" }, { "network": "linkedin", "url": "linkedin.com/company/pwc" } ], "locations": [ { "name": "New York, New York, United States", "city": "New York", "state": "New York", "country": "United States", "is_primary": true } ], "industries": [ "Tax Consulting", "Professional Services" ], "websites": [ "fr.pwc.com" ], "logo_url": "https://cdn.theswarm.com/companies/logos/ff3/08d/ff308d5e-0dc8-44ce-a635-71735d3f58ff/original/logo.png" }, "title": "Management Consultant | Digital & Emerging Technologies", "seniorities": [ "senior" ], "function": "Consulting & Strategy", "location": [ "London, United Kingdom" ], "start_date": "2012-06-01", "end_date": "2015-11-01", "status": "past", "start_date_confidence": "validated" }, { "is_current": false, "company_id": "c3f4f899-85b0-4038-8eda-92c2dc654ee7", "company": { "id": "c3f4f899-85b0-4038-8eda-92c2dc654ee7", "canonical_name": "management-consultancies-association", "name": "Management Consultancies Association", "founded": "1956-01-01T00:00:00Z", "size": { "min": 51, "max": 200 }, "social_media": [ { "network": "facebook", "url": "www.facebook.com/themcauk/" }, { "network": "twitter", "url": "twitter.com/themca_uk" }, { "network": "crunchbase", "url": "crunchbase.com/organization/management-consultancies-association" }, { "network": "linkedin", "id": "803387", "url": "linkedin.com/company/management-consultancies-association" }, { "network": "pitchbook", "id": "224814-61", "url": "pitchbook.com/profiles/company/224814-61" } ], "locations": [ { "name": "London, London, United Kingdom", "city": "London", "state": "London", "country": "United Kingdom", "is_primary": true } ], "industries": [ "Consulting" ], "websites": [ "mca.org.uk" ], "logo_url": "https://cdn.theswarm.com/companies/logos/c3f/4f8/c3f4f899-85b0-4038-8eda-92c2dc654ee7/original/logo.png" }, "title": "Vice Chair (Young MCA)", "seniorities": [ "director" ], "location": [ "London, United Kingdom" ], "start_date": "2014-05-01", "end_date": "2015-08-01", "status": "past", "start_date_confidence": "validated" } ], "current_location": "San Francisco, California, United States", "skills": [ "Analysis", "Management Consulting", "Business Strategy", "Project Management", "Management", "Research", "Data Analysis", "Financial Modeling", "Networking", "Market Research", "Microsoft Excel", "Analytical Skills", "Project Planning", "Strategic Planning", "Stakeholder Management", "Operations Management", "Operational Excellence", "Event Management", "Strategic Consulting", "Strategy", "Consulting" ], "education": [ { "school": { "name": "University of Melbourne", "location": { "name": "Melbourne, Victoria, Australia" }, "website": "unimelb.edu.au", "linkedin_url": "linkedin.com/school/university-of-melbourne", }, "start_date": "2007-01-01", "end_date": "2010-01-01", "degrees": [ "Bachelor of Commerce (Degree with Honours)" ] }, { "school": { "name": "UC Santa Barbara", "location": { "name": "Santa Barbara, California, United States" }, "website": "ucsb.edu", "linkedin_url": "linkedin.com/school/ucsantabarbara", "linkedin_id": 5372 }, "start_date": "2009-01-01", "end_date": "2009-01-01", "degrees": [ "Bachelor's Degree" ], "majors": [ "Business/Managerial Economics" ] }, { "school": { "name": "Wesley College", "location": { "name": "Melbourne, Victoria, Australia" }, "website": "wesleycollege.edu.au", "linkedin_url": "linkedin.com/school/wesley-college", "linkedin_id": 24941 }, "start_date": "2001-01-01", "end_date": "2006-01-01", "degrees": [ "International Baccalaureate" ] } ], "social_media": [ { "network": "crunchbase", "url": "crunchbase.com/person/david-connors-305e", "url_status": "active" }, { "id": "68931970", "entity_id": "ACoAAAQb0YIBX2xhdkUa6A7TslJaGe7LqU2IQDw", "network": "linkedin", "url": "linkedin.com/in/connorsdavid", "url_status": "active", "connections": 9357, "followers": 9862, "join_date": "2010-03-03" }, { "network": "twitter", "url": "x.com/d_j_connors", "url_status": "active" }, { "network": "website", "url": "theswarm.com", "url_status": "active" } ], "certifications": [ { "name": "Certificate Name", "organization": "Certifying Organization", "start_date": "2023-06-01", "end_date": "2027-06-01" } ], "smart_tags": [ "oneYearAtCurrentCompany", "priorBackedFounder", "USImmigrant" ], "hiring": true, "open_to_work": true, "recruiting_signals": true, "job_seeking_signals": true, "latest_role_change_at": "2021-08-01", "latest_company_change_at": "2021-08-01", "current_job_updated_at": "2025-10-27T21:34:56.152507Z", "updated_at": "2025-10-27T21:34:56.152507Z", "created_at": "2023-07-25T18:30:44.131706Z", "last_refresh_at": "2025-10-27T21:34:56.152507Z", "image_url": "https://cdn.theswarm.com/profiles/images/f0f/9f4/f0f9f467-7798-4b15-a913-3d1375c85390/original/f0f9f467-7798-4b15-a913-3d1375c85390.jpeg" }, "found_by": { "ids": [ "f0f9f467-7798-4b15-a913-3d1375c85390" ] } } ``` # API Query Builder Source: https://docs.theswarm.com/docs/examples/api-query-builder Convert natural language into OpenSearch DSL and can run it against the Swarm API, delivering both the query and live results in one interface. Profiles Companies Type your natural language query: Or, try these examples: Swarm API Key (generate the key from [Team Settings](https://app.theswarm.com/team-settings/api)) Your API key is stored locally and never sent to our servers Resources: * [API Query Translator](/docs/examples/query-translator) * [API Query Tester](/docs/examples/api-query-tester) # API Query Tester Source: https://docs.theswarm.com/docs/examples/api-query-tester Test your OpenSearch DSL queries against the Swarm API and see real results. [Build the query](/docs/examples/api-query-builder) # Fetch endpoint Source: https://docs.theswarm.com/docs/examples/fetch-endpoint Example requests for the Fetch Profile and Fetch Company endpoints. These examples target the [Fetch Profile](/docs/endpoints/v3/fetch-profile) and [Fetch Company](/docs/endpoints/v3/fetch-company) endpoints. ## Identifier types You can fetch a profile using any of the following identifiers, or a combination of them: * **`ids`** — Profile IDs previously returned by the Search endpoint * **`linkedin_names`** — LinkedIn usernames (public profile URL slugs) * **`linkedin_ids`** — LinkedIn numeric member IDs * **`linkedin_entity_ids`** — LinkedIn alphanumeric entity IDs Combining identifiers is supported and returns a unified list of results. ```bash theme={null} curl --location 'https://bee.theswarm.com/v3/profiles/fetch' \ --header 'Content-Type: application/json' \ --header 'x-api-key: $API_KEY' \ --data '{ "ids": [ "569a18b6-6a04-4728-9034-ad6ae0537f09", "41dfd52f-e9da-4381-80a2-b514cf75c134" ], "linkedin_names": [ "michal-bil" ], "linkedin_ids": [ "7125957" ], "linkedin_entity_ids": [ "ACoAAABsu8UBWktgug9TYQMXLNK3ypLlA0tWUuY" ] }' ``` ## Selecting fields By default, only basic profile data is returned. Use the `fields` array to request additional data — pass `profile_info` for the full record, plus `tags` or `lists` as needed. ### Fetch full profile data ```bash theme={null} curl --location 'https://bee.theswarm.com/v3/profiles/fetch' \ --header 'Content-Type: application/json' \ --header 'x-api-key: $API_KEY' \ --data '{ "ids": ["569a18b6-6a04-4728-9034-ad6ae0537f09"], "fields": ["profile_info"] }' ``` ### Fetch with tags and lists ```bash theme={null} curl --location 'https://bee.theswarm.com/v3/profiles/fetch' \ --header 'Content-Type: application/json' \ --header 'x-api-key: $API_KEY' \ --data '{ "ids": ["569a18b6-6a04-4728-9034-ad6ae0537f09"], "fields": ["profile_info", "tags", "lists"] }' ``` ## Bulk fetch Fetch up to **1000 profiles per call**. Each returned profile counts as 1 credit — see [Credits & Usage](/docs/api-reference/credits-usage). ```bash theme={null} curl --location 'https://bee.theswarm.com/v3/profiles/fetch' \ --header 'Content-Type: application/json' \ --header 'x-api-key: $API_KEY' \ --data '{ "ids": [ "569a18b6-6a04-4728-9034-ad6ae0537f09", "b8d4ba05-5158-4d80-a0a7-c8e650f7c95c", "41dfd52f-e9da-4381-80a2-b514cf75c134" ], "fields": ["profile_info"] }' ``` ## Fetching companies The Company Fetch endpoint follows the same pattern with `company_info` as the default field. ```bash theme={null} curl --location 'https://bee.theswarm.com/v3/companies/fetch' \ --header 'Content-Type: application/json' \ --header 'x-api-key: $API_KEY' \ --data '{ "ids": ["09d9c510-c9f6-4c6e-9e62-fe5fedbeda87"], "fields": ["company_info", "tags"] }' ``` # Job changes endpoint Source: https://docs.theswarm.com/docs/examples/job-changes-endpoint Example OpenSearch DSL queries for retrieving daily job changes via the Search Profiles endpoint. These examples target the [Search Profiles](/docs/endpoints/v3/search-profiles) endpoint and rely on the [Daily Job Changes](/docs/signals/daily-job-changes) timestamp fields. The Search endpoint returns IDs only — pass them to [Fetch Profile](/docs/endpoints/v3/fetch-profile) with `fields: ["profile_info"]` for the full job-change context. ## Date-range queries ### Job changes in the last 24 hours ```json theme={null} { "query": { "range": { "profile_info.current_job_updated_at": { "gte": "now-1d/d", "lt": "now/d" } } }, "limit": 1000 } ``` ### Job changes in a specific date window ```json theme={null} { "query": { "range": { "profile_info.current_job_updated_at": { "gte": "2026-05-01", "lte": "2026-05-31" } } }, "limit": 1000 } ``` ## Filtering by change type ### Only company changes (excluding same-company promotions) ```json theme={null} { "query": { "range": { "profile_info.latest_company_change_at": { "gte": "now-7d/d" } } }, "limit": 1000 } ``` ### Only promotions (role change at the same company) Profiles whose role changed more recently than their company. ```json theme={null} { "query": { "bool": { "must": [ { "range": { "profile_info.latest_role_change_at": { "gte": "now-30d/d" } } } ], "must_not": [ { "range": { "profile_info.latest_company_change_at": { "gte": "now-30d/d" } } } ] } }, "limit": 1000 } ``` ## Filtering by target ### Job changes into a target company ```json theme={null} { "query": { "bool": { "must": [ { "range": { "profile_info.current_job_updated_at": { "gte": "now-7d/d" } } }, { "term": { "profile_info.current_company_name.raw": { "value": "Stripe" } } } ] } }, "limit": 1000 } ``` ### Job changes into a target title ```json theme={null} { "query": { "bool": { "must": [ { "range": { "profile_info.current_job_updated_at": { "gte": "now-7d/d" } } }, { "match": { "profile_info.current_title": { "query": "VP Engineering", "operator": "AND" } } } ] } }, "limit": 1000 } ``` ### Job changes within your network only ```json theme={null} { "in_network_only": true, "query": { "range": { "profile_info.current_job_updated_at": { "gte": "now-14d/d" } } }, "limit": 1000 } ``` # Child Team Relationships Source: https://docs.theswarm.com/docs/examples/partner-child-teams Use partner child teams to run Relationships queries against a curated subset of connectors — a targeted network for ABM, sales pods, or region-specific outreach. > [!NOTE] > > **Partner permission required.** Creating child teams and using the `x-authenticate-team` header requires the partner permission on your account. If you don't have it, email [support@theswarm.com](mailto:support@theswarm.com) to request access. This walkthrough shows how to use **child teams** and the [`x-authenticate-team`](/docs/api-reference/introduction#partner-accounts-acting-on-behalf-of-a-child-team) header to scope a [Relationships](/docs/endpoints/v3/relationships) query to a curated subset of connectors — instead of your organization's entire network. ## When to use this > [!NOTE] > > **Child-team Relationships vs. Network Mapper.** These solve different problems. > > * Use a **child team + `/v3/relationships`** when you want warm intro paths through a **specific subset of your own connectors** (e.g. just your revenue leaders, just your APAC pod). Free, synchronous, returns your team's connections. > * Use [**Network Mapper**](/docs/endpoints/v3/network-mapper) when you want intro paths across the **entire partner network** — connectors you don't own. Paid per non-empty response, and only available to partners. Typical scenarios for the child-team approach: * **ABM outreach** — warm intro paths from revenue leaders only, not the whole company. * **Regional sales pods** — scope introductions to a specific geography's team. * **Investor / advisor networks** — treat a specific group of connectors as its own searchable network. * **Portfolio work** — one child team per portfolio company, each with its own connector set. ## Prerequisites * A partner API key. * Team owner or admin role. * LinkedIn usernames (or profile URLs) for the people you want to add as connectors. ## Walkthrough: ABM outreach from revenue leaders You're running account-based outreach and want intro paths **only through your revenue leaders** into a set of target accounts. ### 1. Create a child team for the segment Create a dedicated child team so its network stays isolated from the rest of your org's connectors. Save the returned `team_id` — you'll pass it in every subsequent request. ```bash theme={null} curl -X POST https://bee.theswarm.com/team/create-team \ -H "x-api-key: YOUR_PARTNER_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "team_name": "ABM — Revenue leaders", "owner_email": "rev-ops@yourcompany.com" }' ``` Response: ```json theme={null} { "team_id": "child-team-id-123" } ``` See [Create Team](/docs/endpoints/v3/create-team) for full parameters. ### 2. Find the people you want as connectors Use [Search Profiles](/docs/endpoints/v3/search-profiles) to find the profiles matching your criteria — here, VP-and-above sales leaders at your company. ```bash theme={null} curl -X POST https://bee.theswarm.com/v3/profiles/search \ -H "x-api-key: YOUR_PARTNER_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "query": { "bool": { "must": [ { "term": { "profile_info.current_company_website": { "value": "yourcompany.com" } } }, { "terms": { "profile_info.current_seniorities": ["vp", "cxo", "founder"] } }, { "match": { "profile_info.current_title": { "query": "sales revenue", "operator": "OR" } } } ] } }, "limit": 50 }' ``` Then hydrate the IDs with [Fetch Profile](/docs/endpoints/v3/fetch-profile) if you need LinkedIn usernames for the next step. ### 3. Add them as connectors to the child team Pass the child team's ID in the `x-authenticate-team` header so the connectors land in the child team's network, not the parent team. ```bash theme={null} curl -X POST https://bee.theswarm.com/team/add-connector \ -H "x-api-key: YOUR_PARTNER_API_KEY" \ -H "x-authenticate-team: child-team-id-123" \ -H "Content-Type: application/json" \ -d '{ "linkedin_usernames": [ "jane-smith-vp-sales", "john-doe-cro", "alex-johnson-vp-revenue" ], "group": "employees" }' ``` Connector mapping runs asynchronously. Small teams typically finish within a few seconds; larger ones may take a few minutes. See [Add Connector](/docs/endpoints/v3/add-connector) for details. ### 4. Query intro paths scoped to the child team Now run a Relationships query against the child team's network. Every request must include `x-authenticate-team: ` — otherwise the query falls back to the parent team. ```bash theme={null} curl -X POST https://bee.theswarm.com/v3/relationships \ -H "x-api-key: YOUR_PARTNER_API_KEY" \ -H "x-authenticate-team: child-team-id-123" \ -H "Content-Type: application/json" \ -d '{ "query": { "terms": { "profile_info.current_company_website": [ "target-account-1.com", "target-account-2.com", "target-account-3.com" ] } }, "limit": 100 }' ``` The response only reflects connections held by the connectors in the child team — not by everyone in your organization. ### 5. Interpret the response Each hit in the response corresponds to a person your child team can reach, plus the connectors who can introduce them. Key fields: * **`connections[].connector_id`** — the child-team connector who knows the person. * **`connections[].strength`** — the connection strength signal (higher = warmer path). * **`connections[].sources[]`** — how the connection was inferred (LinkedIn, email, calendar, etc.). See the [sources field FAQ](/docs/getting-started/faq#what-does-the-sources-field-in-connections-mean). For the full response schema, see [Models > Relationships](/docs/intelligence/relationships). ## What to expect > [!WARNING] > > **Sparse results on small teams are expected.** Because the query only considers the child team's connectors, results reflect the size and shape of that subset — not your whole organization's network. A handful of connectors will produce far fewer intro paths than a full-org query. This is by design, not a bug. Practical tips: * Start with **10–30 well-chosen connectors** per child team. Broader is not always better — the point of a child team is precision. * Wait for connector mapping to finish before running Relationships queries. See the mapping-status guidance in [Add Connector](/docs/endpoints/v3/add-connector). * Re-run the query as new connectors are added; the child team's network grows over time. * If you want intro paths beyond your own connectors, use [Network Mapper](/docs/endpoints/v3/network-mapper) instead. ## Reusing the pattern The same four-step pattern applies to any segment you want to treat as its own network — regional pods, portfolio companies, investor groups. Create one child team per segment, keep the connector set curated, and always pass `x-authenticate-team` on subsequent requests. # Query operators Source: https://docs.theswarm.com/docs/examples/query-operators How to combine AND/OR logic, exact phrases, and other OpenSearch DSL operators when searching profiles and companies. This page is an operator-first reference for building queries against [Search Profiles](/docs/endpoints/v3/search-profiles) and [Search Companies](/docs/endpoints/v3/search-companies). If you're looking for full end-to-end scenarios instead, see [Search endpoint examples](/docs/examples/search-endpoint). > [!WARNING] > > **Start here — the single most common gotcha.** `match` splits your query into words and matches **any** of them by default. Searching `match` for `"General Manager"` returns profiles whose title contains *general* **or** *manager* (so "Product Manager" and "General Counsel" both come back). > > * For **both words, in order** ("General Manager" as a phrase), use [`match_phrase`](#text-vs-keyword-why-general-manager-is-tricky). > * For **both words, any order**, add `"operator": "AND"` — see [All words required](#all-words-required). > * For a **strict exact string** ("General Manager" and nothing else), use [`term` on `.raw`](#term-on-raw-strict-exact-match). > [!TIP] > > Every JSON block below is copy-pasteable into the [API Query Tester](/docs/examples/api-query-tester). If you're not sure which operator you need, start with the decision table. > > Prefer natural language? The [API Query Builder](/docs/examples/api-query-builder) converts descriptions like *"General Managers at Acme in the US"* into DSL. It covers most common cases, but for mixed AND/OR, exact phrases, or nested experience queries you may still need to hand-edit the generated JSON — this page is the reference for those edits. ## Choosing the right operator | You want to match… | Use | Field variant | | - | - | - | | Any of these words (default OR) | `match` | `text` (e.g. `current_title`) | | All of these words | `match` with `"operator": "AND"` | `text` | | This exact phrase, in order | `match_phrase` | `text` | | This exact value, character-for-character | `term` | `keyword` (e.g. `job_title.raw`) | | Any of several exact values | `terms` | `keyword` / `.raw` | | A numeric or date range | `range` | numeric / date | | Field is present | `exists` | any | | Combine multiple conditions | `bool` with `must` / `should` / `must_not` / `filter` | any | | Same text across multiple fields | `multi_match` | `text` | | Anything under `profile_info.experience.*` | wrap in `nested` | nested | ## Text vs. keyword: why "General Manager" is tricky Most string fields in the Swarm index are mapped as **both** `text` (analyzed — lowercased, tokenized into words) and `keyword` under a `.raw` subfield (stored verbatim). Which one you query changes what "match" means. > [!WARNING] > > Many fields in the mappings are **aliases** (e.g. `current_title` → `job_title`, `current_company_name` → `job_company_name`). Aliases work for `match`, but for `term`/`terms` you should target the underlying field's `.raw` — for example `profile_info.job_title.raw`, not `profile_info.current_title.raw`. Take `profile_info.job_title` (aliased as `current_title`) and the value `"General Manager"`: * **`match`** — full-text search on the analyzed field. Matches any profile whose title contains the words *general* or *manager* (default OR). "Assistant General Manager", "General Counsel", and "Product Manager" all match. * **`match_phrase`** — full-text with word order preserved. Matches titles containing the words *general* then *manager* adjacent to each other. "Senior General Manager" and "General Manager, EMEA" both match; "Manager of General Affairs" does not. * **`term` on `.raw`** — exact keyword match. Only titles that are literally `"General Manager"` match. Case-sensitive against the stored value. ### match — any of the words ```json theme={null} { "query": { "match": { "profile_info.current_title": { "query": "General Manager" } } }, "limit": 10 } ``` ### match with operator AND — all of the words, any order ```json theme={null} { "query": { "match": { "profile_info.current_title": { "query": "General Manager", "operator": "AND" } } }, "limit": 10 } ``` ### match\_phrase — exact phrase, adjacent, in order ```json theme={null} { "query": { "match_phrase": { "profile_info.current_title": { "query": "General Manager" } } }, "limit": 10 } ``` ### term on .raw — strict exact match ```json theme={null} { "query": { "term": { "profile_info.job_title.raw": { "value": "General Manager" } } }, "limit": 10 } ``` > [!WARNING] > > `term` on a `text` field almost always returns zero results. Always target the `.raw` subfield for exact matches. ### Worked example: "General Manager" at a specific company Suppose you want profiles whose current title is *General Manager* and whose current company is a specific one (`job_company_id` — a keyword field, no normalizer, no `.raw` needed). #### The wrong query A common first attempt uses `match` on both fields inside `must`: ```json theme={null} { "query": { "bool": { "must": [ { "match": { "profile_info.current_title": { "query": "General Manager" } } }, { "match": { "profile_info.current_company_id": { "query": "09d9c510-c9f6-4c6e-9e62-fe5fedbeda87" } } } ] } }, "limit": 10 } ``` Why this is wrong: the first clause uses `match` with default OR, so it matches any title containing *general* **or** *manager* — not the phrase "General Manager". Splitting the clause into two separate `match` clauses (one per word) also isn't the right fix — that's `"operator": "AND"` written the long way, and it still doesn't require word order. #### Fix — exact phrase (recommended) Use `match_phrase` on the title. Company id is a keyword, so `term` is the right operator there: ```json theme={null} { "query": { "bool": { "must": [ { "match_phrase": { "profile_info.current_title": { "query": "General Manager" } } } ], "filter": [ { "term": { "profile_info.job_company_id": { "value": "09d9c510-c9f6-4c6e-9e62-fe5fedbeda87" } } } ] } }, "limit": 10 } ``` Two things to note: 1. The company id clause lives in `filter`, not `must`. It's a strict narrowing check with no relevance component, so `filter` is faster and doesn't distort scoring. 2. `job_company_id` is the underlying field — `current_company_id` is an alias. Both work for `match`, but for `term` prefer the underlying name. #### Alternative — both words, any order If order doesn't matter (`"Manager, General Merchandise"` is fine), swap `match_phrase` for `match` with `"operator": "AND"`: ```json theme={null} { "query": { "bool": { "must": [ { "match": { "profile_info.current_title": { "query": "General Manager", "operator": "AND" } } } ], "filter": [ { "term": { "profile_info.job_company_id": { "value": "09d9c510-c9f6-4c6e-9e62-fe5fedbeda87" } } } ] } }, "limit": 10 } ``` ## AND vs. OR inside one field ### All words required Use `match` with `"operator": "AND"` when every token in the query must appear in the field. ```json theme={null} { "query": { "match": { "profile_info.current_title": { "query": "senior software engineer", "operator": "AND" } } }, "limit": 10 } ``` ### At least N of the words `minimum_should_match` lets you require a fraction of the tokens instead of all-or-nothing. ```json theme={null} { "query": { "match": { "profile_info.current_title": { "query": "vice president marketing growth", "minimum_should_match": "75%" } } }, "limit": 10 } ``` ## AND vs. OR across multiple fields Use `bool` to combine clauses. The four clause types: * **`must`** — AND. Contributes to score. * **`filter`** — AND. Does not contribute to score; faster and cacheable. * **`should`** — OR. If used alongside `must`, it only boosts score; on its own it acts as OR (at least one must match). * **`must_not`** — NOT. ### Chaining conditions readably Most real queries are just a flat list of ANDed conditions plus, occasionally, an ORed group. You don't need nested `bool` inside `bool` for that — one level is enough. Think of it as three named buckets inside a single `bool`: * **`filter: [ … ]`** — everything you want ANDed. One condition per array element, one line each. * **`should: [ … ]` + `minimum_should_match: 1`** — the ORed group. * **`must_not: [ … ]`** — exclusions. Example — profiles who are (Product Managers **or** Engineering Managers) at Google or Meta, with an email on file, currently in the US, not at "Stealth": ```json theme={null} { "query": { "bool": { "should": [ { "match_phrase": { "profile_info.current_title": { "query": "Product Manager" } } }, { "match_phrase": { "profile_info.current_title": { "query": "Engineering Manager" } } } ], "minimum_should_match": 1, "filter": [ { "terms": { "profile_info.job_company_name.raw": ["Google", "Meta"] } }, { "match": { "profile_info.current_location": { "query": "United States" } } }, { "exists": { "field": "profile_info.emails" } } ], "must_not": [ { "term": { "profile_info.job_company_name.raw": { "value": "Stealth" } } } ] } }, "limit": 10 } ``` Each condition is one line in a flat array — no tree of nested `bool`s. Only reach for a nested `bool` when you genuinely need "OR of two AND groups" (e.g. *(Product Manager at Google) OR (Engineering Manager at Meta)*). ### AND across fields (data scientists in the US) ```json theme={null} { "query": { "bool": { "must": [ { "match": { "profile_info.current_title": { "query": "data scientist", "operator": "AND" } } }, { "match": { "profile_info.current_location": { "query": "United States" } } } ] } }, "limit": 10 } ``` ### OR across fields (Google or Meta, current employees) Because `bool` with only `should` requires at least one to match, this behaves like OR. ```json theme={null} { "query": { "bool": { "should": [ { "term": { "profile_info.job_company_name.raw": { "value": "Google" } } }, { "term": { "profile_info.job_company_name.raw": { "value": "Meta" } } } ], "minimum_should_match": 1 } }, "limit": 10 } ``` > [!TIP] > > For a list of exact values, `terms` is shorter than multiple `should` clauses: > > ```json theme={null} > { > "query": { > "terms": { > "profile_info.job_company_name.raw": ["Google", "Meta", "Apple"] > } > }, > "limit": 10 > } > ``` ### filter vs. must `must` and `filter` both combine clauses with AND. The difference is scoring: `must` clauses contribute to a relevance score, `filter` clauses don't (and are faster + cacheable). Rule of thumb: put the clauses that decide **relevance** in `must`, and the clauses that just narrow the set (locations, dates, seniorities, exists checks) in `filter`. Same query, two shapes — take the earlier "data scientists in the US" example. The location doesn't need scoring, so moving it into `filter` is more efficient: ```json theme={null} { "query": { "bool": { "must": [ { "match": { "profile_info.current_title": { "query": "data scientist", "operator": "AND" } } } ], "filter": [ { "match": { "profile_info.current_location": { "query": "United States" } } } ] } }, "limit": 10 } ``` Both queries return the same profiles; the second is faster because the location clause is not scored. > [!TIP] > > `job_title_role` and `job_seniority` accept a fixed set of lowercase values — see [Canonical values](/docs/miscellaneous/canonical-values). `job_company_industry` is free-form (e.g. `"Software Development"`, `"Computer Software"`); values vary by source, so `term` matches can miss unless you know the exact string. ## Negation and existence ### Exclude a value (must\_not) Product managers **not** currently at Google: ```json theme={null} { "query": { "bool": { "must": [ { "match_phrase": { "profile_info.current_title": { "query": "Product Manager" } } } ], "must_not": [ { "term": { "profile_info.job_company_name.raw": { "value": "Google" } } } ] } }, "limit": 10 } ``` ### Field must be present (exists) Profiles with at least one email on file: ```json theme={null} { "query": { "exists": { "field": "profile_info.emails" } }, "limit": 10 } ``` ## Ranges and dates `range` supports `gte`, `gt`, `lte`, `lt`. Dates accept either `YYYY-MM-DD` or relative expressions like `now-30d`, `now-1y`, `now`. Profiles whose current job was updated in the last year: ```json theme={null} { "query": { "range": { "profile_info.current_job_updated_at": { "gte": "now-1y", "lte": "now" } } }, "limit": 10 } ``` Combine a range with a text search — profiles that changed to a "Head of" role in the last 90 days: ```json theme={null} { "query": { "bool": { "must": [ { "match_phrase": { "profile_info.current_title": { "query": "Head of" } } } ], "filter": [ { "range": { "profile_info.current_job_updated_at": { "gte": "now-90d", "lte": "now" } } } ] } }, "limit": 10 } ``` > [!TIP] > > When you combine a range with a specific canonical value (like `job_seniority: "director"`), the intersection can be small or empty depending on your team's network. If a compound query returns zero, test each clause on its own first to isolate which one is over-filtering. ## Multi-field text search `multi_match` runs the same query text across several fields at once. ```json theme={null} { "query": { "multi_match": { "query": "growth marketing", "fields": [ "profile_info.current_title", "profile_info.all_time_job_title" ], "operator": "AND" } }, "limit": 10 } ``` ## Nested fields (work experience) Anything under `profile_info.experience.*` is a nested document — you can't match it with a flat clause. Wrap the query in `nested` with the correct `path`. ### Anyone who has ever worked at Google ```json theme={null} { "query": { "nested": { "path": "profile_info.experience", "query": { "term": { "profile_info.experience.company.name.raw": { "value": "Google" } } } } }, "limit": 10 } ``` ### Held a "Product Manager" role at Google in the past (not necessarily current) ```json theme={null} { "query": { "nested": { "path": "profile_info.experience", "query": { "bool": { "must": [ { "term": { "profile_info.experience.company.name.raw": { "value": "Google" } } }, { "match_phrase": { "profile_info.experience.title.name": { "query": "Product Manager" } } } ] } } } }, "limit": 10 } ``` For a more complete "worked there but not currently" pattern, see [Search endpoint examples](/docs/examples/search-endpoint#nested-queries-work-experience). ## Debugging queries that return the wrong results When a compound query returns zero results — or way too many — don't stare at the whole tree. Peel it apart: 1. **Simplify to one clause at a time.** Start with a single `match` or `term`. Confirm it returns something. Add clauses one at a time and watch what happens to the count. 2. **Check the `total_count` in the response.** You don't need to look at profiles to debug — the count alone tells you which clause is over- or under-filtering. 3. **Suspect `match` first when you get *too many* results.** `match` splits into words and ORs them by default. If "General Manager" is pulling in Generals, that's the cause — switch to `match_phrase` or add `"operator": "AND"`. 4. **Test `must` clauses standalone when you get *zero* results.** Replace the whole `bool` with just one of its clauses. If that returns zero, the clause itself is broken — not the combination. Common culprits: `term` on a `text` field (should be `.raw`), aliased field name in a `term` query, wrong case on a lowercase-normalized keyword field. 5. **Once it works, move narrowing clauses into `filter`.** Locations, IDs, seniorities, `exists` checks — none of these need scoring. Moving them out of `must` into `filter` gives the same results, faster. > [!TIP] > > If a specific value returns zero and you expected results, check whether the field is [canonical](/docs/miscellaneous/canonical-values) (fixed value set, lowercase) or free-form (varies by enrichment source). Free-form fields like `job_company_industry` often have surprising real values like `"Computer Software"` instead of the guessable `"Software"`. ## Common pitfalls * **`term` on a `text` field returns nothing.** Use `.raw` on the underlying field (e.g. `job_title.raw`, `job_company_name.raw`) for exact matches. Aliased names like `current_title.raw` do not resolve — always target the real field. * **Keyword fields with a lowercase normalizer.** Fields like `job_seniority`, `job_title_role`, and `job_company_industry` are stored lowercased, so `term` values must be lowercase (e.g. `"senior"`, `"marketing & product management"`). * **Free-form vs. canonical values.** `job_seniority` and `job_title_role` accept a fixed set of values ([Canonical values](/docs/miscellaneous/canonical-values)); `job_company_industry` is enrichment-source data with varying strings — `match` on the text form is safer than `term` unless you know the exact value. * **`match_phrase` is not case-sensitive.** The analyzer lowercases both the query and the indexed value. If you need case-sensitivity, use `term` on `.raw`. * **Forgetting `nested`.** Any field path starting with `profile_info.experience.`, `profile_info.education.`, or `profile_info.certifications.` needs a `nested` wrapper with the matching `path`. * **`should` without `minimum_should_match` when mixed with `must`.** Once you add a `must` clause, `should` clauses only boost scoring — they no longer require any match. Set `"minimum_should_match": 1` when you want OR behavior. * **Using `must` for non-scored filters.** Move seniorities, industries, date ranges, and `exists` checks into `filter` for a faster query. ## Next steps * Try the queries above in the [API Query Tester](/docs/examples/api-query-tester). * Describe your search in plain English and let the [API Query Builder](/docs/examples/api-query-builder) generate the DSL. * See the [Profile mappings](/docs/enrichment-data/profile/mappings-v3) for the full list of queryable fields and which have a `.raw` subfield. # Relationships endpoint Source: https://docs.theswarm.com/docs/examples/relationships-endpoint Example OpenSearch DSL queries for the Relationships endpoint. These examples target the [Relationships](/docs/endpoints/v3/relationships) endpoint. The request body is a standard OpenSearch DSL `query` — combine clauses with `bool` (`must`, `should`, `filter`, `must_not`) as needed. For the full list of indexed fields you can query against, see [OpenSearch Profile Mappings (v3)](/docs/enrichment-data/profile/mappings-v3). > [!NOTE] > > **Two different origin vocabularies.** The query-side field `team_connections.origins` and the response-side field `connections[].sources[].origin` use **different value sets**. Use the values listed below when querying. For the response vocabulary, see the [sources field FAQ](/docs/getting-started/faq#what-does-the-sources-field-in-connections-mean). ## Discovery queries ### Connections to people working at a specific company Find people in your network who currently work at a company with a given domain. ```json theme={null} { "query": { "term": { "profile_info.current_company_website": { "value": "theswarm.com" } } } } ``` ### Connections to a specific person Identify who in your network is connected to a specific person, by LinkedIn username. ```json theme={null} { "query": { "term": { "profile_info.linkedin_usernames": { "value": "connorsdavid" } } } } ``` ### Connections to senior software engineers at selected companies Combine seniority, role, and company filters with a `bool.must` clause. ```json theme={null} { "query": { "bool": { "must": [ { "term": { "profile_info.current_seniorities": { "value": "senior" } } }, { "match": { "profile_info.current_title": { "query": "software engineer", "operator": "AND" } } }, { "terms": { "profile_info.current_company_website": [ "apple.com", "google.com", "microsoft.com" ] } } ] } } } ``` ## Filter by a specific connector The top-level `connected_users` field (`keyword`) holds the IDs of the team members each connection originates from. Use a `term` query to limit results to a specific connector — useful when you want to see who a single team member is connected to. Replace the value with the user ID of the connector (find your team members' IDs in **Team Settings → Members**). ```json theme={null} { "query": { "term": { "connected_users": { "value": "4a9a0f84-9edf-48eb-a832-bc0594d77d70" } } } } ``` To filter by multiple connectors at once, use `terms` with an array of IDs. ## Filtering by team connection origin The profile document includes a nested `team_connections` field that stores how each connection was synced. Use a [nested query](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-nested-query.html) against `team_connections.origins`, typically scoped to your `team_connections.team_id`, to filter results. Accepted `team_connections.origins` values (provisional, may change): `csv`, `plugin`, `overlaps`, `google`, `google-calendar`, `user-profile`, `manual-csv`, `education-overlaps`, `investor-overlaps`, `manual-url`, `social-engagement`. ### Connections from work or education overlaps for a specific team Scopes the origin filter to your team using `team_connections.team_id`. Replace `` with your team ID. ```json theme={null} { "query": { "bool": { "must": [ { "nested": { "path": "team_connections", "query": { "bool": { "must": [ { "term": { "team_connections.team_id": { "value": "" } } }, { "terms": { "team_connections.origins": ["overlaps"] } } ] } } } } ] } } } ``` To filter by multiple origins, pass them in the `terms` array — for example `["overlaps", "education-overlaps"]`. ### Combine an origin filter with a role filter Find product managers in your team's network who are connected via the LinkedIn plugin or shared work history. ```json theme={null} { "query": { "bool": { "must": [ { "nested": { "path": "team_connections", "query": { "bool": { "must": [ { "term": { "team_connections.team_id": { "value": "" } } }, { "terms": { "team_connections.origins": ["plugin", "overlaps"] } } ] } } } }, { "match": { "profile_info.current_title": { "query": "product manager", "operator": "AND" } } } ] } } } ``` # Search endpoint Source: https://docs.theswarm.com/docs/examples/search-endpoint Example OpenSearch DSL queries for the Search Profiles and Search Companies endpoints. These examples target the [Search Profiles](/docs/endpoints/v3/search-profiles) endpoint. The same query patterns apply to [Search Companies](/docs/endpoints/v3/search-companies) — swap the field paths for `companies.*`. > [!TIP] > > Looking for a reference on AND/OR logic, exact phrase matching, or `.raw` vs. text fields? See the [Query operators](/docs/examples/query-operators) cheat sheet. ## Basic patterns ### Search for profiles with an email address Retrieve up to 5 profiles with an email on record. Uses an `exists` query. ```json theme={null} { "query": { "exists": { "field": "profile_info.emails" } }, "limit": 5 } ``` ### Search for Data Science professionals (full text) `match` performs a full-text search and may include adjacent titles. ```json theme={null} { "query": { "match": { "profile_info.current_title": { "query": "data scientist", "operator": "AND" } } }, "limit": 10 } ``` ### Exact-match search on a title `profile_info.current_title` is mapped as both `text` and `keyword`. Use `term` against the `.raw` field for an exact match. ```json theme={null} { "query": { "term": { "profile_info.current_title.raw": { "value": "Data Scientist" } } }, "limit": 10 } ``` ### Restrict to network connections only `in_network_only: true` returns only profiles connected to your team — ideal for warm outreach. ```json theme={null} { "in_network_only": true, "limit": 100, "query": { "bool": { "must": [ { "match": { "profile_info.job_title": "Product Manager" } } ], "filter": [ { "term": { "profile_info.job_seniority": "senior" } } ] } } } ``` ### Filter on recruiting or job-seeking signals `profile_info.recruiting_signals` and `profile_info.job_seeking_signals` are booleans stored only when `true`. Use `term` to match `true`, and `must_not` to match profiles without the signal. ```json theme={null} { "query": { "bool": { "filter": [ { "term": { "profile_info.recruiting_signals": true } } ], "must_not": [ { "term": { "profile_info.job_seeking_signals": true } } ] } }, "limit": 10 } ``` ## Combining conditions ### Multiple `must` conditions Find all software developers working at The Swarm. ```json theme={null} { "query": { "bool": { "must": [ { "match": { "profile_info.current_title": { "query": "software developer" } } }, { "match": { "profile_info.current_company_name": { "query": "The Swarm" } } } ] } } } ``` ### Range filter combined with a term filter Profiles in the Information Technology and Services industry whose current job was updated in a date range. ```json theme={null} { "query": { "bool": { "must": [ { "range": { "profile_info.current_job_updated_at": { "gte": "2024-05-12", "lte": "2024-05-18" } } }, { "term": { "profile_info.current_company_industry": { "value": "Information Technology and Services" } } } ] } } } ``` ## Nested queries (work experience) ### Profiles in the US who previously held a product role at Google Uses a `nested` query against `profile_info.experience` and excludes current roles. ```json theme={null} { "query": { "bool": { "must": [ { "match": { "current_location": { "query": "United States" } } }, { "nested": { "path": "profile_info.experience", "query": { "bool": { "must": [ { "match": { "profile_info.experience.company.name": { "query": "Google" } } }, { "match": { "profile_info.experience.title.name": { "query": "Product" } } }, { "bool": { "must_not": [ { "exists": { "field": "profile_info.experience.is_current" } } ] } } ] } } } } ] } } } ``` ### Anyone who has ever worked at Google ```json theme={null} { "query": { "nested": { "path": "profile_info.experience", "query": { "match": { "profile_info.experience.company.name.raw": { "query": "Google" } } } } } } ``` ### Worked at Google in the past, not currently there ```json theme={null} { "query": { "bool": { "must": [ { "nested": { "path": "profile_info.experience", "query": { "match": { "profile_info.experience.company.name.raw": { "query": "Google" } } } } } ], "must_not": [ { "match": { "profile_info.job_company_name.raw": { "query": "Google" } } } ] } } } ``` ## Recent job changes For full coverage of querying job changes (promotions vs company moves, polling patterns), see [Daily Job Changes](/docs/signals/daily-job-changes). ```json theme={null} { "query": { "bool": { "filter": [ { "range": { "profile_info.current_job_updated_at": { "gte": "2025-06-01" } } } ] } } } ``` ## Pagination Search returns up to 1000 results per page. Use the `pagination_token` from the previous response to retrieve the next page. ```json theme={null} { "query": { "exists": { "field": "profile_info.emails" } }, "limit": 5, "pagination_token": "eyJzZWFyY2hfYWZ0ZXIiOlt7ImZpZWxkIjoiX3Njb3JlIiwidmFsdWUiOjF9LHsiZmllbGQiOiJwcm9maWxlX2luZm8uaWQiLCJ2YWx1ZSI6IjAwMDE2MTU4LWYyY2EtNDYzZC05YWEzLTIyOWZkMzk0ZWQ0MSJ9XX0=" } ``` See [Pagination](/docs/api-reference/pagination) for full details. # Overview Source: https://docs.theswarm.com/docs/flat-files/overview Flat files are bulk data dumps of The Swarm's entire proprietary database including all fields described in this API documentation, meant for customers who want to host the data themselves and ingest it directly. Flat files give you faster access to the data, and more flexibility on your end. There are two core datasets: * **People flat file** — around 500M profiles * **Companies flat file** — around 50M companies \ Flat file contracts can be supplemented with: * **Data change feed** (only profiles that were changed in are delivered) **-** delivered on daily/weekly/monthly cadence * **Job change feed** (only profiles that changed job) - delivered on daily/weekly/monthly cadence \ Every 30 to 60 days, we may deliver a full refresh when new fields become available or significant data improvements are made. ### **Technical details** * By default, these dataset are exported as JSONL files.  * Parquet and CSV files are also supported. * Size: * Profiles: 550GB (around 5900 gziped JSONL, each containing around 100k profiles) * Companies: 10GB (around 130 gzipped JSONL files, each containing around 350k companies) ### **How Trials Work** 1. You can request a trial of our flat files by contacting our sales team at [theswarm.com/start](http://theswarm.com/start). Please inquire about our pricing and early-stage program for startups. 2. Once an MNDA & Data Evaluation Agreement is in place, we deliver the flat files (people + companies) to you. 3. You get get 14 days to evaluate the data at no cost 4. If the evaluation meets expectations, a contract is sent and billing starts after the trial period. Please note you only start receiving the daily data change feed and the weekly job change feeds once a paying customer. ### **How Delivery Works** * We support many delivery methods, the most popular of which are:  * Replication into cloud storage (AWS S3, GCP, Azure, Cloudflare R2) - see details for most popular methods below * Delivery directly into data warehouse (Databricks, Snowflake etc.) * We offer free support and consultation on ingesting and hosting this data in your system  ### **Instructions for delivery to GCP** 1. Please send your Google account ID. We will need it to give you access to our S3 bucket. [According to Google docs](https://cloud.google.com/blog/topics/developers-practitioners/transfer-data-aws-gcp-using-storage-transfer-service/) this is the *"Google Cloud service account subject ID".* 2. Full data export is at s3://theswarm-data-exports/v3/profiles/full/ 3. Daily exports at s3://theswarm-data-exports/v3/profiles/data-changed/daily/ 4. After that, we will send you the AWS IAM role ARN needed for authentication. ### **Instructions for delivery to AWS** 1. Create an AWS S3 bucket for data deliveries. 2. Enable versioning. 3. Add the bucket policy using the snippet below, replace YOUR-BUCKET-NAME with your bucket name 4. When ready, send us the name of your bucket and ID of your AWS account (12 digits). ### Policy ```json theme={null} { "Version": "2012-10-17", "Id": "", "Statement": [ { "Sid": "Set-permissions-for-objects", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::768778768475:role/service-role/s3crr_role_for_theswarm-data-exports_1" }, "Action": [ "s3:ReplicateObject", "s3:ReplicateDelete", "s3:ObjectOwnerOverrideToBucketOwner" ], "Resource": "arn:aws:s3:::YOUR-BUCKET-NAME/*" }, { "Sid": "Set permissions on bucket", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::768778768475:role/service-role/s3crr_role_for_theswarm-data-exports_1" }, "Action": [ "s3:GetBucketVersioning", "s3:PutBucketVersioning" ], "Resource": "arn:aws:s3:::YOUR-BUCKET-NAME" } ] } ``` # Definitions Source: https://docs.theswarm.com/docs/getting-started/definitions The Swarm API definitions outline how profiles, companies, connections, connectors, and teams are structured and enriched to map relationship networks and surface trusted connection paths. The Swarm organizes data around **profiles** (people) and **companies**, and maps **connections**, how individuals relate through work, education, investors, or shared contacts. These connections are powered by **connectors** (email, calendars, CRMs, LinkedIn, and other data sources) that feed relationship signals into the system. All of this lives within **teams**, so users can see not just their own network but the collective reach of their organization. Profiles and companies are enriched in real time, while the Network Mapper API surfaces connection paths with strength scores, making it possible to identify warm intros, overlaps, and trusted relationship routes at scale. The data has three layers: 1. **Profiles & Companies** (the raw entities), 2. **Connections** (how they relate), 3. **Connectors & Teams** (how data is pulled together and shared). ### Profiles * `id` – unique person identifier * `name`, `title`, `emails`, `linkedin_slug` – core identity * `work_history`, `education_history` – context for overlaps ### Companies * `id` – unique company identifier * `name`, `website`, `industry` – core identity * `size`, `headcount`, `locations` – structure and scale * `funding`, `investors`, `ownership_status` – business data * `tech_stack`, `social_media` – signals and footprint ### Connections * `profile_id` * `user_id` – who is connected to whom * `origin` – type of connection (work overlap, education, LinkedIn, social engagement, email, calendar, investor, manual) * `strength_score` – normalized measure of relationship depth * `sources` – evidence supporting the connection ### Connectors * `id` – unique connector identifier * `type` – email, calendar, CRM, LinkedIn, etc. * `status` – active/inactive * `scope` – which data is being ingested ### Teams * `team_id` – organizational grouping * `members` – list of profiles connected to the team * `connectors` – integrations tied to that team * `network_map` – combined relationship graph across members * `in_network_only` – include profiles that are connected to your team's network # FAQ Source: https://docs.theswarm.com/docs/getting-started/faq Common questions about The Swarm API — v3 migration, data coverage, queries, credits, and data quality. ## General > [accordion] Where do I get an API key? > > Generate your key from **Team Settings → API**. Full walkthrough in the [Quickstart](/docs/getting-started/quickstart). > [accordion] What's the rate limit? > > See [Rate Limiting](/docs/api-reference/rate-limiting) for current limits. > [accordion] If we give you a list of profiles, can you refresh them weekly or monthly? > > Yes. Our on-demand scraping system supports scheduled refreshes for selected profiles on a weekly or monthly basis. See [Refresh a Profile](/docs/on-demand/refresh-profile). > [accordion] Are null values returned? > > Null values are omitted by default. > [accordion] How often do you refresh the data? > > Data is sourced from multiple vendors, each with their own update schedules. Job changes are detected continuously — see [Daily Job Changes](/docs/signals/daily-job-changes) for freshness targets (90% updated within 7 days of a change). > [accordion] What does the `sources` field in connections mean? > > Each connection lists one or more `sources`, each with an `origin` describing how the connection was discovered. > > > [!NOTE] > > > > **Heads up — two different origin vocabularies.** The values below describe the **response-side** `connections[].sources[].origin` field. If you're building a **query** against `team_connections.origins`, that field uses a different value set — see [the Relationships examples](/docs/examples/relationships-endpoint#filtering-by-team-connection-origin) for the query vocabulary. > > Accepted response-side `origin` values: > > * **`linkedin_connection`** — connection imported from LinkedIn > * **`work_overlap`** — derived from shared work history (overlapping employer + dates) > * **`education_overlap`** — derived from shared education (same school + graduation year) > * **`shared_investor`** — derived from shared investors (shared portfolio companies) > * **`email_contact`** — imported from email contacts > * **`calendar_events`** — imported from calendar events > * **`manual_import`** — connections added manually by a team member > * **`social_engagement`**: connection inferred from LinkedIn engagement (comments, reactions, reshares) between the team member and the profile ## Data & Coverage > [accordion] How often is new data available? > > Fresh data is available daily. Job changes typically range from 10k–50k profiles per day. > [accordion] How does The Swarm handle duplicate profiles? > > We use an internal deduplication algorithm to merge duplicates. **v3 eliminated \~98% of the duplicate and corrupted profiles** that existed in v2. > [accordion] How accurate are job changes? > > We target accuracy within **14 days** of a job change. **90% of the database is updated within 7 days** of a detected change. See [Daily Job Changes](/docs/signals/daily-job-changes) for the full freshness model. > [accordion] Will IDs be consistent across data loads? > > Within a major version, yes, IDs are persistent for both people and companies. > [accordion] Do you provide phone numbers? > > No. Phone numbers are not on the roadmap. > [accordion] Do you provide gender or diversity insights? > > No. We do not track gender, ethnicity, or other diversity-related data. > [accordion] Do you have employment type in your dataset? > > No. Employment type is not part of the default public profile, so coverage in ethical sources is very limited. > [accordion] Are LinkedIn URLs standardised? > > Yes. LinkedIn URLs are generated from the username, ensuring consistency. > [accordion] Do you have LinkedIn job descriptions? > > Yes. If a person has a job description on LinkedIn, it's available in our data. > [accordion] Are company logos available? > > Yes. In v3, the profile includes `profile_info.current_company_logo_url` for the current company, and each experience entry includes `experience[].company.logo_url`. Both are CDN URLs. > [accordion] What are the `recruiting_signals` and `job_seeking_signals` fields? > > Both are booleans on `profile_info`. `recruiting_signals` is `true` when the person shows signals that they recruit; `job_seeking_signals` is `true` when they show signals that they look for a job. They replace `hiring` and `open_to_work`, which return the same values but are deprecated and will be removed after 2026/12/07. See [Profile overview](/docs/enrichment-data/profile/overview). > [accordion] Why is a boolean field like `probably_fake` missing from a profile? > > `hiring`, `open_to_work`, `recruiting_signals`, `job_seeking_signals`, and `probably_fake` appear only when their value is `true`. A missing field means `false`. This applies to fetch, search, fetch-refresh, and MCP responses. > [accordion] What is `start_date_confidence`? > > A string field on each experience entry indicating the confidence of the start date. Values: `validated` or `low`. > [accordion] How does The Swarm protect user privacy? > > We comply with industry standards and privacy regulations. For data subject requests, see [Data Subject Requests](/docs/miscellaneous/data-subject-requests). > [accordion] Can data be exported in bulk? > > Yes. Flat files are delivered in batches (typically 100,000 records). See [Flat Files](/docs/flat-files/overview). ## API & Usage > [accordion] What format does the API return? > > JSON. > [accordion] How is API credit usage calculated? > > Credits are charged based on **results returned**, not requests made: > > * **Profile/Company fetch** — 1 credit per record returned > * **Search** — Free > * [**Relationships**](/docs/endpoints/v3/relationships) (team network) — Free > * [**Network Mapper**](/docs/endpoints/v3/network-mapper) (partner) — 1 credit per non-empty response > * **Failed requests** (non-200) — Free > > Full breakdown: [Credits & Usage](/docs/api-reference/credits-usage). Plans and overage rates: [How API Credits Work](https://help.theswarm.com/en/articles/14301925-how-api-credits-work). > [accordion] If I search then fetch the IDs, am I charged twice? > > No. Search is **free**. You're only charged for the results returned by the Fetch call (1 credit per profile or company record). > [accordion] Where can I see my credit usage? > > Your current usage is visible on the [Subscription page](https://app.theswarm.com/team-settings/subscription) (credits used, remaining, and estimated overage). For a breakdown by request type, see the [API Usage](https://app.theswarm.com/team-settings/api) section of Team Settings. Programmatic access: [`GET /credits/usage`](/docs/api-reference/credits-usage). > [accordion] Can I cap API spend at my plan's included credits? > > Yes. Turn on **Overage protection** in the [API settings](https://app.theswarm.com/api#overage-protection). It's off by default — when on, credit-consuming endpoints pause with a `402` once you hit your monthly limit, and no overage charges occur. See [Overage protection](/docs/api-reference/credits-usage#overage-protection). > [accordion] How big is a single fetch response? > > Up to **1000 IDs per call** for Fetch Profile / Fetch Company. Search also returns up to 1000 IDs per page. > [accordion] How do I search profiles in my own network? > > Use the `in_network_only: true` parameter in [Search Profiles](/docs/endpoints/v3/search-profiles), or use the dedicated [Relationships](/docs/endpoints/v3/relationships) endpoint which is free and returns connection details. > [accordion] Can I search by connection strength or list membership? > > Not directly. Fetch profiles with the relevant fields and apply filtering in your downstream processing. > [accordion] How do I retrieve data for specific IDs? > > Use [`POST /v3/profiles/fetch`](/docs/endpoints/v3/fetch-profile) for profiles or [`POST /v3/companies/fetch`](/docs/endpoints/v3/fetch-company) for companies. > [accordion] What's the difference between Relationships and Network Mapper? > > * [**Relationships**](/docs/endpoints/v3/relationships) — returns profiles connected to your own team. Free, synchronous response. Available to all API keys. > * [**Network Mapper**](/docs/endpoints/v3/network-mapper) — maps connections across the **partner** network. 1 credit per non-empty response. Requires partner permission (returns 403 otherwise). > [accordion] Can I filter Relationships results by sync origin? > > Yes. The profile document includes a nested `team_connections.origins` field — query it with a [nested query](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-nested-query.html) inside the OpenSearch DSL `query`, typically scoped to your `team_connections.team_id`. Accepted values (provisional, may change): `csv`, `plugin`, `overlaps`, `google`, `google-calendar`, `user-profile`, `manual-csv`, `education-overlaps`, `investor-overlaps`, `manual-url`, `social-engagement`. See [Relationships endpoint examples](/docs/examples/relationships-endpoint#filtering-by-team-connection-origin). > > Note: this is the **query-side** vocabulary. The response-side `connections[].sources[].origin` field uses a different set of values — see the [sources field FAQ](#what-does-the-sources-field-in-connections-mean). > [accordion] Can I add or remove connectors via the API? > > **Add Connector** is generally available and works with any API key — see [Add Connector](/docs/team-management/connector). **Removal** is not yet automated; contact [support@theswarm.com](mailto:support@theswarm.com). > [accordion] Can I programmatically create new Swarm accounts? > > Yes, with a **partner-level** API key. Contact [support@theswarm.com](mailto:support@theswarm.com) to discuss partner access. > [accordion] Can I filter profiles based on job tenure? > > Not as a single field, but you can derive tenure from the `experience[].start_date` and `experience[].end_date` fields in the Fetch response. In v3, `experience[].start_date_confidence` indicates how reliable the start date is. > [accordion] Do you have filters for company revenue? > > No. Revenue data is not currently planned. ## Data Quality > [accordion] Are employment records always linked to company IDs? > > Not always. Smaller companies may lack persistent IDs. > [accordion] How is full-name formatting handled? > > Names are user-generated on LinkedIn, so variations exist. Full names may include middle names or initials. > [accordion] Can I see what data changed in a profile? > > Not directly, but timestamps indicate when updates occurred. The `current_job_updated_at` field is the primary signal for job-change tracking — see [Daily Job Changes](/docs/signals/daily-job-changes). > [accordion] What do the various timestamp fields mean? > > Example: Sarah was a Client Success Manager at Company A. She moved to Company B in January 2024 with the same title. In March 2024 she updated her public profiles. In July she was promoted to Senior Client Success Manager — published immediately. > > Sarah's timestamps: > > * **`current_job_updated_at`** — the moment The Swarm detected a change in her primary job. `2024-03-08T...` between March and July, then `2024-07-15T...` after the promotion. > * **`latest_company_change_at`** — start date (rounded to full months) of the latest company change: `2024-01-01` (when she actually started at Company B). > * **`latest_role_change_at`** — start date of the latest title change: `2024-07-01`. > * **`job_start_date`** — the greater of `latest_company_change_at` and `latest_role_change_at`. > * **`updated_at`** — technical timestamp of the last update to any field on the profile. > [accordion] How do you detect fake profiles? > > We don't currently detect or filter fake profiles. We do filter out empty profiles (those missing basic information). > [accordion] Is there a completeness score for profiles? > > Not a single field. The number of LinkedIn job experiences is available and can help assess completeness. Profiles vary in richness — Name and Company are the minimum required for a profile to be retained, and profiles can be enriched over time. > [accordion] Why do some company records lack LinkedIn or website data? > > We only keep companies with high-quality extracted data. We're continuously expanding company coverage. > [accordion] Can I expect better work-email coverage soon? > > Yes. We're actively working on improvements aimed at increasing work-email availability to up to 80%. > [accordion] Why is the education degree field an array? > > Some people hold multiple degrees. In most cases the array contains a single value. > [accordion] Why are some profiles outdated? > > Our job-change tracking is continuously improving and some gaps exist in historical data. See [Daily Job Changes](/docs/signals/daily-job-changes) for our current freshness targets. # Introduction Source: https://docs.theswarm.com/docs/getting-started/introduction Seamless integration and powerful data access to The Swarm database. ![Theswarm Data Api](https://mintcdn.com/theswarm-26d627b1/p55TmaghXzamo31y/images/theswarm-data-api.png?fit=max\&auto=format\&n=p55TmaghXzamo31y\&q=85\&s=ffda6fd921f042edb9843a0e5e5ad1c8) The Swarm API gives developers, AI agents, and product teams access to over 500 million professional profiles, 50 million companies, and the deepest relationship mapping data available on the market. Unlike traditional enrichment providers, The Swarm combines people data, company data, relationship intelligence, job changes, and fundraising data into a single platform accessible through APIs, integrations (including Clay, HubSpot, and others), and our native MCP server. The Swarm API is designed using the REST architectural style, employing standard HTTP methods for communication. Responses from the API are formatted in JSON (JavaScript Object Notation), a lightweight data-interchange format widely supported across various programming languages and platforms. This design choice ensures simplicity, flexibility, and ease of integration for developers utilizing the API. ## MCP-native by design ![Swarm Mcp Animation](https://mintcdn.com/theswarm-26d627b1/Equ6miZEav6VQea_/images/swarm-mcp-animation.gif?s=f17f41f5a1f0b608cf72333c1a31e179) The Swarm provides a native [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server, allowing MCP-compatible tools to access live Swarm data directly. With MCP you can: * Discover warm introduction paths * Search people and companies * Analyze professional networks * Research accounts and prospects * Build relationship-aware workflows ## Available data > [card] People data > > Access rich professional profiles including: > > * Current role and company > * Work history > * Education history > * Seniority and function > * Business contact information > * Social profiles > * Geographic information > * Job change activity > [card] Company data > > Access company records including: > > * Company descriptions > * Industry > * Headcount > * Funding history > * Investor information > * Firmographic attributes > * Websites and social properties ### Relationships The Swarm is built around relationship data. Create a team at [app.theswarm.com](https://app.theswarm.com) to configure your "Connectors" (who you ask intros to) and we'll passively map: * Shared work experience * Shared education * Shared investors Your users can then layer in LinkedIn connections and email/calendar contacts. ### Network Mapper (for partners) The Swarm pioneered the first Network Mapper API, enabling developers to programmatically discover warm introduction paths to target accounts and individuals. Used by Clarify, Clay, Unify, and many others already. Common use cases include: * Building a relationship layer in your own product * Mapping a new company network in minutes * Helping users find intro paths into target companies * Ranking introduction paths * Building network-aware AI agents ### Additional signals The Swarm also provides under one umbrella: * Job changes and career movement * Funding and investor data * Social engagement signals * Real-time enrichment for people and companies ## Built for modern applications The Swarm powers growth teams for internal use cases as well as product teams at sales intelligence platforms, recruiting tools, VC workflows, AI agents, CRMs, and other agentic systems. The Swarm provides the data infrastructure needed to understand people, companies, and the connections between them. ## Need help? > [card] [Technical support](mailto:support@theswarm.com) > > Reach out to [support@theswarm.com](mailto:support@theswarm.com) for technical questions. > [card] [Contact sales](https://www.theswarm.com/contact) > > Get in touch with our sales team for business inquiries. # Quickstart Source: https://docs.theswarm.com/docs/getting-started/quickstart Welcome to The Swarm API implementation guide. ![Theswarm Api V3](https://mintcdn.com/theswarm-26d627b1/p55TmaghXzamo31y/images/theswarm-api-v3.png?fit=max\&auto=format\&n=p55TmaghXzamo31y\&q=85\&s=a9bc42d80b6478c8b85d6f26bfdf7040) Access to The Swarm API is secured using an API key mechanism, ensuring only authorized users can interact with the endpoints. Each API key is tied to a specific Team within [The Swarm](https://app.theswarm.com), so you must be an owner or admin of a Team and on the appropriate plan to use it. ### Create an account * Sign up at [https://app.theswarm.com](https://app.theswarm.com) * During onboarding, add your company’s LinkedIn URL to activate the AI Network Mapper, which maps your team’s network. * After onboarding, you’ll get a **14-day free trial** of our **Premium plan**, including **API access**. * Add your connectors, team, partners, customers, investors, advisors, and search through everyone’s combined networks. The **Swarm Relationship Strength Score** automatically evaluates connection quality. * Explore [plans and pricing](https://www.theswarm.com/pricing) to find the best fit for you. ### Get 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**](https://app.theswarm.com/team-settings/api) tab. 3. Click **Generate API Key** to create your key. 4. Copy the generated key to your clipboard for use. ### Using your API key Include your API key in the headers of each request by adding it as the `x-api-key` header. This authenticates your API calls and allows access to Team-specific data, such as profiles, lists, and tags. The same header also works with [The Swarm MCP](/docs/mcp/connect-api-key), so you can query your network from an AI assistant without setting up OAuth. ### Security best practices Your API key is a powerful credential—treat it like a password: * **Keep it private**: Never share your API key in public spaces, such as GitHub or client-side code. * **Protect your access**: Unauthorized use of your API key can compromise your data and system integrity. * **Start small:** When using the API, we suggest testing with a small batch of inputs first. This allows you to validate your setup and ensure everything works smoothly before scaling your processes. * **Rate Limits**: Be mindful of rate limits to avoid unnecessary throttling ([**learn more here**](/docs/api-reference/rate-limiting)). With your API key in hand, you’re ready to securely access The Swarm API and its capabilities! ### Encoding standard In our systems, URLs are always stored and returned encoded. Characters not allowed in standard URLs (e.g., spaces, special characters, emojis) are encoded using the `%` format. Slugs are stored, returned, and sent in requests decoded, exactly as entered by the user. It is recommended to use encoded URLs and decoded slugs in all requests. # Network Mapper (for Partners) Source: https://docs.theswarm.com/docs/intelligence/network-mapper The Network Mapper endpoint builds an entire relationship graph for a target company. Partner permission required. [https://www.loom.com/embed/0cd006b547104edb97565b0533e769f4?sid=88271bef-8e8e-4f45-a5ad-613a9b0be077\&hideEmbedTopBar=true](https://www.loom.com/embed/0cd006b547104edb97565b0533e769f4?sid=88271bef-8e8e-4f45-a5ad-613a9b0be077\&hideEmbedTopBar=true) ## Introduction The Network Mapper endpoint builds an entire relationship graph for a target company. It analyzes data points to (1) identify relationships and (2) calculate Connection Strength scores for every relationship. For team-owned connections, use the free [Relationships](/docs/intelligence/relationships) endpoint instead. As part of the process, we map the "overlaps" of a company's "connectors": **Overlaps:** * Work history overlap — people who work or worked at the same company * Education overlap — people who graduated from the same university in the same year **Connectors:** * Employees of the company * The company's VCs (when applicable) * Execs of portfolio companies of the company's VCs (when applicable) * Any other stakeholders added manually For the API specification, see [Network Mapper endpoint reference](/docs/endpoints/v3/network-mapper). > [!WARNING] > > **Partner permission required.** Calls from an API key not tied to a team with the partner permission in Stripe return **403 Forbidden**. ## Pricing | Response | Cost | | - | - | | Non-empty response | **1 credit per response** | | Empty response | Free | ## Authentication Authenticate with your partner-managed API key in the `x-api-key` header. | Header | Value | | - | - | | `Content-Type` | `application/json` | | `x-api-key` | `` | ## Endpoint | | | | - | - | | URL | `https://bee.theswarm.com/v3/network-mapper` | | Method | `POST` | ## Body parameters In the example below, we query for connections to a target company identified by website domain. ```json theme={null} { "query": { "term": { "profile_info.current_company_websites": { "value": "openai.com" } } }, "mapping_company_website": "theswarm.com", "callback_url": "www.callback.com/some-async-webhook" } ``` Where: * `profile_info.current_company_website` — A valid website domain of the target company. The following fields are required for partner-managed accounts: * `mapping_company_website` — Website domain of the company to be mapped (the customer's company). * `callback_url` — URL for async response. Data is sent to this URL when company mapping is finished. ## Success response (200 OK) ```json theme={null} { "items": [ { "profile": { "id": "f0f9f467-7798-4b15-a913-3d1375c85390", "full_name": "David Connors", "current_title": "Co-Founder & CEO", "linkedin_url": "https://linkedin.com/in/connorsdavid", "work_email": "david@theswarm.com", "current_company_name": "The Swarm", "current_company_website": "theswarm.com" }, "connections": [ { "connector_id": "c050884c-001a-488c-b280-0f617cf4f7bc", "connector_name": "Michal Bil", "connector_linkedin_url": "https://www.linkedin.com/in/michal-bil/", "connector_current_title": "Co-Founder & CTO", "connector_current_company_name": "The Swarm", "connection_strength_normalized": 3, "connection_strength": 0.8840964268278736, "sources": [ { "origin": "linkedin_connection" }, { "origin": "work_overlap", "shared_company": "The Swarm", "shared_company_id": "09d9c510-c9f6-4c6e-9e62-fe5fedbeda87", "shared_company_website": "theswarm.com", "overlap_start_date": "2022-02-01", "overlap_duration_months": 35 }, { "origin": "email_contact" }, { "origin": "calendar_events" } ] } ] } ], "count": 50, "total_count": 213 } ``` Where: * `profile` — Basic information about the connection. * `connections` — Team members connected to the profile. * `connections.sources` — Describes how the profile is connected. The shape depends on `origin`. Accepted `origin` values: `linkedin_connection`, `work_overlap`, `email_contact`, `calendar_events`, `manual_import`, `education_overlap`, `shared_investor`, `social_engagement`. * `count` — Number of returned items (max 50). * `total_count` — Total available connections. ## Async response (202 Accepted) If the target company is not yet mapped, the request is processed asynchronously and a `task_id` is returned. The full result is delivered to the `callback_url`. ```json theme={null} { "task_id": "123abc" } ``` Poll task status using the [Network Mapper Status endpoint](/docs/endpoints/v3/network-mapper-status). ## Error responses ### 400 — Validation failed Wrong query syntax: ```json theme={null} { "status": 400, "title": "Validation failed", "errors": [ { "path": "query", "violation": "ParsingException[unknown query [matchd] did you mean any of [match, match_all]?]" } ] } ``` Missing or invalid `mapping_company_website`: ```json theme={null} { "status": 400, "errors": [ { "message": "mapping_company_website missing in request" } ] } ``` ### 403 — Forbidden The API key is not tied to a team with partner permission. ### 404 — Not found The company with the given `mapping_company_website` is not in our database. ```json theme={null} { "status": 404, "errors": [ { "message": "mapping_company_website not found - can't perform network mapping" } ] } ``` ### Callback body — failure ```json theme={null} { "status": 500, "errors": [ { "message": "failed to map team with company domain theswarm.com" } ] } ``` ## Async status endpoint Poll the status of a long-running mapping task. | | | | - | - | | URL | `https://bee.theswarm.com/v3/network-mapper/status` | | Method | `GET` | See the [Network Mapper Status reference](/docs/endpoints/v3/network-mapper-status). Possible `task_status` values: `in_progress`, `done`, `failed`. ## Filtering and query customization The endpoint accepts any OpenSearch DSL query — narrow results by job title, function, seniority, or any indexed field. ### Filter by title ```json theme={null} { "query": { "bool": { "must": [ { "term": { "profile_info.current_company_website": { "value": "theswarm.com" } } }, { "match": { "profile_info.current_title": { "query": "software engineer", "operator": "AND" } } } ] } } } ``` ### Filter by function Canonical values: `IT & Engineering`, `Human Resources`, `Operations & Supply Chain`, `Marketing & Product Management`, `Sales & Business Development`, `Customer Service & Support`, `Finance & Accounting`, `Legal & Compliance`, `Healthcare & Medical Services`, `Education & Training`, `Consulting & Strategy`, `Real Estate & Property Management`, `Media, Publishing & Journalism`, `Design & Creative Services`, `Trades & Skilled Labor`, `Public Relations & Communications`, `Quality Assurance & Control`, `Program & Project Management`, `Banking & Financial Services`, `Administration & Office Support`. ### Filter by seniority Canonical values: `c-level`, `director`, `vp`, `manager`, `senior`, `junior`. ### Intro path to a specific person ```json theme={null} { "query": { "term": { "profile_info.linkedin_usernames": { "value": "michal-bil" } } } } ``` # Relationships Source: https://docs.theswarm.com/docs/intelligence/relationships Explore your team's network. The Relationships endpoint queries connection data using OpenSearch DSL and returns the people connected to your team, with full connection details. ## Overview The Relationships endpoint returns profiles connected to the team that owns the API key, along with the connection details for each match (who they're connected to and how). It is the v3 successor to the team-network Network Mapper endpoint and behaves like the previous `inNetwork=true` flow. For the API specification, see [Relationships endpoint reference](/docs/endpoints/v3/relationships). For example queries, see [Relationships endpoint examples](/docs/examples/relationships-endpoint). > [!NOTE] > > Relationships requests do not consume API credits. See [Credits & Usage](/docs/api-reference/credits-usage). ## Authentication Authenticate with your API key in the `x-api-key` header. | Header | Value | | - | - | | `Content-Type` | `application/json` | | `x-api-key` | `` | ## Endpoint | | | | - | - | | URL | `https://bee.theswarm.com/v3/relationships` | | Method | `POST` | The request body is a standard OpenSearch DSL `query`. ## Body parameters In the example below, we query for connections working at a company identified by website domain. ```json theme={null} { "query": { "term": { "profile_info.current_company_website": { "value": "google.com" } } } } ``` You can use any OpenSearch DSL clause (`bool`, `match`, `term`, `terms`, `nested`, etc.) to refine results — e.g. by job title, location, or seniority. ### Filtering connections by sync origin The profile document includes a nested `team_connections` field that stores how each connection was synced. You can query against `team_connections.origins`, typically scoped to your `team_connections.team_id`, to limit results to connections from a particular source. Accepted `team_connections.origins` values (provisional, may change): `csv`, `plugin`, `overlaps`, `google`, `google-calendar`, `user-profile`, `manual-csv`, `education-overlaps`, `investor-overlaps`, `manual-url`, `social-engagement`. > [!NOTE] > > This is the **query-side** vocabulary. The response-side `connections[].sources[].origin` field uses a different value set — see the response field reference below. Because `team_connections` is nested, the query must use a [nested query](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-nested-query.html): ```json theme={null} { "query": { "nested": { "path": "team_connections", "query": { "bool": { "must": [ { "term": { "team_connections.team_id": { "value": "" } } }, { "terms": { "team_connections.origins": ["overlaps", "plugin"] } } ] } } } } } ``` For the full v3 mapping, see [OpenSearch Profile Mappings (v3)](/docs/enrichment-data/profile/mappings-v3). For more examples, see [Relationships endpoint examples](/docs/examples/relationships-endpoint). ## Success response (200 OK) The API returns a list of matched profiles and their team connections. ```json theme={null} [ { "profile": { "full_name": "David Connors", "current_title": "Co-Founder & CEO", "linkedin_slug": "connorsdavid", "work_email": "david@theswarm.com", "current_company_name": "The Swarm", "current_company_website": "theswarm.com", "current_company_industry": "Computer Software" }, "connections": [ { "sources": [ { "origin": "work_overlap", "shared_company": "Sequoia Capital", "overlap_start_date": "2020-05-01", "overlap_end_date": "2020-11-01", "overlap_length": "6M" } ], "user_id": "3ac2930c-2ff1-49ec-9a02-ab9cb8d6a56e", "user_name": "Nabil Saad", "user_linkedin_name": "nabil-saad-4845bb1b6", "connection_strength": 0.3257573518327063, "manual_strength": null, "strength_normalized": 2, "created_at": "2024-07-04T11:57:56.678785Z" }, { "sources": [ { "origin": "shared_investor", "investor": "Felicis Ventures", "portfolio_company": "Plaid" } ], "user_id": "52296b0b-7c2c-497c-9342-8a17211d8085", "user_name": "Elisa Schreiber", "user_linkedin_slug": "elisaschreiber", "connection_strength": 0.1084125480166015, "manual_strength": null, "strength_normalized": 1, "created_at": "2024-07-05T13:49:44.542508Z" } ] } ] ``` Where: * `profile` — Basic information about the matched person. * `connections` — Team members who are connected to the profile. * `connections.sources` — Describes how the profile is connected to each team member. There can be multiple ways connecting two people. The connection type is defined by `sources.origin`. Accepted `origin` values: `linkedin_connection`, `work_overlap`, `email_contact`, `calendar_events`, `manual_import`, `education_overlap`, `shared_investor`, `social_engagement`. ## Filtering and query customization The endpoint accepts any OpenSearch DSL query, so you can narrow results further — e.g. people with specific job titles at a target company. For more example queries, see [Relationships endpoint examples](/docs/examples/relationships-endpoint). ```json theme={null} { "query": { "bool": { "must": [ { "term": { "profile_info.current_company_website": { "value": "theswarm.com" } } }, { "match": { "profile_info.current_title": { "query": "software engineer", "operator": "AND" } } } ] } } } ``` ## Pagination The Relationships endpoint supports cursor-based pagination via `limit` and `pagination_token`. | Parameter | Type | Default | Max | Description | | - | - | - | - | - | | `limit` | integer | 100 | 1000 | Number of results to return per page | | `pagination_token` | string | — | — | Token returned in the previous response; omit on the first request | When there are more results beyond the current page, the response includes a `pagination_token`. Pass it in the next request body alongside the same `query` to retrieve the next page. When the response contains no `pagination_token`, you have reached the last page. **First request** ```json theme={null} { "query": { "term": { "profile_info.current_company_website": { "value": "google.com" } } }, "limit": 100 } ``` **Response (more pages available)** ```json theme={null} { "items": [...], "count": 100, "total_count": 340, "pagination_token": "eyJzYXAiOnsic2Vhc..." } ``` **Next-page request** ```json theme={null} { "query": { "term": { "profile_info.current_company_website": { "value": "google.com" } } }, "limit": 100, "pagination_token": "eyJzYXAiOnsic2Vhc..." } ``` # Connect with an API key Source: https://docs.theswarm.com/docs/mcp/connect-api-key Connect The Swarm MCP from any client that supports custom HTTP headers, using your team's API key instead of OAuth. The Swarm MCP accepts your team's API key in an `x-api-key` header, so any client that can send custom headers to a remote MCP server can connect — no OAuth consent screen and no Client ID required. Use this route for Cursor, Claude Code, VS Code, automation platforms, or your own code. If you're on Claude or ChatGPT, use OAuth instead: [Connect in Claude](/docs/mcp/connect-claude) · [ChatGPT app](/docs/mcp/connect-chatgpt). ## Before you start * A **Swarm account** with the MCP integration enabled on your plan. If you're not sure, contact [support@theswarm.com](mailto:support@theswarm.com). * A **team API key**. Generate one under **Team Settings → [API](https://app.theswarm.com/team-settings/api)** — this requires Owner or Admin access. See [Get your API key](/docs/getting-started/quickstart#get-your-api-key). * An MCP client that supports a **remote (HTTP) server with custom headers**. ## Server details | | | | - | - | | **URL** | `https://bee.theswarm.com/mcp` | | **Transport** | Streamable HTTP | | **Auth header** | `x-api-key: your_api_key_here` | ## Configuration Most clients read a JSON config file. The shape below is the common one — check your client's docs for the exact file location and key name. ```json JSON config theme={null} { "mcpServers": { "theswarm": { "url": "https://bee.theswarm.com/mcp", "headers": { "x-api-key": "your_api_key_here" } } } } ``` ```bash Claude Code theme={null} claude mcp add --transport http theswarm https://bee.theswarm.com/mcp \ --header "x-api-key: your_api_key_here" ``` ```bash curl theme={null} curl -X POST https://bee.theswarm.com/mcp \ -H "x-api-key: your_api_key_here" \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/list" }' ``` > [!NOTE] > > Some clients store headers under a different key (`requestInit.headers`, `env`, or a dedicated headers field in the UI). If yours doesn't expose headers at all, use OAuth — or email us to have a Client ID registered for it. ## Verify the connection Open a new chat in your client and check the tools list — you should see The Swarm's tools. Try a quick prompt: > "Find VP-level product leaders at Series B SaaS companies in London." The `curl` example above is the fastest way to confirm the key and endpoint work on their own, independently of any client. See [Tools & prompts](/docs/mcp/tools-and-prompts) for the full tool list and more examples. ## Credits and permissions Billing is identical for both authentication methods — 1 credit per successful search on `find_profiles` and `find_companies`, with empty results free. See [Credits and cost](/docs/mcp/overview#credits-and-cost). The connection is read-only and scoped to the team the key belongs to. ## Rotate or revoke Generate a new key under **Team Settings → [API](https://app.theswarm.com/team-settings/api)**, then update the header in your client config. Revoking a key immediately cuts off every client using it. ## Troubleshooting * **401 / unauthorized** — the key is wrong, or it was rotated. Copy it again from Team Settings → API and confirm the header name is exactly `x-api-key`. * **Server connects but no tools appear** — restart the client so it re-runs discovery. If it still fails, run the `curl` call above: if that returns tools, the problem is in your client config. * **Client sends no headers** — check the config field name, or confirm your client supports custom headers on remote MCP servers at all. * **Plan or permission errors** — confirm your Swarm plan includes MCP access, and that the key was generated by an Owner or Admin. ## Need help? Contact [support@theswarm.com](mailto:support@theswarm.com) and include your client (Cursor, Claude Code, etc.) and a description of what you were trying to do. Don't send us your API key. # The Swarm plugin for ChatGPT Source: https://docs.theswarm.com/docs/mcp/connect-chatgpt Install The Swarm plugin for ChatGPT from the ChatGPT plugin directory and sign in with your Swarm account. No server URL or Client ID needed. The Swarm is an official plugin on the OpenAI ChatGPT platform. Install it from its ChatGPT plugin page, sign in with your Swarm account, and ChatGPT only ever sees the data your account is allowed to see. > [card] [Open The Swarm plugin for ChatGPT](https://chatgpt.com/plugins/plugin_asdk_app_6ae1ca7c9334819198f1246e2791c88d) > > Install the plugin directly from the ChatGPT site. > [!TIP] > > Connecting a different client, or prefer header-based auth? The MCP also accepts your team API key. See [Connect with an API key](/docs/mcp/connect-api-key). ## Before you start * A **Swarm account** with the MCP integration enabled on your plan. If you're not sure, contact [support@theswarm.com](mailto:support@theswarm.com). * Your usual **Swarm sign-in**. > [!NOTE] > > On **ChatGPT Business or Enterprise** workspaces, an admin may need to enable The Swarm plugin before members can install it. ## Install the plugin **1. Open the plugin page** Go to [The Swarm plugin for ChatGPT](https://chatgpt.com/plugins/plugin_asdk_app_6ae1ca7c9334819198f1246e2791c88d) and sign in to ChatGPT if prompted. **2. Install the plugin** Select **Install plugin**. **3. Sign in to The Swarm** Sign in with your Swarm account when prompted. **4. Allow access** On the **Allow access** screen, review the permissions and approve. If you belong to more than one Swarm team, select the team you want ChatGPT to use first. **5. Start a new chat** The Swarm is now available in your chats. ## Verify the connection Start a new chat and try: > "Who on our team is connected to someone at Stripe, and how strong are those connections?" See [Tools & prompts](/docs/mcp/tools-and-prompts) for more examples. ## Disconnect Open ChatGPT **Settings**, find **The Swarm** in your installed apps or plugins, and disconnect or remove it. Your Swarm data is unaffected. ## Troubleshooting * **Plugin not available or Install plugin is disabled**: on Business or Enterprise workspaces, ask your ChatGPT workspace admin to enable The Swarm plugin. * **Sign-in window doesn't open**: disable pop-up blockers for ChatGPT and retry. * **Wrong team connected**: disconnect the plugin, install it again, and pick the right team on the **Allow access** screen. * **Assistant doesn't call Swarm tools**: be more explicit in your prompt ("use The Swarm to find…"), then re-ask. ## Fallback: connect manually with Developer mode If you can't install the plugin, you can still add The Swarm as a custom MCP server. This requires a ChatGPT plan that supports **Developer mode**. 1. In ChatGPT, open **Settings → Connectors → Advanced** and enable **Developer mode**. 2. In **Settings → Connectors**, add a connector / MCP server with the URL `https://bee.theswarm.com/mcp`. 3. When asked for a **Client ID**, enter `open-ai-app`. 4. Sign in with your Swarm account and approve access on the **Allow access** screen. ## Need help? Contact [support@theswarm.com](mailto:support@theswarm.com) with a description of the problem and any error messages ChatGPT showed. # Connect in Claude Source: https://docs.theswarm.com/docs/mcp/connect-claude Connect The Swarm to Claude as a custom MCP connector. Sign in with your Swarm account — no API keys or terminal commands required. Add The Swarm to Claude as a **custom MCP connector**. You sign in with your Swarm account through an OAuth consent screen, and Claude only ever sees the data your account is allowed to see. > [!TIP] > > Connecting a different client, or prefer header-based auth? The MCP also accepts your team API key — see [Connect with an API key](/docs/mcp/connect-api-key). ## Before you start * A **Swarm account** with the MCP integration enabled on your plan. If you're not sure, contact [support@theswarm.com](mailto:support@theswarm.com). * A Claude plan that supports **custom MCP connectors**. Availability depends on your plan. * Your usual **Swarm sign-in**. ## Steps **1. Open connector settings** In Claude, open **Settings → Connectors**. **2. Add a custom connector** Choose **Add custom connector**. **3. Paste the server URL** ```text theme={null} https://bee.theswarm.com/mcp ``` **4. Enter the Client ID** When asked for a **Client ID**, enter: ```text theme={null} claude-app ``` **5. Sign in to The Swarm** Claude opens The Swarm sign-in in a new window. Log in with your Swarm account. **6. Approve access** Review the permissions on the consent screen and approve. You'll return to Claude with The Swarm connected. > [!NOTE] > > Exact menu labels may differ slightly by Claude version and plan. ## Verify the connection Open a new chat and check the tools menu — you should see The Swarm's tools listed. Try a quick prompt: > "Find VP-level product leaders at Series B SaaS companies in London." See [Tools & prompts](/docs/mcp/tools-and-prompts) for more examples. ## Disconnect To remove the connection, go to **Settings → Connectors**, find **The Swarm**, and disconnect. Your Swarm data is unaffected. ## Troubleshooting * **Sign-in window doesn't open** — disable pop-up blockers for Claude, then retry. * **"Connection failed" after sign-in** — confirm the server URL is `https://bee.theswarm.com/mcp` and the Client ID is `claude-app`. * **No Swarm tools appear** — restart Claude, then re-open the chat. If the connector shows as "disconnected", remove and re-add it. * **Plan or permission errors** — confirm your Swarm plan includes MCP access. Contact [support@theswarm.com](mailto:support@theswarm.com) if unsure. ## Need help? Contact [support@theswarm.com](mailto:support@theswarm.com) with a description of the problem and any error messages Claude showed. # Connect in HubSpot Source: https://docs.theswarm.com/docs/mcp/connect-in-hubspot \ The Swarm MCP brings The Swarm's people, company and relationship data into Breeze agents in HubSpot. Once connected, your agents can find who on your team knows someone at an account, build lists of decision-makers, and research companies, all from a conversation in HubSpot. > [!NOTE] > > **Just installed the app?** You're on the right page. Skip to [Step 2: Add The Swarm MCP to an agent](#step-2-add-the-swarm-mcp-to-an-agent). ## Before you start You need: * **A Swarm account** with an Owner, Admin or Contributor role. Viewers can't connect the MCP. [Start a Swarm account](https://www.theswarm.com). * **A HubSpot account with access to Agent Builder**. ## Step 1: Install the app > [!WARNING] > > **The Swarm MCP for HubSpot is currently in review.** The app is waiting for approval from HubSpot and isn't listed in the HubSpot Marketplace yet. Until it's approved, it's available to a limited number of HubSpot accounts through early access. > > Want to try it now? Email [support@theswarm.com](mailto:support@theswarm.com) with your HubSpot Hub ID (click your account name in the top-right corner of HubSpot to find it). We'll send you an install link and enable The Swarm MCP for your account. **1. Find The Swarm MCP in the HubSpot Marketplace** In HubSpot, click the **Marketplace** icon in the top navigation, then search for **The Swarm MCP**. **2. Install the app** Click **Install**, choose the HubSpot account you want to connect, and review the requested access. The app only requests basic OAuth access. It doesn't read or change any of your HubSpot CRM data. **3. Confirm the install** Click **Connect app**. You'll land on this page. The Swarm MCP now appears under **Settings > Integrations > Connected Apps**. ## Step 2: Add The Swarm MCP to an agent **1. Open Agent Builder** Go to **Agent Hub > Agent Builder**, then open the agent you want to use, or create a new one. **2. Add the tool** Click **Configure**, then **Add tool**. Open the **MCP Servers** tab, find **The Swarm MCP** and click **Connect and add**. **3. Sign in to The Swarm** A pop-up opens. Enter your work email and click **Continue with Email**, then enter the 6-digit code we sent or sign up using the Google SSO. **4. Allow access** On the consent screen select the right team/or you would like to connect with, click **Allow**. The Swarm MCP is now added to your agent. ## Step 3: Tell your agent when to use The Swarm Agents work best when their instructions say when to use each tool. Add something like this to your agent's instructions: > When the user asks who knows someone at a company, wants to find people by role, seniority or location, or wants background on a company, use The Swarm MCP. For warm introductions, use the relationships tool and include the teammate with the strongest connection. ## Step 4: Test your agent Open the agent's test panel and try: | Ask | What you get | | - | - | | "Who on our team knows someone at Acme?" | Teammates connected to people at the company, with connection strength | | "Find heads of marketing at fintech companies in London" | A list of matching people with their role, company and location | | "Give me a brief on Acme" | The company's industry, size, locations and funding | When you're happy with the results, publish the agent so your team can use it. ## Available tools | Tool | What it does | | - | - | | `find_profiles` | Searches professional profiles by role, seniority, company, location and skills | | `find_companies` | Searches companies by industry, size, location and funding | | `relationships` | Finds people your team knows and who has the strongest connection | | `profile_dictionary`, `company_dictionary` | Look up valid filter values, such as job titles or industries | | `get_profile_mapping`, `get_company_mapping` | List the fields available for filtering | See [Tools and prompts](/docs/mcp/tools-and-prompts) for details. ## Data and privacy * **Read-only for HubSpot.** The app never creates, changes or deletes records in your HubSpot account, and doesn't sync your CRM data to The Swarm. * **What The Swarm receives.** Only the search requests your agent sends, which can include names or companies from the conversation. * **What your agent can see.** Only the data your Swarm account can access, based on your plan and role. ## Disconnect or uninstall * **Remove it from an agent:** in Agent Builder, open the agent, click **Configure**, and remove The Swarm MCP from its tools. * **Uninstall the app:** go to **Settings > Integrations > Connected Apps**, find The Swarm MCP and click **Uninstall**. ## Troubleshooting > [accordion] The Swarm MCP doesn't appear in the MCP Servers tab > > Check that the app is installed under **Settings > Integrations > Connected Apps** in the same HubSpot account. If it's installed and still missing, contact us. > [accordion] I can't connect my Swarm account > > Make sure you have an Owner, Admin or Contributor role in your Swarm team. Viewers can't connect. Ask your team admin to change your role. > [accordion] Relationship searches return no results > > Relationship results come from your team's mapped networks. Make sure teammates have connected their networks in The Swarm. > [accordion] Searches stopped working > > You may be out of credits. Check your credit balance in The Swarm. If credits are available, remove The Swarm MCP from the agent and add it again to reconnect. ## Need help? Contact us at [support@theswarm.com](mailto:support@theswarm.com). # Overview Source: https://docs.theswarm.com/docs/mcp/overview Connect The Swarm to Claude, ChatGPT, and other AI assistants that support the Model Context Protocol (MCP), and ask questions about people, companies, and your network in plain language. The Swarm MCP is a secure connection between The Swarm and AI assistants that support the Model Context Protocol (MCP). Once connected, your assistant can search The Swarm's relationship data — 500M+ professional profiles and 50M+ companies — and reason over your team's network directly inside your chat. ![Swarm Mcp Animation](https://mintcdn.com/theswarm-26d627b1/Equ6miZEav6VQea_/images/swarm-mcp-animation.gif?s=f17f41f5a1f0b608cf72333c1a31e179) You ask in plain language; the assistant does the searching, filtering, and summarizing. The connection is read-only, uses your own Swarm login, and respects your existing plan and permissions. ## Server endpoint ```text theme={null} https://bee.theswarm.com/mcp ``` ## What you can do **Find people.** Search across 500M+ professional profiles by role, seniority, company, location, skills, and more. **Find companies.** Search 50M+ companies by industry, size, location, funding, investor type, and other attributes. **Discover relationships and warm paths.** Ask who in your team's network is connected to a given person or company, how strong those connections are, and who could make an introduction. See [Tools & prompts](/docs/mcp/tools-and-prompts) for the full tool list and example prompts. ## Authentication The Swarm MCP supports two authentication methods against the same endpoint. Pick the one your client supports. | Method | Best for | Identifies you by | | - | - | - | | **OAuth** | Claude and ChatGPT | Your own Swarm login | | **API key header** | Any MCP client that supports custom HTTP headers | Your team's API key | ### Option 1 — OAuth You sign in with your own Swarm account and approve a consent screen — the assistant only ever sees data your account is allowed to see, and you can disconnect at any time from your assistant's connector settings. How you connect depends on your assistant: | Assistant | How to connect | | - | - | | Claude | Add a custom connector with Client ID `claude-app` | | ChatGPT | Install [The Swarm plugin for ChatGPT](https://chatgpt.com/plugins/plugin_asdk_app_6ae1ca7c9334819198f1246e2791c88d). No Client ID needed. | Walkthroughs: [Connect in Claude](/docs/mcp/connect-claude) · [ChatGPT app](/docs/mcp/connect-chatgpt). > [!NOTE] > > **Want OAuth for another tool?** Each assistant needs a Client ID that we register on our side. So far we support Claude and ChatGPT (through The Swarm plugin for ChatGPT). If you'd like to connect a different tool over OAuth, email [support@theswarm.com](mailto:support@theswarm.com) and tell us which one — we're glad to add it, we just need to know which service to register. ### Option 2 — API key over HTTP If your client can send custom headers, you can skip OAuth entirely and authenticate with your team's API key: ```text theme={null} x-api-key: your_api_key_here ``` This is the same key that authenticates [The Swarm API](/docs/getting-started/quickstart#get-your-api-key), used against the same MCP endpoint. It works in any client that supports a remote MCP server with custom headers — Cursor, Claude Code, VS Code, automation platforms, or your own code. Full setup and configuration examples: [Connect with an API key](/docs/mcp/connect-api-key). > [!WARNING] > > Your API key grants access to your team's data. Treat it like a password — keep it out of shared configs, screenshots, and source control. See [security best practices](/docs/getting-started/quickstart#security-best-practices). ## Who can use it The MCP is available to workspace **Owners, Admins, and Contributors**. Viewers can't connect the MCP. Generating an API key requires **Owner** or **Admin** access, so contributors connecting on their own should use OAuth. ## Credits and cost Access to The Swarm MCP is included with your Swarm plan. Most tools are free to call — browsing dictionaries, checking mapping and enrichment lookups, and relationship lookups never consume credits. ### When credits are charged You're charged **1 credit per successful search** on the two data-retrieval tools: * **Find profiles** — 1 credit when a search returns one or more people. * **Find companies** — 1 credit when a search returns one or more companies. ### Billing rules * **Per call, not per record.** A search that returns 500 results costs the same 1 credit as one that returns a single result. * **Empty searches are free.** If a search returns no results, no credit is used. * **Included allowance.** Every plan comes with a monthly allowance of included credits. On a trial, calls draw down your trial allowance. On a paid plan, calls beyond your included allowance are billed at your plan's per-credit overage rate. * **Overage protection.** If your plan has overage protection enabled, usage stops at your included allowance instead of incurring extra charges. * **Usage notifications.** Owners and admins are emailed at **80%**, **100%**, and **150%** of included credits used. See [Credits & Usage](/docs/api-reference/credits-usage) to check your team's current usage. ## Privacy The connection is read-only, respects your plan and permissions, and can be disconnected at any time from your assistant's connector settings. Your chat content is not stored by The Swarm. See our [Privacy Policy](https://www.theswarm.com/privacy) for full details. ## Need help? Contact [support@theswarm.com](mailto:support@theswarm.com) and include your assistant (Claude, ChatGPT, etc.) and a description of what you were trying to do. # Tools & Prompts Source: https://docs.theswarm.com/docs/mcp/tools-and-prompts How to prompt your assistant to get the most out of The Swarm MCP, and a reference for all seven tools it can call. Your assistant picks the right Swarm tools based on your question — you never call them directly. This page shows how to prompt for the best results, then lists every tool the assistant can use. ## Tools reference The Swarm MCP exposes seven tools, in two groups. ### Action tools These search The Swarm and return results. Two of them are billable — see [Credits and cost](/docs/mcp/overview#credits-and-cost) for the full rules. #### `find_profiles` Search The Swarm's people database. Returns full profiles — current and past jobs, education, skills, locations, emails, and social links. **When the assistant uses it.** Whenever you ask to find, filter, list, or summarize people. **Cost.** 1 credit per successful search (empty results are free). > [!NOTE] > > The boolean fields `recruiting_signals`, `job_seeking_signals`, and `probably_fake` (and the deprecated `hiring` and `open_to_work`) appear in results only when `true`. A missing field means `false`. #### `find_companies` Search The Swarm's company database. Returns full company records — industry, size, locations, funding rounds, business status, and social links. **When the assistant uses it.** Whenever you ask about companies as a group. **Cost.** 1 credit per successful search (empty results are free). #### `relationships` Answers *"who do we know at…?"* — finds people in your team's network, showing which teammates know them and how strong the connection is. **When the assistant uses it.** Any time you ask about warm paths, introductions, or connections through your team. **Cost.** Free. ### Helper tools Setup and lookup tools the assistant calls before or alongside the action tools — they don't return end-user results on their own. #### `profile_dictionary` Look up the exact spelling of people filter values (job title, seniority, industry, connection strength, pipeline stage, etc.) before filtering a search. #### `company_dictionary` Look up the exact spelling of company filter values (industry, location, size, investor type, etc.) before filtering a search. #### `get_profile_mapping` Returns the list of searchable fields for people. Helper step for building a people query. #### `get_company_mapping` Returns the list of searchable fields for companies. Helper step for building a company query. ## Notes for developers * Action tools accept OpenSearch DSL queries. Your assistant constructs these for you based on your natural-language request. * Dictionary and mapping tools return values used to build accurate filtered queries — the assistant calls them automatically as needed. ## Prompting tips * **Be specific.** "Series A fintech founders in Berlin" beats "founders in Germany." * **Layer your filters.** Add role, seniority, industry, location, or company one at a time and refine from there. * **Ask for the network angle.** After finding people or companies, ask *"who on our team is connected to them?"* or *"who can introduce me?"* * **Use exact place names.** Use a location's canonical local name (for example, *Warszawa* rather than *Warsaw*) for the most reliable matches. * **Empty result?** That usually means the filter was too narrow or a value wasn't recognized — try rephrasing or broadening. * **Follow up.** Narrow the location, change the seniority, or ask the assistant to draft an intro message. ## Primary use cases ### Sales prospecting and warm intros Find decision-makers at your target accounts, then discover who on your team can make the introduction. > "Find heads of RevOps at Series B SaaS companies in the US that raised in the last 12 months. Then check which ones anyone on our team is connected to." **What you'll get back:** A shortlist of matching people, followed by a table of who in your network knows them and how strong the connection is. ### Recruiting shortlists Build candidate lists filtered by role, seniority, skills, and location. > "Find senior ML engineers in Berlin or Amsterdam with experience at scale-ups." **What you'll get back:** A ranked list of profiles with role history, skills, and location. Ask for a summary comparison of the top candidates. ### Competitive and market research Search companies by industry, size, funding, and geography. > "List climate-tech companies in the Nordics with 50–200 employees that raised funding in the last year." **What you'll get back:** A list of companies with industry, headcount, location, and latest funding, ready for follow-up questions like *"which of these do we have connections into?"* ## Example prompts **Find people** > "Find VP-level product leaders at Series B SaaS companies in London and summarize the top 10." **Find companies** > "List climate-tech companies in the Nordics with 50–200 employees that raised funding in the last year." **Discover warm paths** > "Who on our team is connected to someone at Stripe, and how strong are those connections?" **Draft an intro** > "Based on the strongest connection you just found, draft a short intro request I could send to my teammate." # Canonical Values Source: https://docs.theswarm.com/docs/miscellaneous/canonical-values Simplify finding relevant data with standardized values The following fields are mapped as `keyword`, it is recommended to use a `term` query to perform the search. ## Seniority These values can be searched using `profile_info.job_seniorities` or its alias, `profile_info.current_seniorities`. Both fields are arrays — a profile can hold multiple seniority levels simultaneously. | Key | | - | | c-level | | director | | vp | | owner | | partner | | senior | | manager | | junior | | unknown | ## Job Function These values can be searched using `profile_info.job_title_role` or its alias, `profile_info.current_job_function`. | Key | | - | | information technology & engineering | | operations & supply chain | | sales & business development | | education & training | | finance & accounting | | healthcare & medical services | | human resources | | marketing & product management | | customer service & support | | media, publishing & journalism | | design & creative services | | legal & compliance | | trades & skilled labor | | real estate & property management | | consulting & strategy | | public relations & communications | | program & project management | | banking & financial services | | quality assurance & control | ## Networks Defined network types in `profile_info.social_media`. | Key | | :- | | aboutme | | angellist | | blog | | builtin | | crunchbase | | dealroom | | facebook | | foursquare | | g2 | | golden | | google | | gravatar | | hackernews | | klout | | levels | | linkedin | | meetup | | pinterest | | pitchbook | | polywork | | producthunt | | quora | | signalNFX | | twitter | | website | | wellfound | # Data Subject Requests Source: https://docs.theswarm.com/docs/miscellaneous/data-subject-requests Automate profile data erasure requests using The Swarm DSR API. The Data Subject Requests (DSR) API enables you to process erasure (deletion) requests for user profile data. When called, this endpoint removes profile data from The Swarm system entirely and ensures it won't be re-imported during future data refreshes. ## Authentication DSR API requests require a dedicated secret key, separate from your standard API key. Include it in the request header: ```text theme={null} X-DSR-SECRET: your_dsr_secret_key ``` Contact [support@theswarm.com](mailto:support@theswarm.com) to obtain your DSR secret key. ## Delete profile data Remove a profile from The Swarm by providing email addresses and/or LinkedIn URL. ### Request ```bash theme={null} curl --request POST \ --url https://integrations.theswarm.com/dsr/profiles \ --header 'Content-Type: application/json' \ --header 'X-DSR-SECRET: ' \ --data '{ "emails": ["user@example.com"], "linkedin_url": "https://linkedin.com/in/username" }' ``` ### Parameters | Parameter | Type | Required | Description | | - | - | - | - | | `emails` | array | No | List of email addresses associated with the profile | | `linkedin_url` | string | No | LinkedIn profile URL | > [!NOTE] > > At least one of `emails` or `linkedin_url` must be provided. ### Responses > [tab] 200 Success > > ```json theme={null} > { > "message": "Requested processed" > } > ``` > [tab] 400 Validation Error > > ```json theme={null} > { > "status": 400, > "title": "Validation failed", > "errors": [ > { > "path": "", > "violation": "" > } > ] > } > ``` > [tab] 500 Server Error > > ```json theme={null} > { > "status": 500 > } > ``` ## How it works 1. **Immediate removal** - The profile data is deleted from all Swarm databases upon a successful request 2. **Permanent exclusion** - The profile is added to an exclusion list, preventing re-import during future data refreshes 3. **Audit trail** - All DSR requests are logged for compliance purposes ## Best practices * Process DSR requests within your required compliance timeframe (e.g., GDPR requires 30 days) * Maintain records of DSR requests for compliance audits * Test with non-production data before implementing in your workflow # Daily Job Changes Source: https://docs.theswarm.com/docs/signals/daily-job-changes How to query daily job-change signals (new roles, promotions, departures) from The Swarm API. The Swarm's Daily Job Change data is a continuous, time-stamped feed of professional movements — new employment, promotions, and departures — embedded directly in the Profile dataset. ## What's in the dataset * **Coverage** — over 100M profiles monitored weekly; \~2–3M job and role changes detected each month. * **Freshness** — target accuracy within 14 days of an event; 90% of the database updated within 7 days of a detected change. * **On-demand refresh** — for high-priority targets, schedule refreshes via the [Refresh Profile](/docs/on-demand/refresh-profile) endpoint. ## Access methods | Method | Use it when | | - | - | | **API (queryable)** | You want to pull fresh job changes daily, filtered to your ICP. Query via [Search Profiles](/docs/endpoints/v3/search-profiles) + [Fetch Profile](/docs/endpoints/v3/fetch-profile). | | **Flat file** | You want the full daily stream as a file drop. See [Flat File](/docs/flat-files/overview). | ## Key timestamp fields All timestamps are queryable through the Search endpoint. | Field | Purpose | | - | - | | **`current_job_updated_at`** | **The main job-change filter.** Updated whenever the primary experience changes (company, title, end date). | | `latest_role_change_at` | Start date of the most recent **job title change**, including same-company promotions. | | `latest_company_change_at` | Start date of the most recent **company change**. | | `job_start_date` | Start date of the latest employment — the greater of `latest_company_change_at` and `latest_role_change_at`. | | `updated_at` | Any field on the profile changed. Too noisy for job-change filtering on its own. | | `last_refresh_at` | Last time the profile was re-checked. | > [!TIP] > > Use **`current_job_updated_at`** as your primary filter. Use `latest_role_change_at` vs `latest_company_change_at` to distinguish promotions from company moves. ## Quick example — job changes in the last 24 hours ```json theme={null} { "query": { "range": { "profile_info.current_job_updated_at": { "gte": "now-1d/d", "lt": "now/d" } } }, "limit": 1000 } ``` For more query patterns (promotions only, into a target company, in-network only, etc.), see [Job changes examples](/docs/examples/job-changes-endpoint). ## Related * [Search Profiles](/docs/endpoints/v3/search-profiles) * [Fetch Profile](/docs/endpoints/v3/fetch-profile) * [OpenSearch mapping for profiles](/docs/enrichment-data/profile/mappings-v3) * [Flat File](/docs/flat-files/overview) # Add Connector Source: https://docs.theswarm.com/docs/team-management/connector Add one or more connector accounts to an existing team via API ## Overview The Add Connector endpoint allows you to programmatically add one or more connector accounts to your team in a single request by providing a list of LinkedIn profile URLs. This enables automated team management and efficient bulk connector operations. ## Endpoint Configuration * **URL**: [https://bee.theswarm.com/team/add-connector](https://bee.theswarm.com/team/add-connector) * **HTTP Method**: POST * **Content Type**: application/json * **Authentication**: API key ([How to get an API key?](/docs/getting-started/quickstart#get-your-api-key)) ### Additional Header for Partner Accounts If you are a partner managing multiple teams, include the target team ID: ```json theme={null} x-authenticate-team: CHILD_TEAM_ID ``` **Behavior**: * `With team header`: Connectors added to specified child team * `Without team header`: Connectors added to parent team associated with API key ## Request Format ### Request Body Structure ```json theme={null} { "linkedin_usernames": ["john-doe", "jane-smith"], "group": "employees" } ``` ### Parameter Details | Parameter | Type | Required | Description | | - | - | - | - | | `linkedin_usernames` | array of strings | Yes | One or more LinkedIn usernames to add as connectors. A single-item array is valid. | | `group` | string | No | Assigns all connectors in the request to a member group. Accepted values: `employees`, `investors`, `customers`, `portfolio`, `advisors`, `others`. | #### `linkedin_usernames` An array of LinkedIn usernames: ```json theme={null} // Username only "linkedin_usernames": ["john-doe"] // Multiple connectors in one request "linkedin_usernames": ["john-doe", "jane-smith", "alex-johnson"] ``` #### `group` (Optional) Categorizes the added connectors within your team. All connectors in a single request receive the same group assignment. | Value | Use for | | - | - | | `employees` | Current or former employees of your organization | | `investors` | Investors in your organization | | `customers` | Customers | | `portfolio` | Portfolio companies | | `advisors` | Advisors | | `others` | Any other relationship type | If omitted, connectors are added without a group assignment. ## Response Codes and Behavior ### HTTP 202 Accepted (Success) At least one username was found and the add-connectors job was queued. Mapping is asynchronous and typically completes within seconds, though it may take up to a few minutes for profiles with large networks. The response lists `users_added` (new connectors being added), `users_exist` (already connectors in the team, skipped without creating duplicates) and `usernames_not_found`. If every username already exists, the response is still 202, with an empty `users_added`. ```json Example 202 response theme={null} { "users_added": ["john-doe"], "users_exist": ["jane-smith"], "usernames_not_found": ["unknown-slug"] } ``` ### HTTP 200 OK None of the provided usernames were found. No connectors were queued, and the usernames are listed in `usernames_not_found`. In this case `users_added` and `users_exist` come back as `null`, not empty arrays. ### HTTP 409 Conflict Adding these connectors would exceed the team's connector limit. No connectors were added. ### HTTP 400 Bad Request Invalid request format or missing required parameters. ## Code Examples ### Add Multiple Connectors ```bash theme={null} curl -X POST https://bee.theswarm.com/team/add-connector \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "linkedin_usernames": ["john-doe", "jane-smith", "alex-johnson"] }' ``` ### Add Connectors with a Group ```bash theme={null} curl -X POST https://bee.theswarm.com/team/add-connector \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "linkedin_usernames": ["john-doe", "jane-smith"], "group": "employees" }' ``` ### Add a Single Connector ```bash theme={null} curl -X POST https://bee.theswarm.com/team/add-connector \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "linkedin_usernames": ["john-doe"] }' ``` ### Partner Request (Child Team) ```bash theme={null} curl -X POST https://bee.theswarm.com/team/add-connector \ -H "x-api-key: YOUR_PARTNER_API_KEY" \ -H "x-authenticate-team: child-team-id-123" \ -H "Content-Type: application/json" \ -d '{ "linkedin_usernames": ["jane-smith", "john-doe"] }' ``` ## Partner Team Management Partners can use this endpoint to manage connectors across multiple child teams. For detailed information on team creation and management, see Team Management documentation. **Team Targeting Logic**: * Include `x-authenticate-team` header: Connectors added to specified child team * Omit `x-authenticate-team` header: Connectors added to parent team ## Processing Details ### Asynchronous Operation The connector mapping happens in the background after a successful 202 response. Processing typically completes within seconds but may take up to a few minutes for profiles with extensive connection networks. ### Idempotent Behavior Duplicate requests for existing connectors return 202 without creating duplicates. Existing connectors are reported in `users_exist`. This makes the endpoint safe for retry scenarios and batch operations. ## Troubleshooting Guide ### Slow Processing **Cause**: Profiles have extensive connection networks\ **Solution**: This is normal behavior; wait for processing to complete ## Support Contact For additional support regarding technical issues, contact the Swarm team at [support@theswarm.com](mailto:support@theswarm.com). # Create Team Source: https://docs.theswarm.com/docs/team-management/team This endpoint allows customers with partner API key to create new teams and access them with a single API key > [!NOTE] > > Available for Swarm Partners only. Get in touch to learn more about becoming a partner. Once you become The Swarm Partner, the team used to generate your partner API key will be the Parent team. With your partner API key you can create many child teams. Child teams can be accessed and managed with the partner API key that was used to create them. ### Create a new child team Endpoint: [https://bee.theswarm.com/team/create-team](https://bee.theswarm.com/team/create-team) Method: POST Request Body (JSON): | Field | Type | Description | | :- | :- | :- | | `team_name` | string | Required. The desired name for the new team. | | `owner_email` | string | Optional. The email of the team owner. If not provided, the owner of the parent team will automatically become the team owner of the created team. | Successful response will return an ID of the newly created team. Please save that ID as it will be needed to authenticate other requests you want to make on behalf of these team (adding connectors, searching etc.) ### Authenticate the requests with a child team ID Once a team is created, the partner API key used for its creation can be used to access other endpoints in the context of the created team: * Search Profiles endpoint * Fetch Profile endpoint * Search Companies endpoint * Fetch Company endpoint * Relationships endpoint (formerly Network Mapper) * Add Connector endpoint To authenticate requests for these endpoints, include the following header: Header: x-authenticate-team: `` Replace `` with the child team\_id obtained during team creation. When the `x-authenticate-team` header is missing in a request, the action will be performed in the context of the parent team. For example: * `Add connector` request with team ID in the header adds a connector to the child team with the ID specified in the header * `Add connector` without a team ID adds a connector to the parent team * Profile and company search/fetch with the team ID in the header run in the context of the child team (list/tag membership reflects that child team) * Profile and company search/fetch without the team ID in the header run in the context of the parent team * Relationships with the header returns profiles within the network of the child team * Relationships without the header returns profiles within the network of the PARENT team # Quickstart for AI agents Source: https://docs.theswarm.com/quickstart-for-ai-agents Get an API key and make your first call in a few minutes. No network setup is needed. ## 1. Sign up Open `app.theswarm.com/api`. Sign in with Google or your work email, and enter the 6-digit code if you used email. On the "Map your team's network" screen, select **Skip To The API**. We create your workspace, generate your API key and start a 14-day trial with 1,000 API credits. You land on the API page.\ ## 2. Get your key and team ID On the API page, select **Reveal API Key** and copy the key. Copy your team ID from the same page. Some endpoints need it. Send the key in the `x-api-key` header on every request: ```text theme={null} curl -H "x-api-key: $SWARM_API_KEY" "" ``` ## 3. Know your limits * **Trial:** 14 days, with 1,000 credits. Calls pause when the credits run out. * **Credit cost:** 1 credit per record for Profile, Company, Relationships and Daily job changes, and 1 credit per result for Network mapper. * **Both products share the trial.** Turning on My network later doesn't extend it.\ ## 4. Make a first call Look up a profile by LinkedIn URL with the Profile endpoint. A response includes `fullName`, `title`, `company` and `location`. It costs 1 credit. ## 5. Choose your endpoints | Group | Endpoint | Returns (example fields) | Needs My network | | :- | :- | :- | :- | | Enrichment data | Profile | fullName, title, company, location | No | | Enrichment data | Company | name, domain, industry, headcount | No | | Intelligence | Relationships | person, knownBy, strength, source | Yes | | Intelligence | Network mapper | target, paths, via, strength | Yes | | Signals | Daily job changes | person, from, to, date | No | Relationships and Network mapper use your team's mapped network. To use them, select **Set up your network** in the sidebar and follow the steps. ## 6. Use MCP instead of the REST API MCP lets you use The Swarm inside AI tools with the same key and credits. It is part of the API product. With My network on, answers also show who on your team knows each person. * **Claude:** copy the MCP server URL, add a connector in Claude's settings (name it "The Swarm", paste the URL and your OAuth Client ID), then select **Allow access**. * **ChatGPT:** open [The Swarm plugin for ChatGPT](https://chatgpt.com/plugins/plugin_asdk_app_6ae1ca7c9334819198f1246e2791c88d), select **Install plugin**, sign in with your Swarm account, choose your team and select **Allow access**, then start a new chat. See [ChatGPT app](/docs/mcp/connect-chatgpt) for details. * **Other tools** (HubSpot, Cursor, Windsurf, your own apps): fill in the request form. OAuth is live for Claude and ChatGPT only. ## If something goes wrong If the trial can't start, you see a message with [support@theswarm.com](mailto:support@theswarm.com). Contact us and we'll start it for you.