btcintel

Lookup by script hash

GET /v1/scripthash/{hash}
who may call it
Anyone
no key and no session
what it costs
1 request of the quota
tiers and keys
how fresh
Cached for 5 seconds
and up to 30 seconds more while it is read again · every answer carries the index's height and the node's
MCP tool
None
On this page

The chain facts of one output script, found by its hash, in the address summary's shape, with the claims on that script: annotations, the current claims whose subject is the script (kind script, keyed by this hash), and relations, about the entities they name, never the script. The claims on an address the script renders as are the address read's, so this read carries no keyed_by.

Parameters

NameWhereTypeRequiredWhat it does
hashpathstringrequiredThe script hash, 64 hex characters: the SHA-256 of an output script (scriptPubKey). Anything else is a 400.
includequerystringoptionalexpired to include expired and retracted claims in annotations (attributions and hop-0 stay current-only). Any other value is a 400 invalid_input, never ignored.

What it answers

The address summary's shape, with the claims on the script.

FieldTypeWhat it carries
addressstringThe address, as asked. On the script hash read, the address the index gives for the script: empty when it gives none.
typestringThe address's script type: p2pkh, p2sh, v0_p2wpkh, v0_p2wsh or v1_p2tr; unknown for another. Absent when on_chain is false, and on the script hash read when the chain index gives none.
script_hashstringThe SHA-256 of a scriptPubKey, hex. On the address read, of the address's standard script: the hash GET /v1/scripthash/{hash} takes, absent when on_chain is false. On the script hash read, the hash asked.
on_chainbooleanfalse when the index has no history (yet).
keyed_bystringIntel identity. Always address — annotations hang off the rendered string, not one script_hash.
scriptsarrayRows rendering as this address: on the chain index its own script alone; on Postgres, P2PK rows too.
scripts[].typestringThe script's type.
scripts[].script_hashstringThe SHA-256 of the script, hex.
scripts[].tx_countintegerThe transactions in blocks that pay the script or spend from it.
scripts[].funded_satintegerThe values of the outputs in blocks that pay the script, in sat.
scripts[].spent_satintegerThe values of those outputs that transactions in blocks have spent, in sat.
balance_satintegerWhat the address, or the script, holds in blocks: funded_sat minus spent_sat. Unconfirmed transactions are not in it. Absent when on_chain is false.
funded_satintegerThe values of the outputs in blocks that pay the address, or the script, in sat. Absent when on_chain is false.
spent_satintegerThe values of those outputs that transactions in blocks have spent, in sat. Absent when on_chain is false.
tx_countintegerThe transactions in blocks that pay the address, or the script, or spend from it. Absent when on_chain is false.
mempool_statsobjectThe address's unconfirmed side, as the chain index's mempool holds it: the transactions that pay it or spend from it, and their values. The address read carries it while on_chain is true on a deployment that reads vigia; the script hash read, and a deployment that reads its own index, leave it out.
first_heightintegerThe height of the oldest confirmed transaction. Absent when not computed: the chain index pages an address's history newest first, so the oldest is read only for an address with at most 1,000 confirmed transactions.
last_heightintegerThe height of the newest confirmed transaction; absent when the address has none.
annotationsarrayCurrent claims on the address, or on the script when read by hash; absent when not computed.
annotations[].sourceobjectThe source that states the claim: its id, name, kind and attribution text.
annotations[].fetchobjectThe fetch that first stated the claim's current content: the one content_sha256 covers.
annotations[].confidenceobjectThe claim's confidence: its class, and the level of that class.
annotations[].validityobjectWhen the claim holds, and whether it was retracted.
annotations[].claim_idstringThe claim's id, ann_<n>: the id GET /v1/claims/{claim_id} takes.
annotations[].kindstringAlways annotation: a claim on a subject.
annotations[].disputesobjectHow many of the claim's disputes are open and how many were resolved. Only the claim's own read (GET /v1/claims/{claim_id}) carries it, and only when the disputes could be counted; every other read leaves it out.
annotations[].versionintegerThe claim's version in force, counted from 1. Absent when no version of the claim is recorded, and content_sha256, citation and content with it.
annotations[].content_sha256stringThe SHA-256 of the version's canonical content (content), hex. The citation carries its first 16 characters.
annotations[].citationstringbtcintel:annotations:<id>@v<n> sha256:<16 hex>
annotations[].contentobjectThe canonical content object content_sha256 covers: the stored confidence id, times to the second, evidence as stored. Serialise it with RFC 8785 and SHA-256 the bytes to re-verify the claim. Present with version.
annotations[].subjectobjectThe subject the claim is on.
annotations[].labelstringThe claim's short label, as the import of its source or its approved proposal wrote it.
annotations[].categorystringDW-VA entity concept (entity:…).
annotations[].abusestringDW-VA abuse concept (abuse:…).
annotations[].conceptsarrayOther concepts of the vocabulary the claim states. Empty when it states none.
annotations[].entityobjectThe entity the claim names: its id, and its name and kind when the entity is known. Absent when the claim names none.
annotations[].subject_namestring or nullThe name the source gives the subject. Null when the source gives none. Outside the hashed content.
annotations[].subject_name_esstring or nullThat name in Spanish. Null when untranslated; never a copy of subject_name.
annotations[].rolestring or nullThe claim's role. Null when it names none.
annotations[].source_namestring or nullThe source's name, the same string as source.name, so hop0 and annotations share one shape.
annotations[].methodstringHow the claim was made: import for one read from the source's file, manual for an approved proposal, or another word an import names (tagpack, output_of_sweep).
annotations[].source_confidencestringWhat the source said, verbatim.
annotations[].first_reported_atstringWhen the source says the subject was first reported. Absent when it gives no date.
annotations[].evidencearrayWhat the source gives in support, as stored: entries such as a URL, a txid or an external id. Empty when it gives none.
annotations[].metadataobjectWhat the import kept of the source's record outside the hashed content, such as the record's key. Absent when there is nothing.
annotations[].created_atstringWhen btcintel first wrote the claim.
annotations[].updated_atstringWhen the claim's row last changed.
annotations[].last_seenobjectThe newest fetch whose file still states the claim. Never hashed: a restatement confirms the claim and leaves its version and citation as they are.
annotations[].statusstringThe claim's state. Only current rows are current claims; provisional ones (a source's first import or a large batch) are served only when asked for (include=provisional) and wait for a human's promotion; held and rejected rows are served to operators only. Outside the hashed content: a promotion changes the state, never the claim.
annotations[].status_reasonstringWhy a row is provisional, held or rejected.
annotations[].chain_checkobjectWhat the fact the source stated (an address spent in a block, an amount, a payment) looked like on the chain at import. It checks the stated fact, never the intent behind it. Absent when no check ran.
annotations[].campaignone ofThe campaign the claim is a member of. Null when it is not a member. A victim's role carries no abuse word. The same object as on hop0.
relationsarrayRelations of the entities the claims name; about entities, never the address or the script.
relations[].claim_idstringThe relation's id, rel_<n>: the id GET /v1/claims/{claim_id} takes.
relations[].kindstringAlways relation.
relations[].aboutstringAlways entity: a relation is about entities, never about a subject.
relations[].disputesobjectHow many of the relation's disputes are open and how many were resolved. Only the claim's own read (GET /v1/claims/{claim_id}) carries it, and only when the disputes could be counted; every other read leaves it out.
relations[].versionintegerThe relation's version in force, counted from 1. Absent when no version is recorded, and content_sha256 and citation with it.
relations[].content_sha256stringThe SHA-256 of the version's canonical content, hex. The citation carries its first 16 characters.
relations[].citationstringbtcintel:relations:<id>@v<n> sha256:<16 hex>
relations[].from_entityobjectThe entity the relation runs from: its id, name and kind.
relations[].to_entityobjectThe entity the relation runs to: its id, name and kind.
relations[].typestringrelation:… concept.
relations[].sourceobjectThe source that states the relation: its id and its name.
relations[].fetchobjectThe fetch of the source that states the relation: its id and sha256. Absent when the relation has no fetch.
relations[].confidenceobjectThe relation's confidence: its class, without its confidence: prefix, and the level of that class.
relations[].validityobjectWhen the relation holds: from, to and retracted_at, each null when not set.
relations[].evidencearrayWhat the source gives in support, as stored. Empty when it gives none.
schema AddressInfo
  • address string — The address, as asked. On the script hash read, the address the index gives for the script: empty when it gives none.
  • type string — The address's script type: p2pkh, p2sh, v0_p2wpkh, v0_p2wsh or v1_p2tr; unknown for another. Absent when on_chain is false, and on the script hash read when the chain index gives none.
  • script_hash string — The SHA-256 of a scriptPubKey, hex. On the address read, of the address's standard script: the hash GET /v1/scripthash/{hash} takes, absent when on_chain is false. On the script hash read, the hash asked.
  • on_chain boolean — false when the index has no history (yet).
  • keyed_by string — Intel identity. Always address — annotations hang off the rendered string, not one script_hash.
  • scripts array of object — Rows rendering as this address: on the chain index its own script alone; on Postgres, P2PK rows too.
    • type string — The script's type.
    • script_hash string — The SHA-256 of the script, hex.
    • tx_count integer — The transactions in blocks that pay the script or spend from it.
    • funded_sat integer — The values of the outputs in blocks that pay the script, in sat.
    • spent_sat integer — The values of those outputs that transactions in blocks have spent, in sat.
  • balance_sat integer — What the address, or the script, holds in blocks: funded_sat minus spent_sat. Unconfirmed transactions are not in it. Absent when on_chain is false.
  • funded_sat integer — The values of the outputs in blocks that pay the address, or the script, in sat. Absent when on_chain is false.
  • spent_sat integer — The values of those outputs that transactions in blocks have spent, in sat. Absent when on_chain is false.
  • tx_count integer — The transactions in blocks that pay the address, or the script, or spend from it. Absent when on_chain is false.
  • mempool_stats object — The address's unconfirmed side, as the chain index's mempool holds it: the transactions that pay it or spend from it, and their values. The address read carries it while on_chain is true on a deployment that reads vigia; the script hash read, and a deployment that reads its own index, leave it out.
    • tx_count integer required — The unconfirmed transactions that pay the address or spend from it.
    • funded_sat integer required — The values of their outputs that pay the address, in sat.
    • spent_sat integer required — The values of the address's outputs they spend, in sat.
  • first_height integer — The height of the oldest confirmed transaction. Absent when not computed: the chain index pages an address's history newest first, so the oldest is read only for an address with at most 1,000 confirmed transactions.
  • last_height integer — The height of the newest confirmed transaction; absent when the address has none.
  • annotations array of Claim — Current claims on the address, or on the script when read by hash; absent when not computed.
    • source object — The source that states the claim: its id, name, kind and attribution text.
      • id string — The source's id, as in GET /v1/sources.
      • name string — The source's name.
      • kind string — The source's kind: sanctions, crime-intel, osint-report, …
      • attribution string — The text to render with every claim of the source. Empty when it asks for none.
    • fetch object — The fetch that first stated the claim's current content: the one content_sha256 covers.
      • id integer — The fetch's id.
      • sha256 string — The SHA-256 of the file as fetched, hex. The file itself is not kept.
      • fetched_at string (date-time) — When the file was fetched.
      • url string — Where the file was downloaded from. Absent when the fetch records no address, as for a file pushed to the API.
    • confidence object — The claim's confidence: its class, and the level of that class.
      • class string — The confidence class, without its confidence: prefix: authority_data, service_data, web_crawl, …
      • level integer — The class's level, 0 to 100, as the confidence vocabulary sets it: the same for every claim of that class.
    • validity object — When the claim holds, and whether it was retracted.
      • from string (date-time) — The instant the claim holds from.
      • to string | null (date-time) — The instant it stops holding. Null when no end is set.
      • retracted_at string | null (date-time) — When the claim was retracted. Null when it was not.
      • retraction_reason string | null — Why it was retracted. Null when it was not.
    • claim_id string — The claim's id, ann_<n>: the id GET /v1/claims/{claim_id} takes.
    • kind string required — Always annotation: a claim on a subject. · one of "annotation"
    • disputes DisputeCounts — How many of the claim's disputes are open and how many were resolved. Only the claim's own read (GET /v1/claims/{claim_id}) carries it, and only when the disputes could be counted; every other read leaves it out.
      • open integer required — How many of the disputes are open.
      • resolved integer required — How many of them were resolved. A withdrawn dispute counts in neither.
    • version integer — The claim's version in force, counted from 1. Absent when no version of the claim is recorded, and content_sha256, citation and content with it.
    • content_sha256 string — The SHA-256 of the version's canonical content (content), hex. The citation carries its first 16 characters.
    • citation string — btcintel:annotations:<id>@v<n> sha256:<16 hex>
    • content object — The canonical content object content_sha256 covers: the stored confidence id, times to the second, evidence as stored. Serialise it with RFC 8785 and SHA-256 the bytes to re-verify the claim. Present with version.
    • subject Subject — The subject the claim is on.
      • kind string — What the key names, which also sets the key's form. · one of "address", "script", "tx", "block", "outpoint", "pool", "descriptor", "pubkey"
      • key string — Canonical key.
    • label string — The claim's short label, as the import of its source or its approved proposal wrote it.
    • category string — DW-VA entity concept (entity:…).
    • abuse string — DW-VA abuse concept (abuse:…).
    • concepts array of string — Other concepts of the vocabulary the claim states. Empty when it states none.
    • entity object — The entity the claim names: its id, and its name and kind when the entity is known. Absent when the claim names none.
      • id string — The entity's id: the id GET /v1/entities/{id} takes.
      • name string — The entity's name.
      • kind string — The entity's kind, an entity:… concept.
    • subject_name string | null required — The name the source gives the subject. Null when the source gives none. Outside the hashed content.
    • subject_name_es string | null required — That name in Spanish. Null when untranslated; never a copy of subject_name.
    • role string | null required — The claim's role. Null when it names none.
    • source_name string | null required — The source's name, the same string as source.name, so hop0 and annotations share one shape.
    • method string — How the claim was made: import for one read from the source's file, manual for an approved proposal, or another word an import names (tagpack, output_of_sweep).
    • source_confidence string — What the source said, verbatim.
    • first_reported_at string (date-time) — When the source says the subject was first reported. Absent when it gives no date.
    • evidence array of object — What the source gives in support, as stored: entries such as a URL, a txid or an external id. Empty when it gives none.
    • metadata object — What the import kept of the source's record outside the hashed content, such as the record's key. Absent when there is nothing.
    • created_at string (date-time) — When btcintel first wrote the claim.
    • updated_at string (date-time) — When the claim's row last changed.
    • last_seen object — The newest fetch whose file still states the claim. Never hashed: a restatement confirms the claim and leaves its version and citation as they are.
      • fetch_id integer required — The id of the newest fetch whose file still states the claim.
      • fetched_at string (date-time) required — When that fetch was made.
    • status string — The claim's state. Only current rows are current claims; provisional ones (a source's first import or a large batch) are served only when asked for (include=provisional) and wait for a human's promotion; held and rejected rows are served to operators only. Outside the hashed content: a promotion changes the state, never the claim. · one of "current", "provisional", "held", "rejected"
    • status_reason string — Why a row is provisional, held or rejected.
    • chain_check object — What the fact the source stated (an address spent in a block, an amount, a payment) looked like on the chain at import. It checks the stated fact, never the intent behind it. Absent when no check ran.
      • result string — verified: the chain shows the stated fact. mismatch: it shows otherwise. not_checkable: the fact could not be looked up. · one of "verified", "mismatch", "not_checkable"
      • checked_at string (date-time) — When the check ran. Absent when its time was not recorded.
    • campaign one of required — The campaign the claim is a member of. Null when it is not a member. A victim's role carries no abuse word. The same object as on hop0.
      • CampaignBrief — A campaign a claim belongs to, the object address annotations already carried (id, slug, title, role) plus the display fields. title_es is null when the curator has not written a Spanish title; it is never a copy of title. short_title is at most 30 characters and null when unwritten. started_at is the event's occurred_at.
        • id string required — evt_<n>.
        • slug string | null required — The campaign's public slug. Null until one is assigned.
        • title string | null required — The campaign's title. Null when it has none.
        • title_es string | null required — Spanish title. Null when untranslated; never a copy of title.
        • short_title string | null required — A short title of at most 30 characters. Null when the curator has not written one; the web then truncates title.
        • started_at string | null (date) required — The event's occurred_at, day precision.
        • role string | null required — The member's role: victim, sweep, vault or cash_out. Null when the row names none.
      • null
  • relations array of Relation — Relations of the entities the claims name; about entities, never the address or the script.
    • claim_id string — The relation's id, rel_<n>: the id GET /v1/claims/{claim_id} takes.
    • kind string required — Always relation. · one of "relation"
    • about string — Always entity: a relation is about entities, never about a subject. · one of "entity"
    • disputes DisputeCounts — How many of the relation's disputes are open and how many were resolved. Only the claim's own read (GET /v1/claims/{claim_id}) carries it, and only when the disputes could be counted; every other read leaves it out.
      • open integer required — How many of the disputes are open.
      • resolved integer required — How many of them were resolved. A withdrawn dispute counts in neither.
    • version integer — The relation's version in force, counted from 1. Absent when no version is recorded, and content_sha256 and citation with it.
    • content_sha256 string — The SHA-256 of the version's canonical content, hex. The citation carries its first 16 characters.
    • citation string — btcintel:relations:<id>@v<n> sha256:<16 hex>
    • from_entity object — The entity the relation runs from: its id, name and kind.
      • id string — The entity's id: the id GET /v1/entities/{id} takes.
      • name string — The entity's name.
      • kind string — entity:… concept.
    • to_entity object — The entity the relation runs to: its id, name and kind.
      • id string — The entity's id: the id GET /v1/entities/{id} takes.
      • name string — The entity's name.
      • kind string — entity:… concept.
    • type string — relation:… concept.
    • source object — The source that states the relation: its id and its name.
    • fetch object — The fetch of the source that states the relation: its id and sha256. Absent when the relation has no fetch.
    • confidence object — The relation's confidence: its class, without its confidence: prefix, and the level of that class.
    • validity object — When the relation holds: from, to and retracted_at, each null when not set.
    • evidence array of object — What the source gives in support, as stored. Empty when it gives none.

Absent and empty

The caseIn the answer
A script hash the index has never seen.200 with on_chain: false, never a 404.
No claim of those asked for names the script.annotations and relations are empty lists: the claims were read and none was found.
A deployment with no intel store, or a read of the claims that fails.No annotations and no relations, never an empty list: the claims were not read.

Errors

StatusCodeWhen
400invalid_inputinvalid_input: the request is malformed: bad hex, an address of another network, a bad vout, or a value out of its range; or an include other than expired, the one thing a subject's page adds. The message says which.

Each comes in the one error envelope, and none is cached: an error carries Cache-Control: no-store.

Example

curl and jq, in any shell.

curl -s 'https://api.btcintel.io/v1/scripthash/<script hash, 64 hex>' | jq '{address, type, script_hash}'