Skip to main content
These examples target the 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).
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.

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.

Connections to a specific person

Identify who in your network is connected to a specific person, by LinkedIn username.

Connections to senior software engineers at selected companies

Combine seniority, role, and company filters with a bool.must clause.

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).
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 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.

Connections from work or education overlaps for a specific team

Scopes the origin filter to your team using team_connections.team_id. Replace <your team id> with your team ID.
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.