Subject Request API

Overview

Consumers have the right to make Subject Data Requests (SDR) such as opt out to any Controller selling data about consumers who are residents of California, Virginia, Colorado, Connecticut, Utah or the European Union.

Controllers are also required to promptly make this information available to those they sell or share data with. To comply, PDL’s Subject Request API allows customers to get a list of opted out IDs.

As regulations change, PDL will update this API with additional information from subject requests.

Example

The endpoint for the Subject Request API is https://api.peopledatalabs.com/v5/person/subjectrequest.

import requests
import csv

# Set your API key
API_KEY = 'YOUR API KEY'

# Set headers
HEADERS = {
   'x-api-key': API_KEY
}

# Call the Subject Request API with the valid auth header
response = requests.get(
    'https://api.peopledatalabs.com/v5/person/subjectrequest', headers=HEADERS)

# Write the retrieved PDL IDs to "opt-out.csv"
if response.status_code == 200:
    print('Successfully retrieved opt-out IDs, writing to file...')
    with open('opt-out.csv', 'w', newline='') as fp:
        a = csv.writer(fp,)
        a.writerows([[r] for r in response.text.strip().split()])

else:
    print(f'ERROR - {response.status_code}\n{response.text}')

Response Format

The response will be a string in the format

pdl_id
<pdl id for a person who has opted-out>

Access & Billing

The endpoint is a free add-on that all customers with an API key can use, including self-serve.