@iocium/urlscan - v0.0.0
    Preparing search index...

    Class UrlscanClient

    A client for interacting with the urlscan.io API. This class provides methods to scan URLs, retrieve scan results, and search for previously scanned URLs.

    Index

    Constructors

    Methods

    Constructors

    • Initializes a new instance of the UrlscanClient.

      Parameters

      • apiKey: string

        The API key required for authentication with the urlscan.io API.

      Returns UrlscanClient

      Error if the API key is not provided or is an empty string.

    Methods

    • Retrieves the results of a scan by its ID.

      Parameters

      • id: string

        The unique identifier of the scan.

      Returns Promise<void | ResultResponse>

      A promise that resolves to the result response or void if an error occurs.

    • Scans a given URL and returns the scan information

      Parameters

      • url: string

        The URL to be scanned.

      • Optionaloptions: Omit<ScanPayload, "url">

        Optional parameters for the scan request (excluding the URL).

      Returns Promise<void | ScanResultResponse>

      A promise that resolves to the scan result response or void if an error occurs.

      • ScanPayload
      • ScanResultResponse
    • Searches for scans using a specified term.

      Parameters

      • term: string

        The search term to look for in previous scans.

      • Optionaloptions: SearchOptions

        Optional parameters for the search query.

      Returns Promise<any>

      A promise that resolves to the search results or void if an error occurs.

      Error if the search term is not provided.