> ## Documentation Index
> Fetch the complete documentation index at: https://support.affinity.co/llms.txt
> Use this file to discover all available pages before exploring further.

# How To Use Affinity's API To Retrieve List Data

> Help center reference

<Note>**How-to** — task-oriented recipe.</Note>

If you would like to retrieve data within a specific list using Affinity's API, please review the Important Callouts below, then check out one of the options below.

## Important Callouts

* If you're currently trialing Affinity, you will **not** be able to access the Affinity API until you purchase one of the following subscription tiers: **Scale**, **Advanced**, or **Enterprise** (see [Getting started with the Affinity API + FAQs](/s/article/Getting-started-with-the-Affinity-API-faqs)).
* [Crunchbase](/s/article/Crunchbase-data-in-Affinity) and [PitchBook](/s/article/How-to-integrate-Affinity-with-Pitchbook) data are **not** accessible via the Affinity API.

## Retrieving list data using API V1

See the [Lists section](https://api-docs.affinity.co/#lists) within our API V1 documentation.

1. Use this endpoint to find the list id number.

   ```
   curl "https://api.affinity.co/lists" -u :<API-KEY>
   ```

2. Input the list "id" number to find the name of the columns on this specific list.

   ```
   curl "https://api.affinity.co/lists/<List ID>" -u :<API-KEY>
   ```

3. Optional: Use this call to find the names of the global columns if needed.

   ```
   curl "https://api.affinity.co/organizations/fields" -u :<API-KEY>
   ```

4. Then use this call to get a list of all the list entries on a specific list.

   ```
   curl "https://api.affinity.co/lists/<List ID>/list-entries" -u :<API-KEY>
   ```

5. Step 4 will give you "id" numbers. You can now get each list entry's field value (row). You will need to do this for each entry.

   ```
   curl "https://api.affinity.co/field-values?list_entry_id=<List entry ID>" -u :<API-KEY>
   ```

6. Step 4 will also give you "entity\_id" numbers. You can use this to get the global column data. You will need to do this for each entry.

   ```
   curl "https://api.affinity.co/field-values?organization_id=<Entity ID>" -u :<API-KEY>
   ```

## Retrieving list data using API V2

* Using Affinity's API V2, you can download an entire list with fewer calls than API V1.
* If you'd like more specific data from a saved view, you can download just the saved view data as well.
* See the [Lists section](https://developer.affinity.co/docs/v2/#tag/lists) within our API V2 documentation.
