Skip to main content
GET
https://nostrapi.com
/
api
/
v1
/
utils
/
npub-hex
curl --location --request GET 'https://nostrapi.com/api/v1/utils/npub-hex?v=npub1c7tk80ur5zeltm9czama0xdaxctyx298p2dv0kdwmv88z94568squh6xp4' \
--header 'Content-Type: application/json' \
--header 'apikey: <YOUR_KEY_HERE>'
{
  "success": true,
  "message": "Successfully fetched HEX value for npub1c7tk80ur5zeltm9czama0xdaxctyx298p2dv0kdwmv88z94568squh6xp4 pubkey.",
  "data": {
    "hex": "c79763bf83a0b3f5ecb81777d799bd36164328a70a9ac7d9aedb0e7116b4d1e0"
  }
}

Query

v
string
This is the NPUB public key that you wish to convert.

Response

success
boolean
Indicates whether the call was successful. true if successful, false if not.
message
string
Message detailing the results of the operation.
data
object
The contents of the data response object.
curl --location --request GET 'https://nostrapi.com/api/v1/utils/npub-hex?v=npub1c7tk80ur5zeltm9czama0xdaxctyx298p2dv0kdwmv88z94568squh6xp4' \
--header 'Content-Type: application/json' \
--header 'apikey: <YOUR_KEY_HERE>'
{
  "success": true,
  "message": "Successfully fetched HEX value for npub1c7tk80ur5zeltm9czama0xdaxctyx298p2dv0kdwmv88z94568squh6xp4 pubkey.",
  "data": {
    "hex": "c79763bf83a0b3f5ecb81777d799bd36164328a70a9ac7d9aedb0e7116b4d1e0"
  }
}