Skip to content

Use the Google People's (Contacts) API to fetch email addresses from a large contacts directory and from personal contacts & write them to txt files.

Notifications You must be signed in to change notification settings

aryanranderiya/GoogleContactsEmailScraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

If you find this Repository helpful or interesting, please consider giving it a star! ⭐️


Google Contacts Email Scraper

  • Use the Google People's (Contacts) API to fetch email addresses from a large contacts directory and from personal contacts & write them to txt files.
  • Use case: Scrape all emails from a University Contacts directory and export them to a txt file.
  • Google Contacts does not have a native Bulk Contact Export feature that exports all contacts at once. This provides a way to do so.
  • You can customise this script to store names, phone numbers and more. Read more.

Screenshots

2024-03-30_22-39 2024-03-30_22-41

Installation

  1. Clone the Repository

    git clone https://github.com/aryanranderiya/GoogleContactsEmailScraper.git
    
  2. Navigate to the project directory:

    cd GoogleContactsEmailScraper
    
  3. Install Dependencies

    pip install -r requirements.txt
    
  4. Run the Script

    python app.py
    

Usage

Make sure to setup a Project using Google Cloud Console.
More Information Here: https://developers.google.com/people/v1/getting-started

  • The Script should work fine out of the box if a project is setup correctly using OAuth 2.0 with the following scopes: contacts.readonly & directory.readonly in Google Cloud Console

  • After running the script using python app.py it will redirect to complete the authentication procses, after which a token.json file be created in the same directory.

  • After scraping all the emails, the txt files containing the emails will be stored in the same directory in contacts_emails.txt and directory_emails_alphabetic.txt directory_emails_domain.txt if your account is under an organization (such as a University domain: [email protected])

Happy Coding!

Thank you for viewing this Repo! A 🌟 would be appreciated if this project was helpful!

Get in touch

About

Use the Google People's (Contacts) API to fetch email addresses from a large contacts directory and from personal contacts & write them to txt files.

Topics

Resources

Stars

Watchers

Forks

Languages