Skip to content

Instantly share code, notes, and snippets.

@garbados
Last active May 30, 2017 01:28
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save garbados/4514450 to your computer and use it in GitHub Desktop.
A Python script providing access to FullContact's API. Requires Requests, and a FullContact API key. Run with `python -i` to make it a CLI. Or, check out `https://github.com/garbados/fullcontact.py` for a more robust interface.
import requests
import json
api_key = 'your_api_key'
url = "https://api.fullcontact.com/v2/person.json"
def whois(**kwargs):
if 'apiKey' not in kwargs:
kwargs['apiKey'] = api_key
r = requests.get(url, params=kwargs)
return json.loads(r.text)
@joestump
Copy link

joestump commented Feb 4, 2015

Not noted here, but this code assumes you're calling whois with email as a kwarg:

# This is how you'd call it to get Joe Example's person record.
whois(email='joe@example.com')

You should be able to send any API argument as a kwarg.

@amcdc
Copy link

amcdc commented May 30, 2017

Url in description https://github.com/garbados/fullcontact.py doesn't go anywhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment