---
title: "Get all candidates for a job from Greenhouse  API"
url: "https://getknit.dev/blog/get-all-candidates-for-a-job-from-greenhouse-api-r8hhc0/"
date: "2024-08-07T08:15:38+00:00"
modified: "2024-09-10T01:56:30+00:00"
type: "post"
---

# Get all candidates for a job from Greenhouse  API

[Blog](https://getknit.dev/blog) / [Tutorials](https://getknit.dev/blogs/tutorials/) / Get all candidates for a job from Greenhouse API [Tutorials](https://getknit.dev/blogs/tutorials/) · August 7, 2024 · Updated September 10, 2024 

Get all candidates for a job from Greenhouse API
================================================

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

3 min read

 

 

 [](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fgetknit.dev%2Fblog%2Fget-all-candidates-for-a-job-from-greenhouse-api-r8hhc0%2F) [](https://twitter.com/intent/tweet?url=https%3A%2F%2Fgetknit.dev%2Fblog%2Fget-all-candidates-for-a-job-from-greenhouse-api-r8hhc0%2F&text=Get%20all%20candidates%20for%20a%20job%20from%20Greenhouse%20%20API)  

 

 

 

  Table of Contents - [Introduction](#introduction)
- [Get all candidates for a job from Greenhouse API](#get-all-candidates-for-a-job-from-greenhouse-api)
- [Overview](#overview)
- [Step-by-Step Guide](#step-by-step-guide)
- [Knit for Greenhouse API Integration](#knit-for-greenhouse-api-integration)
 
  Introduction
------------

This article is a part of a series of articles covering the Greenhouse API in depth, and covers the specific use case of using the Greenhouse API to Get all candidates for a job from Greenhouse API.
You can find all the other use cases we have covered for the Greenhouse API along with a comprehensive deep dive on its various aspects like authentication, rate limits etc [here.](/blog/greenhouse-api-directory-0zj8dx/)

Get all candidates for a job from Greenhouse API
------------------------------------------------

### Overview

To retrieve all candidates who have applied to a specific job using the Greenhouse API, you will need to utilize multiple API endpoints. This guide provides a step-by-step approach to achieve this using Python code snippets.

### Step-by-Step Guide

#### 1. Set Up Authorization

Greenhouse API uses Basic Auth for authorization. Ensure you have your API key ready.

```
import requests
from requests.auth import HTTPBasicAuth

api_key = 'YOUR_API_KEY'
auth = HTTPBasicAuth(api_key, '')
```

#### 2. Fetch Candidates for a Specific Job

Use the `GET /v1/candidates` endpoint to fetch candidates who have applied to a specific job by providing the `job_id` parameter.

```
job_id = 'YOUR_JOB_ID'
url = 'https://harvest.greenhouse.io/v1/candidates'
params = {
    'job_id': job_id,
    'per_page': 100,
    'page': 1
}

response = requests.get(url, auth=auth, params=params)
candidates = response.json()
```

#### 3. Extract Candidate Information

Iterate through the response to extract the first name, last name, and email of each candidate.

```
candidate_info = []

for candidate in candidates:
    first_name = candidate.get('first_name')
    last_name = candidate.get('last_name')
    email_addresses = candidate.get('email_addresses', [])
    email = email_addresses[0]['value'] if email_addresses else None
    
    candidate_info.append({
        'first_name': first_name,
        'last_name': last_name,
        'email': email
    })

print(candidate_info)
```

#### 4. Handle Pagination

If there are more candidates than can be returned in a single response, handle pagination by iterating through pages.

```
all_candidates = []
page = 1

while True:
    params['page'] = page
    response = requests.get(url, auth=auth, params=params)
    candidates = response.json()
    
    if not candidates:
        break
    
    for candidate in candidates:
        first_name = candidate.get('first_name')
        last_name = candidate.get('last_name')
        email_addresses = candidate.get('email_addresses', [])
        email = email_addresses[0]['value'] if email_addresses else None
        
        all_candidates.append({
            'first_name': first_name,
            'last_name': last_name,
            'email': email
        })
    
    page += 1

print(all_candidates)
```



Knit for Greenhouse API Integration
-----------------------------------

For quick and seamless access to [Greenhouse](/integration/greenhouse/) 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 [Greenhouse](/integration/greenhouse/) API.

Building a Greenhouse integration?

Knit gives you three ways to build it. Pick the one that fits.

- [Greenhouse on Unified API](https://getknit.dev/integration/greenhouse/)
    
    Your customers want Greenhouse and the other ATS tools they use. Build one integration and get normalised read and write data with real-time webhooks.
    
    [Try free](https://dashboard.getknit.dev/signup)
- [Greenhouse on Integrations Agent](https://getknit.dev/ipaas-connectors/greenhouse/)
    
    You need one specific Greenhouse workflow. Describe it in plain English and get production-ready code, not fixed iPaaS blocks.
    
    [Try free](https://agent.getknit.dev/)
- [Greenhouse MCP server](https://getknit.dev/mcp-servers/greenhouse-mcp-server/)
    
    Your AI agent needs to read and act in your customers' Greenhouse. Use a pre-built, hosted MCP server instead of writing integration code.
    
    [Try free](https://mcphub.getknit.dev/)

Knit's Unified API connects to 190+ apps across HRIS, ATS, CRM, accounting and more.

Knit never stores your end users' data and is SOC 2, GDPR and ISO 27001 compliant: [How Knit handles security](/security/) · [Security Center](https://compliance.getknit.dev/)

Not sure which fits? [Talk to a human](/book-demo/)

 

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

Coding chaos into innovation and building from zero to scale

 

 

 

 

 

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

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

### [Greenhouse API Directory](https://getknit.dev/blog/greenhouse-api-directory-0zj8dx/)

Learn about the common greenhouse API data models and API end points in this comprehensive greenhouse API directory

 November 16, 2024 · 10 min read 

 

   ![Get all open jobs from Greenhouse  API](https://storage.googleapis.com/knit-website-media/2026/08/blog-banner-red-scaled-640x400.png) [Tutorials](https://getknit.dev/blogs/tutorials/) 

### [Get all open jobs from Greenhouse API](https://getknit.dev/blog/get-all-open-jobs-from-greenhouse-api-nra7dz/)

Technical guide on Greenhouse API to Get all open jobs from Greenhouse API

 August 7, 2024 · 2 min read 

 

   ![Getting Started with Greenhouse API Integration: Developer’s Guide to Integration](https://storage.googleapis.com/knit-website-media/2026/08/blog-banner-yellow-scaled-640x400.png) [API Directory](https://getknit.dev/blogs/api-directory/) 

### [Getting Started with Greenhouse API Integration: Developer’s Guide to Integration](https://getknit.dev/blog/greenhouse-api/)

Looking to integrate with the Greenhouse API? Read this article before you start

 June 7, 2023 · 10 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)
