Skip to main content

Domain Intel | Python SDK

The Domain Intel service allows you to retrieve intelligence about known domain names, giving you insight into the reputation of a domain.

Initializes a new Pangea service client.

DomainIntel(token, config, logger_name)

str

Pangea API token.

PangeaConfig | None

Configuration.

str

Logger name.

Download file

DomainIntel.download_file(url, filename)

Download a file from the specified URL and save it with the given filename.

str

URL of the file to download

str | None

Name to save the downloaded file as. If not provided, the filename will be determined from the Content-Disposition header or the URL.

Poll result

DomainIntel.poll_result(exception)

Returns request's result that has been accepted by the server

Optional[AcceptedRequestException]

Exception that was previously raised by the SDK on a call that is being processed.

PangeaResponse

response = service.poll_result(exception)

Reputation

DomainIntel.reputation(domain, provider, verbose, raw)

Retrieve reputation for a domain from a provider, including an optional detailed report.

str

The domain to be looked up

str

Use reputation data from these providers: "domaintools" or "crowdstrike"

bool

Echo the API parameters in the response

bool

Include raw data from this provider

A PangeaResponse where the sanctioned source(s) are in the response.result field. Available response fields can be found in our API documentation.

response = domain_intel.reputation(
    domain="737updatesboeing.com",
    provider="domaintools",
)

Reputation V2

DomainIntel.reputation_bulk(domains, provider, verbose, raw)

Retrieve reputation for a domain from a provider, including an optional detailed report.

List[str]

The domain list to be looked up

str

Use reputation data from these providers: "domaintools" or "crowdstrike"

bool

Echo the API parameters in the response

bool

Include raw data from this provider

A PangeaResponse where the sanctioned source(s) are in the response.result field. Available response fields can be found in our API documentation.

response = domain_intel.reputation_bulk(
    domains=["737updatesboeing.com"],
    provider="domaintools",
)

WhoIs

DomainIntel.who_is(domain, provider, verbose, raw)

Retrieve who is for a domain from a provider, including an optional detailed report.

str

The domain to query.

str

Use whois data from this provider "whoisxml"

bool

Echo the API parameters in the response

bool

Include raw data from this provider

A PangeaResponse where the sanctioned source(s) are in the response.result field. Available response fields can be found in our API documentation.

response = domain_intel.who_is(
    domain="google.com",
    provider="whoisxml",
)