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

# Fetch Profile

> The Fetch endpoint within the API facilitates the retrieval of specific profiles from the database based on their unique identifiers (profile IDs or LinkedIn usernames). This endpoint is designed to provide detailed information about individual profiles stored in the database, allowing users to access profile connections, lists, notes, and tags. 

<Warning>
  **Deprecated — July 15, EOD UTC.** Migrate to [Fetch Profile (v3)](/docs/endpoints/v3/fetch-profile).

  **During the transition window, this endpoint reads from the legacy Postgres database.** Some IDs returned by v2 search may not resolve here — fetch from v3 instead. Additional fields (e.g. `tags`) are **not maintained** in v2 during the transition. See the [Migrating to v3](/docs/getting-started/migrating-to-v3) guide.
</Warning>

By default, the response contains the profile connections or team members that are connected to the profile. The API user may specify additional data about the profile in the `fields` object that accepts the following values:

|                |                                                                                                                         |
| -------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `connections`  | List of team members who are connected to the given profile. The connection details are included (see Models > Profile) |
| `tags`         | Tags assigned to the profile                                                                                            |
| `lists`        | Lists the profile is assigned to                                                                                        |
| `notes`        | List of notes assigned to the profile. Private notes are not included.                                                  |
| `profile_info` | Detailed profile data, e.g. work experience, education, etc.                                                            |

<Note>
  Please note that `investorData` is no longer a valid field in fetch requests. This information is now available as `investor_data` nested within the `profile_info` object. For more details on this structure change, please refer to the [Models > Profile](/docs/enrichment-data/profile). documentation.
</Note>

To see a full response of the Fetch endpoint see [Models > Profile](/docs/enrichment-data/profile)


## OpenAPI

````yaml openapi.json POST /v2/profiles/fetch
openapi: 3.1.0
info:
  title: Swarm API
  version: 1.0.0
  contact:
    name: The Swarm
    url: https://theswarm.com
    email: hello@theswarm.com
servers:
  - url: https://bee.theswarm.com
security:
  - ApiKeyAuth: []
tags:
  - name: profiles
    description: Operations related to profiles
  - name: companies
    description: Operations related to companies
  - name: teams
    description: Operations for managing teams and connectors
  - name: social
    description: Operations related to social media posts and interactions
  - name: mcp
    description: Model Context Protocol endpoint for AI assistant integrations
  - name: credits
    description: Operations related to credit usage
  - name: network-mapper
    description: Operations for mapping connections and relationships across your network
