How to use Affinity's API to download a list
If you would like to download all the data within a specific list using Affinity's API, here are the API calls you need to make.
Note: Crunchbase data is not accessible via the Affinity API (see Crunchbase data in Affinity to learn more).
Steps to download a list using Affinity's API
- Use this endpoint to find the list id number.
curl "https://api.affinity.co/lists" -u :<API-KEY>
- 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>
- Optional: Use this call to find the names of the global columns if needed.
curl "https://api.affinity.co/organizations/fields" -u :<API-KEY>
- 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>
- 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>
- 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>