Skip to content

Instantly share code, notes, and snippets.

@itsderek23
Created June 5, 2019 19:55
Show Gist options
  • Save itsderek23/c04ae53e5a8561e578121ceaeae4bf13 to your computer and use it in GitHub Desktop.
Save itsderek23/c04ae53e5a8561e578121ceaeae4bf13 to your computer and use it in GitHub Desktop.
Export all Hubspot contacts with PetalData
import petaldata
# https://petaldata.app/datasets/hubspot/#auth
petaldata.datasets.hubspot.api_key = "[YOUR HUBSPOT API KEY]"
contacts = petaldata.datasets.hubspot.Contacts()
# Will download ALL hubspot contacts.
# See download options at https://petaldata.app/datasets/hubspot/#contacts-download.
contacts.download()
contacts.save() # Save locally so we don't need to download everything again.
df = contacts.df # Access downloaded contacts via a Pandas Dataframe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment