Skip to main content

/v2/contracts/source/{contract_address}/{contract_name} REST API Endpoint

Retrieves the Clarity source code of a given contract, along with the block height it was published in, and the MARF proof for the data.

Updated on
Jun 13, 2025

Path Parameters

contract_address
string
REQUIRED

Stacks address.

contract_name
string
REQUIRED

Contract name.

Query Parameters

proof
integer

Returns object without the proof field if set to 0.

tip
string

The Stacks chain tip to query from.

Returns

object

GET request to get contract source

source
string

The source code of the requested contract

publish_height
integer

The block height at which the contract was published or deployed

proof
string

The proof of the contract's source code integrity or authenticity

Request
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free