Skip to main content
POST
Asset connections

Overview

Asset Connections answers two questions about one asset: what led to it, and where it leads. ChainPatrol records a link whenever one asset names another in a scan: an ad’s landing page, a post’s URL, a redirect, a page’s outbound links, a profile’s claimed website, a wallet a page asks victims to pay. This endpoint follows those links out from the asset you name, a few hops on each side, and returns two graphs:
  • upstream - what leads to the asset: the ads and posts that link to it, the pages and accounts that published them, the profiles that claim it.
  • downstream - where the asset leads: what it redirects to, links to, loads, submits forms to, claims as its own or asks to be paid at.
Each graph is a list of assets and a list of links between them. A link reads as a sentence, fromAssetId → type → toAssetId: PUBLISHED, LINKS_TO, REDIRECTS_TO, CLAIMS, REPLIES_TO, REPOSTS, MENTIONS, DEPENDS_ON, MEMBER_OF, LOADS, SUBMITS_TO or USES_WALLET. Assets carry the same id, type, content and status that Asset Search returns.
Asset Connections is being rolled out one organization at a time. An organization API key that is not part of the rollout receives 403 with the message “Asset connections are not available for this organization”. Contact ChainPatrol to ask for access.

Quick Start

Authentication

Include your organization API key in the X-API-KEY header:

Example Request

Name the asset by its content (a URL, domain, address, social profile, …) or by its ChainPatrol assetId — exactly one of the two. depth and limit are optional.

Request Body

Response

A phishing site promoted by a Meta ad, redirecting to a wallet drainer that links to the brand’s real site:

Top level

Each asset in a graph

Links are observed relationships read from ChainPatrol’s scans. An asset scanned before links were recorded, or never scanned, has none. Links read from a scan of another organization’s own asset (its allowlisted domain, account or app) are left out, the same way Asset Search and Get Scan Result leave out that organization’s scans.

Walking further

A response is bounded: depth hops, limit links of each type per asset, and at most 25 assets expanded per hop. Two fields say where there is more. An asset with expanded: false and no stop sat past the bounds; an asset with hasMoreLinks: true had more links of the types in truncatedLinkTypes than limit allowed. In both cases, call the endpoint again with that asset’s id as assetId to continue from it.

Errors

Authorizations

X-API-KEY
string
header
required

Your API key. This is required by most endpoints to access our API programatically. Reach out to us at support@chainpatrol.io to get an API key for your use.

Body

application/json

Asset connections request body

What led to an asset and where it leads: the links into it (who published, linked to, redirected to or claimed it) and out of it, followed depth hops on each side. Links are observed relationships read from scans, so an asset scanned before links were recorded has none.

assetId
integer

ID of the asset to start from, as returned by /asset/search.

Required range: x > 0
content
string

Content of the asset to start from (a URL, domain, social handle, app listing or wallet address), parsed the way /asset/search parses it. Pass either assetId or content.

Minimum string length: 1
depth
integer
default:2

How many hops to follow on each side (1 to 3, default 2). One hop is the assets directly linked to the asset; two also follows their links.

Required range: 1 <= x <= 3
limit
integer
default:10

How many links of each type to read per asset on each side (1 to 100, default 10). Per type, so one redirect still shows behind fifty outbound links. truncatedLinkTypes on an asset says which types had more.

Required range: 1 <= x <= 100

Response

Successful response

Asset connections response body

asset
object
required

The asset the connections were read from

upstream
object
required

What leads to the asset: the assets that published, linked to, redirected to or claimed it, and what led to those.

downstream
object
required

Where the asset leads: what it links to, redirects to or claims, and where those lead.