---
title: requestAirdrop
description: >-
  Requests a faucet transaction that transfers lamports to the supplied Pubkey.
url: /docs/rpc/http/requestairdrop
type: reference
hideTableOfContents: true
---

Requests a faucet transaction that transfers lamports to the supplied Pubkey.

<Callout type="info" title="Source">
  [`request_airdrop`](https://github.com/anza-xyz/agave/blob/v3.1.8/rpc/src/rpc.rs#L3734)
</Callout>

<APIMethod>

```jsonc !!request curl
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "requestAirdrop",
  "params": [
    // !hover pubkey
    "83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri",
    // !hover lamports
    1000000000,
    // !hover(1:3) config
    {
      // !hover commitment
      "commitment": "finalized"
    }
  ]
}
```

```ts !!request title="Kit"
import { address, createSolanaRpc, lamports } from "@solana/kit";
import { LAMPORTS_PER_SOL } from "@solana/web3.js";

const rpc_url = "https://api.devnet.solana.com";
const rpc = createSolanaRpc(rpc_url);

// !hover pubkey
let receiver = address("4kg8oh3jdNtn7j2wcS7TrUua31AgbLzDVkBZgTAe44aF");

// !hover lamports
let airdropAmt = lamports(BigInt(1 * LAMPORTS_PER_SOL));

let signature = await rpc.requestAirdrop(receiver, airdropAmt).send();

console.log(signature);
```

```ts !!request title="web3.js"
import {
  Connection,
  LAMPORTS_PER_SOL,
  PublicKey,
  clusterApiUrl
} from "@solana/web3.js";

const connection = new Connection(clusterApiUrl("devnet"), "confirmed");

// !hover pubkey
let receiver = new PublicKey("4kg8oh3jdNtn7j2wcS7TrUua31AgbLzDVkBZgTAe44aF");

// !hover lamports
let airdropAmt = 1 * LAMPORTS_PER_SOL;

let sig = await connection.requestAirdrop(receiver, airdropAmt);

console.log(sig);
```

```rs !!request title="Rust"
use anyhow::Result;
use solana_client::nonblocking::rpc_client::RpcClient;
use solana_commitment_config::CommitmentConfig;
use solana_sdk::{native_token::LAMPORTS_PER_SOL, pubkey};

#[tokio::main]
async fn main() -> Result<()> {
    let client = RpcClient::new_with_commitment(
        String::from("https://api.devnet.solana.com"),
        CommitmentConfig::confirmed(),
    );

    // !hover pubkey
    let receiver = pubkey!("4kg8oh3jdNtn7j2wcS7TrUua31AgbLzDVkBZgTAe44aF");

    // !hover lamports
    let lamports = 1 * LAMPORTS_PER_SOL;

    let transaction_signature = client.request_airdrop(&receiver, lamports).await?;
    loop {
        if client.confirm_transaction(&transaction_signature).await? {
            break;
        }
    }

    println!("{}", transaction_signature);

    Ok(())
}
```

### !params

#### !! pubkey

!type string  
!required

Pubkey of account to receive lamports, as a base-58 encoded string

#### !! lamports

!type u64  
!required

Amount of lamports to airdrop

#### !! config

!type object

Configuration object containing the following fields:

##### !! commitment

!type string  
!values processed confirmed finalized  
!default finalized

Solana RPC uses the following commitment levels:

| Value       | Description                                                                                                                                                                                                                                                                |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `processed` | Return data from the highest slot this node has processed on the fork it currently considers best. This is the newest view, but it can still change if the cluster switches forks.                                                                                         |
| `confirmed` | Return data from the highest slot that at least two-thirds of active stake has directly voted to confirm. This is more stable than `processed`, but it is still a weaker guarantee than `finalized`.                                                                       |
| `finalized` | Return data from the highest slot that the cluster recognizes as finalized. In practice, this means the slot has reached maximum vote lockout in validators' vote towers and is recognized by at least two-thirds of active stake. This is the strongest commitment level. |

##### !! recentBlockhash

!type string

Use this recent blockhash for the faucet transaction instead of the node's
current confirmed blockhash

```json title="Example"
{ "recentBlockhash": "EkSnNWid2cvwEVnVx9aBqawnmiCNiDgp3gUdkDPTKN1N" }
```

### !!result

```jsonc !response
{
  "jsonrpc": "2.0",
  // !hover result
  "result": "4cdd1oX7cfVALfr26tP52BZ6cSzrgnNGtYD7BFhm6FFeZV5sPTnRvg6NRn8yC6DbEikXcrNChBM5vVJnTgKhGhVu",
  "id": 1
}
```

!type string

Transaction Signature of the airdrop, as a base-58 encoded string

</APIMethod>