paths:
  /v2/profiles/fetch:
    post:
      tags:
        - profiles
      summary: Fetch profiles with corresponding data
      description: Fetch profiles with corresponding data (e.g. connections, lists, tags)
      operationId: fetchProfiles
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ids:
                  type: array
                  items:
                    type: string
                    format: uuid
                  description: The Swarm profile IDs
                linkedinNames:
                  type: array
                  items:
                    type: string
                  description: LinkedIn profile URL slugs
                linkedinIds:
                  type: array
                  items:
                    type: integer
                  description: LinkedIn numeric profile IDs
                linkedinEntityIds:
                  type: array
                  items:
                    type: string
                  description: LinkedIn alphanumeric entity IDs
                fields:
                  type: array
                  items:
                    type: string
                    enum:
                      - profile_info
                      - connections
                      - tags
                      - lists
                      - notes
                      - investor_data
                  minItems: 1
                  default:
                    - profile_info
              anyOf:
                - required:
                    - ids
                - required:
                    - linkedinNames
                - required:
                    - linkedinIds
                - required:
                    - linkedinEntityIds
      responses:
        '200':
          description: A list of profiles with corresponding data
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    description: List of profiles with corresponding data
                    type: array
                    items:
                      $ref: '#/components/schemas/Profile'
                  notFound:
                    description: >-
                      Identifiers (ids / linkedinNames / linkedinIds /
                      linkedinEntityIds) not found
                    type: array
                    items:
                      type: string
                required:
                  - results
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        5XX:
          $ref: '#/components/responses/5XX'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Profile:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the profile
          format: uuid
        connections:
          type: array
          items:
            $ref: '#/components/schemas/Connection'
          description: The connections of the profile
        lists:
          type: array
          items:
            $ref: '#/components/schemas/Pipeline'
          description: The pipelines of the profile
        notes:
          type: array
          items:
            $ref: '#/components/schemas/Note'
          description: The notes of the profile
        tags:
          type: array
          items:
            $ref: '#/components/schemas/Tag'
          description: The tags of the profile
        profile_info:
          $ref: '#/components/schemas/ProfileInfo'
          description: The profile information
        found_by:
          $ref: '#/components/schemas/FoundBy'
      required:
        - id
    Connection:
      type: object
      properties:
        user_id:
          type: string
          description: The unique identifier of the user
          format: uuid
        user_email:
          type: string
          description: The email of the user
        user_linkedin_name:
          type: string
          description: The LinkedIn name of the user
        created_at:
          type: string
          format: date-time
          description: The creation date of the connection
        sources:
          type: array
          items:
            $ref: '#/components/schemas/Source'
          description: The sources of the connection
        connection_strength:
          type: number
          format: float
          description: The strength of the connection
        manual_strength:
          type: number
          format: float
          description: The manually set strength of the connection
        strength_normalized:
          type: integer
          description: The normalized strength of the connection
      required:
        - user_id
        - user_email
        - user_linkedin_name
        - created_at
        - sources
        - connection_strength
        - strength_normalized
    Pipeline:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the pipeline
        name:
          type: string
          description: The name of the pipeline
        status:
          type: string
          description: The status of the pipeline
      required:
        - id
        - name
        - status
    Note:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the note
        content:
          type: string
          description: The content of the note
      required:
        - id
        - content
    Tag:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the tag
        name:
          type: string
          description: The name of the tag
      required:
        - id
        - name
    ProfileInfo:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the profile
          format: uuid
        full_name:
          type: string
          description: The full name of the profile
        first_name:
          type: string
          description: The first name of the profile
        last_name:
          type: string
          description: The last name of the profile
        headline:
          type: string
          description: The title of the current job
        about:
          type: string
          description: The industry of the profile
        linkedin_url:
          type: string
          description: The LinkedIn URL of the profile
        work_email:
          type: string
          description: The work email of the profile
        personal_emails:
          type: array
          items:
            type: string
          description: The personal emails of the profile
        current_title:
          type: string
          description: The title of the current job
        current_function:
          type: string
          description: The role of the title in the current job
        current_seniority:
          type: array
          items:
            type: string
          description: The person's seniority in the current job
        current_company_id:
          type: string
          description: The unique identifier of the company in the current job
          format: uuid
        current_company_name:
          type: string
          description: The name of the company in the current job
        current_company_logo_url:
          type: string
          description: The logo URL of the company in the current job
        current_company_website:
          type: string
          description: The website of the company in the current job
        current_company_size:
          $ref: '#/components/schemas/SizeClass'
        current_company_industry:
          type: string
          description: The industry of the company in the current job
        current_company_location:
          type: string
          description: The location name of the company in the current job
        current_company_linkedin_url:
          type: string
          description: The LinkedIn URL of the company in the current job
        experience:
          type: array
          items:
            $ref: '#/components/schemas/Job'
          description: The experience of the profile
        current_location:
          type: string
          description: The location name of the profile
        other_locations:
          type: array
          items:
            type: string
          description: The location names of the profile
        skills:
          type: array
          items:
            type: string
          description: The skills of the profile
        education:
          type: array
          items:
            $ref: '#/components/schemas/Education'
          description: The education of the profile
        linkedin_experience_count:
          type: integer
          description: Total number of experience entries on LinkedIn
        linkedin_education_count:
          type: integer
          description: Total number of education entries on LinkedIn
        social_media:
          type: array
          items:
            $ref: '#/components/schemas/SocialMedia'
          description: Social media profiles
        investor_data:
          $ref: '#/components/schemas/InvestorData'
          description: Investor-related data
        smart_tags:
          type: array
          items:
            type: string
          description: AI-generated tags for the profile
        latest_role_change_at:
          type: string
          format: date
          description: The date of the latest role change
        latest_company_change_at:
          type: string
          format: date
          description: The date of the latest company change
        current_job_updated_at:
          type: string
          format: date-time
          description: The update date of current job in the profile
        updated_at:
          type: string
          format: date-time
          description: The update date of the profile
        created_at:
          type: string
          format: date-time
          description: The creation date of the profile
        last_refresh_at:
          type: string
          format: date-time
          description: The last refresh date of the profile
        current_company_websites:
          type: array
          items:
            type: string
          description: The websites of the company in the current job
        current_company_industries:
          type: array
          items:
            type: string
          description: The industries of the company in the current job
        certifications:
          type: array
          items:
            $ref: '#/components/schemas/Certification'
          description: The certifications of the profile
        image_url:
          type: string
          description: Profile image URL (CDN)
      required:
        - id
    FoundBy:
      type: object
      properties:
        ids:
          type: array
          items:
            type: string
            format: uuid
        linkedinNames:
          type: array
          items:
            type: string
        linkedinIds:
          type: array
          items:
            type: integer
        linkedinEntityIds:
          type: array
          items:
            type: string
      description: Which of the requested identifiers matched this result
    ErrorResponse:
      type: object
      properties:
        code:
          description: Error status code
          type: integer
        errors:
          type: array
          items:
            type:
              - string
              - object
      required:
        - code
    Source:
      type: object
      properties:
        origin:
          type: string
          description: The origin of the source
        network:
          type: string
          description: The network of the source
      required:
        - origin
        - network
    SizeClass:
      type: object
      properties:
        min:
          type: integer
          description: The minimum size of the class
        max:
          type: integer
          description: The maximum size of the class
    Job:
      type: object
      properties:
        is_current:
          type: boolean
          description: Whether the job is primary or not
        company_id:
          type: string
          description: The unique identifier of the company in the job
          format: uuid
        company:
          $ref: '#/components/schemas/ProfileCompany'
        title:
          type: string
          description: The title of the job
        seniority:
          type: array
          items:
            type: string
          description: The person's seniority in the job
        function:
          type: string
          description: The role/function in the job
        location:
          type: array
          items:
            type: string
          description: Job location names
        description:
          type: string
          description: The description of the job
        start_date:
          type: string
          format: date
          description: The start date of the job
        end_date:
          type: string
          format: date
          description: The end date of the job
        status:
          type: string
          description: Experience status enum
          enum:
            - unknown
            - past
            - ongoing
    Education:
      type: object
      properties:
        school:
          $ref: '#/components/schemas/School'
        start_date:
          type: string
          format: date
          description: The start date of the education
        end_date:
          type: string
          format: date
          description: The end date of the education
        degrees:
          type: array
          items:
            type: string
          description: The degrees of the education
        majors:
          type: array
          items:
            type: string
          description: The majors of the education
        minors:
          type: array
          items:
            type: string
          description: The minors of the education
        activities:
          type: string
          description: The activities of the education
        grade:
          type: string
          description: The grade of the education
        description:
          type: string
          description: The description of the education
    SocialMedia:
      type: object
      properties:
        network:
          type: string
          description: Social media network name
        id:
          type: string
          description: Identifier on the social network
        slug:
          type: string
          description: Slug / handle on the social network
        url:
          type: string
          description: Full profile URL
        url_status:
          type: string
          description: Status of the resolved URL
          enum:
            - ''
            - unknown
            - active
    InvestorData:
      type: object
      properties:
        description:
          type: string
          description: Investor description
        type:
          type: array
          items:
            type: string
          description: Types (e.g. Angel, VC)
        industry_focus:
          type: array
          items:
            type: string
          description: Industries of focus
        stage_focus:
          type: array
          items:
            type: string
          description: Investment stages of focus
        geo_focus:
          type: array
          items:
            type: string
          description: Geographies of focus
        check_size:
          type: array
          items:
            type: string
          description: Typical check sizes
        portfolio_companies:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
                description: Portfolio company id
            required:
              - id
          description: Portfolio companies
    Certification:
      type: object
      properties:
        end_date:
          type: string
          description: The end / expiry date of the certification
        name:
          type: string
          description: The name of the certification
        organization:
          type: string
          description: The issuing organization
        start_date:
          type: string
          description: The start / issue date of the certification
    ProfileCompany:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the company
        canonical_name:
          type: string
          description: The canonical name of the company
        name:
          type: string
          description: The name of the company
        founded:
          type: string
          format: date-time
          description: The founding date of the company
        industry:
          type: string
          description: The industry of the company
        website:
          type: string
          description: The website of the company
        size:
          $ref: '#/components/schemas/SizeClass'
        social_media:
          type: array
          items:
            $ref: '#/components/schemas/SocialMedia'
          description: The networks of the company
        locations:
          type: array
          items:
            $ref: '#/components/schemas/CompanyLocation'
          description: The locations of the company
        industries:
          type: array
          items:
            type: string
          description: The industries of the company
        websites:
          type: array
          items:
            type: string
          description: The websites of the company
        workforce:
          type: object
          properties:
            headcount:
              type: integer
              description: Current headcount
    School:
      type: object
      properties:
        name:
          type: string
          description: The name of the school
        location:
          $ref: '#/components/schemas/Location'
        website:
          type: string
          description: The website of the school
        linkedin_url:
          type: string
          description: Linkedin profile URL of the school
        linkedin_id:
          type: string
          description: Linkedin numeric id of the school
        social_media:
          type: array
          items:
            $ref: '#/components/schemas/SocialMedia'
          description: Social media profiles of the school
    CompanyLocation:
      type: object
      properties:
        name:
          type: string
          description: The name of the location
        city:
          type: string
          description: The city of the location
        state:
          type: string
          description: The state of the location
        country:
          type: string
          description: The country of the location
        street_address:
          type: string
          description: The street address of the location
        postal_code:
          type: string
          description: The postal code of the location
        headquarter:
          type: boolean
          description: Whether the location is the headquarter
    Location:
      type: object
      properties:
        name:
          type: string
          description: The name of the location
        city:
          type: string
          description: The city of the location
        state:
          type: string
          description: The state of the location
        country:
          type: string
          description: The country of the location
        street_address:
          type: string
          description: The street address of the location
        postal_code:
          type: string
          description: The postal code of the location
  responses:
    '400':
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    '401':
      description: Unauthorized
    '403':
      description: Forbidden
    5XX:
      description: Unexpected error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````