---
title: "Fetch all Employee Details from Rippling API"
description: "Technical guide on Rippling API to Fetch all Employee Details from Rippling API"
source_url: "https://www.getknit.dev/blog/fetch-all-employee-details-from-rippling-api-gUJuDA"
page_type: "blog"
---

_This is an educational blog post from Knit's blog: “Fetch all Employee Details from Rippling API”._

# Fetch all Employee Details from Rippling API

### Introduction

This article is a part of a series of articles covering the [Rippling](https://md.getknit.dev/mcp-servers/rippling-mcp-server) API in depth, and covers the specific use case of using the [Rippling](https://md.getknit.dev/mcp-servers/rippling-mcp-server) API to Fetch all Employee Details from Rippling API.  
You can find all the other use cases we have covered for the Rippling API along with a comprehensive deep dive on its various aspects like authentication, rate limits etc [here.](https://www.getknit.dev/blog/rippling-guide)

#### Step 1: Get Current User Information

First, retrieve the current user information to ensure you have the correct access token and company ID.

```
import requests

url = "https://api.rippling.com/platform/api/me"
headers = {
    "Accept": "application/json",
}

response = requests.get(url, headers=headers)
current_user = response.json()
company_id = current_user['company']
```

#### Step 2: Fetch All Employees Including Terminated

Next, use the company ID to fetch all employees, including terminated ones. Ensure pagination for optimal performance.

```
def fetch_employees(company_id, limit=100, offset=0):
    url = "https://api.rippling.com/platform/api/employees/include_terminated"
    headers = {
        "Accept": "application/json",
    }
    params = {
        "EIN": company_id,
        "limit": limit,
        "offset": offset
    }
    response = requests.get(url, headers=headers, params=params)
    return response.json()

employees = []
offset = 0
while True:
    batch = fetch_employees(company_id, limit=100, offset=offset)
    if not batch:
        break
    employees.extend(batch)
    offset += 100
```

#### Step 3: Extract Required Employee Details

Finally, extract the first name, last name, email ID, and manager name for each employee.

```
employee_details = []
for employee in employees:
    details = {
        "first_name": employee.get("firstName"),
        "last_name": employee.get("lastName"),
        "email_id": employee.get("workEmail"),
        "manager_name": None
    }
    manager_id = employee.get("manager")
    if manager_id:
        manager_response = requests.get(f"https://api.rippling.com/platform/api/employees/{manager_id}", headers=headers)
        manager = manager_response.json()
        details["manager_name"] = manager.get("name")
    employee_details.append(details)

print(employee_details)
```

### Knit for Rippling API Integration

For quick and seamless access to Rippling data, the 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 Rippling data.


## Related pages

- [How Knit works](https://md.getknit.dev/how-knit-works)
- [Unified API product](https://md.getknit.dev/products/unified-api)
