Subject Request API


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.


The endpoint for the Subject Request API is

import requests
import csv

# Set your API key

# Set headers
   'x-api-key': API_KEY

# Call the Subject Request API with the valid auth header
response = requests.get(
    '', 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()])

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

Response Format

The response will be a string in the format

<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.