A preliminary 3.1 magnitude earthquake struck near San Jose Thursday morning, according to the United States Geological Survey.