---
title: "How to get employee dependent data from BambooHR API (Python Example)"
url: "https://lb.getknit.dev/blog/get-employee-dependent-data-using-bamboohr-api-python-example/"
date: "2026-08-13T12:59:59+00:00"
modified: "2026-08-23T11:20:57+00:00"
type: "post"
---

# How to get employee dependent data from BambooHR API (Python Example)

[Blog](https://lb.getknit.dev/blog) / [Tutorials](https://lb.getknit.dev/blogs/tutorials/) / How to get employee dependent data from BambooHR API (Python Example) [Tutorials](https://lb.getknit.dev/blogs/tutorials/) · August 13, 2026 

How to get employee dependent data from BambooHR API (Python Example)
=====================================================================

 ![](https://storage.googleapis.com/knit-website-media/2026/08/64c34c8eb1ffc79e7f787ecd_Akshat-3-150x150.png)Akshat Jain

2 min read

 

 

 [](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Flb.getknit.dev%2Fblog%2Fget-employee-dependent-data-using-bamboohr-api-python-example%2F) [](https://twitter.com/intent/tweet?url=https%3A%2F%2Flb.getknit.dev%2Fblog%2Fget-employee-dependent-data-using-bamboohr-api-python-example%2F&text=How%20to%20get%20employee%20dependent%20data%20from%20BambooHR%20API%20%28Python%20Example%29)  

 

 

 

  Table of Contents - [Introduction](#)
- [BambooHR API: Get Employee Details](#)
- [Overview](#)
- [Step-by-Step Guide](#)
- [Knit for BambooHR API Integration](#)
 
  Introduction
------------

This article is a part of a series of articles covering the BambooHR API in depth, and covers the specific use case of using the BambooHR API to Get employee details.

> If you are looking for a comprehensive directory of BambooHR API endpoints to discover what endpoints will fit best for your use case, check our [BambooHR API Directory](/blog/bamboohr-api-directory-qdlfbw/).

BambooHR API: Get Employee Details
----------------------------------

### Overview

To retrieve detailed information about employees in BambooHR, you can utilize multiple APIs. This guide provides a step-by-step approach to get the first name and last name of all employees using the BambooHR API.

### Step-by-Step Guide

#### Step 1: Get Employee Directory

First, you need to fetch the employee directory, which contains basic information about all employees.

##### Endpoint

```
GET https://api.bamboohr.com/api/gateway.php/{companyDomain}/v1/employees/directory
```

##### Sample Python Code

```
import requests

company_domain = 'your_company_domain'
url = f'https://api.bamboohr.com/api/gateway.php/{company_domain}/v1/employees/directory'
headers = {
   'Accept': 'application/json',
   'Authorization': 'Basic YOUR_API_KEY'
}
response = requests.get(url, headers=headers)
if response.status_code == 200:
   employees = response.json().get('employees', [])
   for employee in employees:
       print(f"First Name: {employee.get('firstName')}, Last Name: {employee.get('lastName')}")
else:
   print(f"Failed to retrieve employee directory: {response.status_code}")
```

`‍`

#### Step 2: Get Employee Dependents (Optional)

If you need additional details such as employee dependents, you can use the following endpoint.

##### Endpoint

```
GET https://api.bamboohr.com/api/gateway.php/{companyDomain}/v1/employeedependents
```

##### Sample Python Code

```
employee_id = 'specific_employee_id'
url = f'https://api.bamboohr.com/api/gateway.php/{company_domain}/v1/employeedependents?employeeid={employee_id}'
response = requests.get(url, headers=headers)
if response.status_code == 200:
   dependents = response.json().get('Employee Dependents', [])
   for dependent in dependents:
       print(f"Dependent Name: {dependent.get('firstName')} {dependent.get('lastName')}")
else:
   print(f"Failed to retrieve employee dependents: {response.status_code}")
```

Knit for BambooHR API Integration
---------------------------------

For quick and seamless access to [BambooHR](/integration/bamboohr/) API, Knit API offers a convenient solution. By integrating with Knit just once, you can streamline the entire process. Knit takes care of all the authentication, authorization, and ongoing integration maintenance, this approach not only saves time but also ensures a smooth and reliable connection to your [BambooHR](/integration/bamboohr/) API.

---

**Ready to build this integration?**
Explore Knit’s [BambooHR integration](/integration/bamboohr/) or read more about our [Unified HRIS API](/integration-categories/unified-hris-api/).

 

 ![](https://storage.googleapis.com/knit-website-media/2026/08/64c34c8eb1ffc79e7f787ecd_Akshat-3-150x150.png)Written by Akshat Jain

Coding chaos into innovation and building from zero to scale

 

 

 

 

 

   Keep Reading
------------

  ![](https://storage.googleapis.com/knit-website-media/2026/08/blog-banner-yellow-scaled-640x400.png) [Tutorials](https://lb.getknit.dev/blogs/tutorials/) 

### [How to get job application data from BambooHR ATS API](https://lb.getknit.dev/blog/how-to-get-job-application-data-from-bamboohr-ats-api/)

A practical guide to fetching job application data from the BambooHR ATS API, with step-by-step instructions, code samples, pitfalls, FAQs,…

 August 13, 2026 · 4 min read 

 

   ![](https://storage.googleapis.com/knit-website-media/2026/08/blog-banner-yellow-scaled-640x400.png) [Tutorials](https://lb.getknit.dev/blogs/tutorials/) 

### [BambooHR API Integration Guide (In-Depth) : Get Employee Data, Auth &amp; Integration Examples](https://lb.getknit.dev/blog/how-to-get-employee-data-from-bamboohr-api/)

Complete 2026 guide to the BambooHR API — covers authentication, API key setup, getting all employees, custom fields, pagination, Python…

 April 5, 2026 · 17 min read 

 

   ![](https://storage.googleapis.com/knit-website-media/2026/08/blog-banner-red-scaled-640x400.png) [API Directory](https://lb.getknit.dev/blogs/api-directory/) 

### [BambooHR API Directory](https://lb.getknit.dev/blog/bamboohr-api-directory-qdlfbw/)

Learn about the common BambooHR API end points in this comprehensive BambooHR API directory and quickstart your BAmbooHR integration journey!

 April 4, 2026 · 12 min read 

 

  

 

  \#1 in Ease of Integrations
---------------------------

![4.9 out of 5 stars](/wp-content/themes/knit/assets/images/g2/g2-star-rating.svg)

4.9 out of 5 stars on G2

![G2 Leader, Spring 2026](/wp-content/themes/knit/assets/images/g2/g2-leader.svg)![G2 Fastest Implementation, Spring 2026](/wp-content/themes/knit/assets/images/g2/g2-fastest-implementation.svg)![G2 High Performer, Spring 2026](/wp-content/themes/knit/assets/images/g2/g2-high-performer.svg)![G2 Best Est. ROI, Spring 2026](/wp-content/themes/knit/assets/images/g2/g2-best-roi.svg)

 

  Put Integrations on Autopilot. Talk to Experts.
-----------------------------------------------

Knit is loved by customers across the globe due to our seamless product and white glove support. You'll love us too!

 [Talk to a Human](/book-demo)
