Groups
The group commands read LinkedIn groups: the groups a member belongs to, one group's full detail, and a group's member roster. All commands are account-scoped and require --account (or a default set via curviate config set-account).
Before you start. You need an API key and a connected LinkedIn account. Run curviate account list to read your acc_... ids; if it returns an empty list, connect an account first (Authentication & Accounts). Without one, every command here exits 4 with ACCOUNT_NOT_FOUND.
All three subcommands are reads: they never accept --preview (passing it is a usage error, exit code 2). Every command supports --json (automatic when stdout is not a TTY) and --fields for a dot-path projection; the two list commands additionally support --limit, --cursor, --all, and --max-pages.
Commands
# List the groups a member belongs to (paginated read)
# Reads YOUR connected account's own groups by default.
# --target reads another member's public group set (their interests-groups
# section) instead of your own. Accepts a vanity slug or a full /in/ URL,
# passed through as-is. Omit it to enumerate your own groups.
curviate group list [--target <vanity|url>] [--limit <n>] [--cursor <token>] [--all] [--max-pages <n>]The id on each returned group is what group get and group members consume. The --target value is passed through as-is; an unresolvable one surfaces a clear error from the API rather than silently returning an empty list.
# Get one group's full detail (scalar read)
# <group> takes the group's numeric id (read it from `group list`).
curviate group get <group>group get returns:
{
"object": "group",
"id": "12345678",
"entity_urn": "urn:li:fsd_group:12345678",
"name": "GTM Engineering",
"member_count": 4820,
"description": "A community for go-to-market engineers.",
"type": "STANDARD",
"public_visibility": true,
"direct_join_enabled": true,
"is_member": false,
"membership_status": "NON_MEMBER",
"url": "https://www.linkedin.com/groups/12345678/",
"admin": {
"name": "Jane Smith",
"connection_degree": "2nd",
"member_id": "ACoAAA...",
"vanity": "janesmith",
"profile_url": "https://www.linkedin.com/in/janesmith/"
},
"post_approval_enabled": false,
"invitation_level": "ALL_MEMBERS"
}Check is_member and membership_status before calling group members: a non-member
roster read fails rather than returning an empty page. admin{} is always present on
both group list and group get.
Both commands return a slim default: only sample_past_members[] is dropped. Pass --verbose to include it.
# List a group's members (paginated read)
# --name filters the roster by member name (prefix/substring, multi-word,
# case-insensitive): the folded-in member search, the SAME endpoint with a
# name filter, not a separate command.
curviate group members <group> [--name <query>] [--limit <n>] [--cursor <token>] [--all] [--max-pages <n>]Each member item carries its profile URL, name, and headline. A cursor is scoped to the --name it was minted under, replaying a cursor with a different --name is rejected upstream, so keep --name stable while paginating one search.
Pagination
The two list commands are cursor-paginated. A page returns a cursor; pass it back with --cursor <token> to fetch the next page, and walk until cursor is null. To stream every page as NDJSON in one command, use --all (bounded by --max-pages, default 100):
curviate group members 12345678 --all --account acc_YOUR_ACCOUNT_IDExamples
List your own groups
curviate group list --account acc_YOUR_ACCOUNT_IDList another member's public groups
# By vanity slug or full URL
curviate group list --target janesmith --account acc_YOUR_ACCOUNT_ID
curviate group list --target https://linkedin.com/in/janesmith --account acc_YOUR_ACCOUNT_IDGet one group's detail
# By group id. Pass the numeric id, not a URL: a full URL is sent unencoded
# into the path and misses the route.
curviate group get 12345678 --account acc_YOUR_ACCOUNT_IDSearch a group's members by name
curviate group members 12345678 --name "sophie" --account acc_YOUR_ACCOUNT_IDErrors you may hit
| Code | Exit | Cause | Fix |
|---|---|---|---|
ACCOUNT_NOT_FOUND | 4 | --account names an id this API key does not own. | Run curviate account list. |
RESOURCE_NOT_FOUND | 4 | The group id does not exist, or a full URL was passed where an id is expected. | Read the id from group list. |
RESOURCE_ACCESS_RESTRICTED | 8 | The roster is not visible to this account. | Check is_member on group get first. |
UNAUTHORIZED | 3 | Missing or invalid API key. | Set CURVIATE_API_KEY, or run curviate login. |
Full envelope shapes are in the error reference.