---
title: "Get contract source"
method: GET
path: "/v2/contracts/source/{contract_address}/{contract_name}"
tags: ["Smart Contracts"]
---

# Get contract source

`GET /v2/contracts/source/{contract_address}/{contract_name}`

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

## Response `200`

Success

- GetContractSourceSchemaJson — unresolved $ref

## Changes

- **2021-11-17** `f936683f3e46` — 1 info
  - added the new optional `query` request parameter `use_latest_tip` to all path's operations
- **2021-07-23** `df3a58543ff9` — 1 info
  - added the new optional `query` request parameter `use_latest_tip` to all path's operations

[Change history](https://skmtc.dev/hirosystems/apis/stacks-2-0-rpc-api/changes/v2/contracts/source/:contract_address/:contract_name/get.md)

---

[API](https://skmtc.dev/hirosystems/apis/stacks-2-0-rpc-api.md) · [All operations](https://skmtc.dev/hirosystems/apis/stacks-2-0-rpc-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hirosystems/stacks-2-0-rpc-api/revisions/7a7617c2d7cc/schema)
