The client library for Brand Alert API in Python language.
The minimum Python version is 3.6.
pip install brand-alert
Full API documentation available here
from brandalert import *
client = Client('Your API key')
# Get the number of domains.
result = client.preview(['google'])
print(result.domains_count)
# Get raw API response
raw_result = client.raw_data(
['google'],
response_format=Client.XML_FORMAT,
mode=Client.PREVIEW_MODE)
# Get list of recently registered/dropped domains (up to 10,000)
result = client.purchase(['google'])
Extra request parameters
today = datetime.date.today()
delta = datetime.timedelta(days=10)
result = client.purchase(
['google'],
exclude_terms=['blog'],
since_date=today - delta,
with_typos=True,
punycode=False)
raw_result = client.raw_data(
['google'],
exclude_terms=['blog'],
since_date=today - delta,
with_typos=True,
punycode=False,
mode=Client.PURCHASE_MODE,
response_format=Client.JSON_FORMAT)