@animalchin45
Posted
Yes you can search by domain. I made this work by first validating that the search term is a valid ip address or not. If the term is validated as an IP address then the request to ipify will be by IP address, else the request is for a domain. If you send your request with the IP value as null then you can search by domain name.
if (type) {
const response = await ipify.get('/country,city', {
params: {
apiKey: KEY,
ipAddress: term,
},
})
return response.data
} else {
const response = await ipify.get('/country,city', {
params: {
apiKey: KEY,
ipAddress: null,
domain: term,
},
})
return response.data
}
}```
@zazamirotadze
Posted
I have seen your solution. Yes it can search a famous domain like google.com. But It can not find many lesser known domains. I have also seen other peoples solutions but the results are the same.