@ipregistry/client
    Preparing search index...

    Class IpregistryClient

    The main client for interacting with the Ipregistry API. This class provides methods for looking up IP information, ASN details, parsing user agents, and more.

    Index

    Constructors

    Methods

    • Performs a lookup for the IP information of the originating request's IP address. Useful for obtaining the caller's own IP information. Similar to originLookupAsn, this method does not support caching, and each invocation results in a remote API request to Ipregistry. This ensures that the most current information is retrieved but also means that each call will consume credits.

      Parameters

      • Optionaloptions: LookupOptions

        Optional. Additional options for the lookup operation.

      Returns Promise<ApiResponse<RequesterIpInfo>>

      A Promise resolving to an ApiResponse containing the RequesterIpInfo.

    • Parameters

      Returns Promise<ApiResponse<RequesterIpInfo>>

      Pass a LookupOptions object instead, e.g. client.originLookupIp({ fields: 'location' }).

    • Parses user agent strings and returns detailed information about them.

      Parameters

      • userAgents: string[]

        An array of user agent strings to parse.

      • Optionaloptions: LookupOptions

      Returns Promise<ApiResponse<UserAgent[]>>

      A Promise resolving to an ApiResponse containing an array of UserAgent information.

    • Parameters

      • ...userAgents: string[]

      Returns Promise<ApiResponse<UserAgent[]>>

      Pass the user agents as an array instead, e.g. client.parseUserAgents([userAgent1, userAgent2]).