> ## Documentation Index
> Fetch the complete documentation index at: https://docs.harvestapi.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Group

> Get the LinkedIn group. Required at least one of the query parameters

<CodeGroup>
  ```javascript JavaScript theme={null}
  const params = new URLSearchParams({
    url: 'https://www.linkedin.com/groups/1898033/', // by URL
    groupId: '1898033', // by group ID alternatively
  });

  fetch(`https://api.harvestapi.io/linkedin/group?${params.toString()}`, {
    headers: { 'X-API-Key': '<api-key>' },
  })
    .then((response) => response.json())
    .then((data) => console.log(data));
  ```

  ```bash cURL theme={null}
  curl --request GET \
    --url https://api.harvestapi.io/linkedin/group?groupId=1898033 \
    --header 'X-API-Key: <api-key>'
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.harvestapi.io/linkedin/group?groupId=1898033"

  headers = {"X-API-Key": "<api-key>"}

  response = requests.request("GET", url, headers=headers)

  print(response.text)
  ```
</CodeGroup>


## OpenAPI

````yaml GET /linkedin/group
openapi: 3.0.1
info:
  title: HarvestAPI LinkedIn API reference
  description: HarvestAPI LinkedIn API reference
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.harvestapi.io
security:
  - ApiKeyAuthHeader: []
paths:
  /linkedin/group:
    get:
      summary: Get the LinkedIn group
      description: Get the LinkedIn group. Required at least one of the query parameters
      parameters:
        - name: url
          in: query
          description: URL of the LinkedIn group (optional)
          schema:
            type: string
            format: url
        - name: groupId
          in: query
          description: ID of the LinkedIn group (optional)
          schema:
            type: string
      responses:
        '200':
          description: Group profile response
          content:
            application/json:
              schema:
                type: object
                properties:
                  element:
                    $ref: '#/components/schemas/Group'
                  status:
                    type: string
                  error:
                    type: string
                  query:
                    type: object
                    properties:
                      url:
                        type: string
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Group:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the LinkedIn group.
        linkedinUrl:
          type: string
          format: url
          description: URL of the LinkedIn group.
        name:
          type: string
          nullable: true
          description: Name of the LinkedIn group.
        memberCount:
          type: integer
          format: int64
          nullable: true
          description: Number of members in the group.
        logo:
          type: object
          nullable: true
          properties:
            url:
              type: string
              format: url
              description: URL of the group's logo.
            width:
              type: integer
              description: Width of the logo image.
            height:
              type: integer
              description: Height of the logo image.
            expiresAt:
              type: integer
              format: int64
              description: Timestamp when the logo URL expires.
          description: Details about the group's logo.
        heroImage:
          type: object
          nullable: true
          properties:
            url:
              type: string
              format: url
              description: URL of the group's hero image.
            width:
              type: integer
              description: Width of the hero image.
            height:
              type: integer
              description: Height of the hero image.
            expiresAt:
              type: integer
              format: int64
              description: Timestamp when the hero image URL expires.
          description: Details about the group's hero image.
        description:
          type: string
          nullable: true
          description: Description of the LinkedIn group.
        rules:
          type: string
          nullable: true
          description: Rules of the LinkedIn group.
        createdAt:
          type: object
          nullable: true
          properties:
            date:
              type: string
              format: date-time
              description: Creation date of the group in string format.
            timestamp:
              type: integer
              format: int64
              description: Creation date of the group as a Unix timestamp.
          description: Creation timestamp and date of the group.
        groupPlusStatusActive:
          type: boolean
          description: Indicates if Group Plus status is active.
        postApprovalEnabled:
          type: boolean
          description: Indicates if post approval is enabled for the group.
        invitationLevel:
          type: string
          nullable: true
          description: >-
            Level of invitation required for the group (e.g., 'Anyone',
            'ByInvitation').
        welcomeNote:
          type: string
          nullable: true
          description: Welcome note for new members.
        automatedWelcomeNoteEnabled:
          type: boolean
          description: Indicates if automated welcome note is enabled.
        publicVisibility:
          type: boolean
          description: Indicates if the group is publicly visible.
        admins:
          type: object
          properties:
            totalCount:
              type: integer
              description: Total count of administrators.
            text:
              type: string
              nullable: true
              description: >-
                Text representation of administrators (e.g., "John Doe and 2
                others").
            profiles:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the admin profile.
                  linkedinUrl:
                    type: string
                    format: url
                    description: URL of the admin's LinkedIn profile.
                  firstName:
                    type: string
                    description: First name of the admin.
                  lastName:
                    type: string
                    description: Last name of the admin.
                  headline:
                    type: string
                    nullable: true
                    description: Headline of the admin's LinkedIn profile.
                  picture:
                    type: string
                    format: url
                    nullable: true
                    description: URL of the admin's profile picture.
                required:
                  - id
                  - linkedinUrl
                  - firstName
                  - lastName
              description: List of admin profiles.
          required:
            - totalCount
            - profiles
          description: Information about the group administrators.
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    ApiKeyAuthHeader:
      type: apiKey
      in: header
      name: X-API-Key

````