Searching publicly available information is generally legal with proper consent. Always get permission or authority before accessing private accounts.