Add extract candidate functionality. Read API_KEY from env.
Move API read logic to library.