Skip to main content

IP Intel | Python SDK

The IP Intel service allows you to retrieve security information about known IP addresses that have been collected across the internet for several decades, giving you insight into the reputation of an IP.

Initializes a new Pangea service client.

IpIntel(token, config, logger_name)

required parameters

str

Pangea API token.

optional parameters

PangeaConfig | None

Configuration.

str

Logger name.

download-file

IpIntel.download_file()

Geolocate

IpIntel.geolocate(ip, provider, verbose, raw)

Retrieve location information associated with an IP address.

required parameters

str

IP address to be geolocated

optional parameters

str

Use geolocation data from this provider ("digitalelement"). Default provider defined by the configuration.

bool

Echo the API parameters in the response

bool

Include raw data from this provider

Response Object

A PangeaResponse where the IP information is in the response.result field. Available response fields can be found in our API documentation

response = ip_intel.geolocate(
    ip="93.231.182.110",
    provider="digitalelement",
)

Geolocate V2

IpIntel.geolocate_bulk(ips, provider, verbose, raw)

Retrieve location information associated with an IP address.

required parameters

List[str]

List of IP addresses to be geolocated

optional parameters

str

Use geolocation data from this provider ("digitalelement"). Default provider defined by the configuration.

bool

Echo the API parameters in the response

bool

Include raw data from this provider

Response Object

A PangeaResponse where the IP information is in the response.result field. Available response fields can be found in our API documentation

response = ip_intel.geolocate_bulk(
    ips=["93.231.182.110"],
    provider="digitalelement",
)

Domain

IpIntel.get_domain(ip, provider, verbose, raw)

Retrieve the domain name associated with an IP address.

required parameters

str

The IP to be looked up

optional parameters

str

Use geolocation data from this provider ("digitalelement"). Default provider defined by the configuration.

bool

Echo the API parameters in the response

bool

Include raw data from this provider

Response Object

A PangeaResponse where the IP information is in the response.result field. Available response fields can be found in our API documentation

response = ip_intel.get_domain(
    ip="93.231.182.110",
    provider="digitalelement",
)

Domain V2

IpIntel.get_domain_bulk(ips, provider, verbose, raw)

Retrieve the domain names associated with a list of IP addresses.

required parameters

List[str]

List of IPs to be looked up

optional parameters

str

Use geolocation data from this provider ("digitalelement"). Default provider defined by the configuration.

bool

Echo the API parameters in the response

bool

Include raw data from this provider

Response Object

A PangeaResponse where the IP information is in the response.result field. Available response fields can be found in our API documentation

response = ip_intel.get_domain_bulk(
    ips=["93.231.182.110"],
    provider="digitalelement",
)

Proxy

IpIntel.is_proxy(ip, provider, verbose, raw)

Determine if an IP address originates from a proxy.

required parameters

str

The IP to be looked up

optional parameters

str

Use geolocation data from this provider ("digitalelement"). Default provider defined by the configuration.

bool

Echo the API parameters in the response

bool

Include raw data from this provider

Response Object

A PangeaResponse where the IP information is in the response.result field. Available response fields can be found in our API documentation

response = ip_intel.is_proxy(
    ip="34.201.32.172",
    provider="digitalelement",
)

Proxy V2

IpIntel.is_proxy_bulk(ips, provider, verbose, raw)

Determine if an IP address originates from a proxy.

required parameters

List[str]

The IPs list to be looked up

optional parameters

str

Use geolocation data from this provider ("digitalelement"). Default provider defined by the configuration.

bool

Echo the API parameters in the response

bool

Include raw data from this provider

Response Object

A PangeaResponse where the IP information is in the response.result field. Available response fields can be found in our API documentation

response = ip_intel.is_proxy_bulk(
    ips=["34.201.32.172"],
    provider="digitalelement",
)

VPN

IpIntel.is_vpn(ip, provider, verbose, raw)

Determine if an IP address originates from a VPN.

required parameters

str

The IP to be looked up

optional parameters

str

Use geolocation data from this provider ("digitalelement"). Default provider defined by the configuration.

bool

Echo the API parameters in the response

bool

Include raw data from this provider

Response Object

A PangeaResponse where the IP information is in the response.result field. Available response fields can be found in our API documentation

response = ip_intel.is_vpn(
    ip="93.231.182.110",
    provider="digitalelement",
)

VPN V2

IpIntel.is_vpn_bulk(ips, provider, verbose, raw)

Determine if an IP address originates from a VPN.

required parameters

List[str]

The IPs list to be looked up

optional parameters

str

Use geolocation data from this provider ("digitalelement"). Default provider defined by the configuration.

bool

Echo the API parameters in the response

bool

Include raw data from this provider

Response Object

A PangeaResponse where the IP information is in the response.result field. Available response fields can be found in our API documentation

response = ip_intel.is_vpn_bulk(
    ip="93.231.182.110",
    provider="digitalelement",
)

Poll result

IpIntel.poll_result(exception)

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

optional parameters

Optional[AcceptedRequestException]

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

Response Object

PangeaResponse

response = service.poll_result(exception)

Reputation

IpIntel.reputation(ip, verbose, raw, provider)

Retrieve a reputation score for an IP address from a provider, including an optional detailed report.

required parameters

str

The IP to be looked up

optional parameters

bool

Echo the API parameters in the response

bool

Include raw data from this provider

str

Use reputation data from this provider: "crowdstrike"

Response Object

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

response = ip_intel.reputation(
    ip="190.28.74.251",
    provider="crowdstrike",
)

Reputation V2

IpIntel.reputation_bulk(ips, verbose, raw, provider)

Retrieve reputation scores for IP addresses from a provider, including an optional detailed report.

required parameters

List[str]

The IP list to be looked up

optional parameters

bool

Echo the API parameters in the response

bool

Include raw data from this provider

str

Use reputation data from this provider: "crowdstrike"

Response Object

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

response = ip_intel.reputation_bulk(
    ips=["190.28.74.251"],
    provider="crowdstrike",
)