Search company using domain in zapier

companies

#1

I am doing a integration in zapier and would like to search for company in hubspot using the email domain. I know zapier doesn't allow this directy, so I was trying to do python code using the api documentation. But ended up getting an error in the code.

d = input_data['domain']

url = 'https://api.hubapi.com/companies/v2/domains/%d/companies?hapikey=xxxx'

data = {
"limit": 2,
"requestOptions": {
"properties": [
"domain",
"createdate",
"name",
"hs_lastmodifieddate"
]
},
"offset": {
"isPrimary": true,
"companyId": 0
}
}

response = requests.post(url,data)
return response

Please have a look and any help in this regard would be highly appreciatable.

Regards,
Mahi


#2

Hi @Nani_P,

Can you give me the full error you're getting?