A Beginners Guidebook To Using APILayers APIs With Python
A Beginners Guidebook To Using APILayers APIs With Python
com/marketplace/gender-api
Here is a Python code example for Gender API followed by
an explanation of what the code does:
import requests
impon json
url = "https://api.apitayer.com/gender/gender/by-email-address"
# Set headers
headers - {
"apikey": YOUR API KEY·#
"Content• Type·: "application/json"
!n ! 11 t.a»o1tt r �;i••t.•
. ••t :•vn
The result is a JSON object returned by the
Gender API in response to a request for the email
# r.�r,n�,
- fl•
f
�1rn. Jll•rl•
lfifrrnff
ll � address sandra.miller14@gmail.com.
, 0, tt � J �� �
u•1lobd • )•7n.o v•lC
The API determined that the associated first name
•� t• I c:a.&11
, I.·"·�·. 1.t I
I "
-�-'"....- .
• , a.It • \IJ
r•,.sx·'I•• ..t.li,11.ulf�i:�::t•
wwuJr. The input data provided to the API included the
email address and the country code ''US''.
•�t•, l
•u-.u1•, •••J.11••• l��l.af�.-1.,� •
The ''details'' field in the result includes additional
•
,- ICSa U '-•• C' •.
'N &an"I
0
lJ-• •
•
information such as the number of credits used,
..
• �l• •r �JJOtl.
. the duration of the API call, and the number of
.,,,.. , ·""-.,,_ ,,,,,...s·, .• �,-·
••&1Tiy , Ill \,