Name

Get namecoin records or history by their name.

GET /name/<name>.json

Get the history of all records that have been registered to a name.

GET /name/<name>.json?history

Parameters

The following parameters are accepted to influence the detail of returned data:
history Return a list of name operations for the given name
with_block Add the block hash to the name data
with_height Add the block height to the name data
with_tx_idx Add the transaction index in the block
with_rawtx Add the raw transaction the name operation appears in (in hex)
with_mrkl_branch Add the merkle branch linking the transaction to the block
with_all Add all of the extra data fields

Response

Returns the name record (or a list of them, when the "history" parameter is specified), along with information about its position in the blockchain.

Field Description Example
name The given name "d/mysite"
value The value stored under that name "{\"ip\":\"0.0.0.0\",\"map\":{\"*\":{\"ip\":\"0.0.0.0\"}}}"
expires_in Number of blocks before this name expires 30466
address The address this name operation was sent to "mw3MrjSTETgLWP3x2Wro7bTx2QvdsL7idP"
txid ID of the transaction that registered this name "0dc5b261eae6dd0c16c73025b59ac4f024464676dd4f020d0808bf7c086d2472"
block Hash of the block this name was registered in "aa5f96aaac5b7447f5229a401689b98bea130f35646f65e266584d3213477761"
height Height of the block this name was registered in 23406
tx_idx The index of the transaction within the block 1
rawtx The raw transaction in which this name operation appears (in hex) "0071000002c732d0a60876de87d40d284f8a8bdbe92f6..."
mrkl_branch The merkle branch linking the transaction hash to the block hash [ "dd8fdca4fbeb8d40dea5f0dfcbd88849c2ed7709da832adb2db595c71c0d0b2b" ]

Error

When the name wasn't found, the response will include an "error" message.

Example

Looking up a namecoin record:

curl http://namecoin.webbtc.com/name/d/mysite.json?with_all
{
  "name": "d/mysite",
  "value": "{\"ip\":\"0.0.0.0\",\"map\":{\"*\":{\"ip\":\"0.0.0.0\"}}}",
  "txid": "0dc5b261eae6dd0c16c73025b59ac4f024464676dd4f020d0808bf7c086d2472",
  "address": "mw3MrjSTETgLWP3x2Wro7bTx2QvdsL7idP",
  "expires_in": 30466,
  "block": "aa5f96aaac5b7447f5229a401689b98bea130f35646f65e266584d3213477761",
  "height": 23406,
  "rawtx": "0071000002c732d0a60876de87d40d284f8a8bdbe92f667add306ef42ac90842e8b156fbfe000000008c4930460221008d42f486fa84bece23c91a7aab23519b746196e4d4f3588341a66d5cdba31453022100d270425e3a3e96bc2067f714ae1aa0bfcb266a6ad7d23dd4d9900fc953fed882014104213701e25783b793e46e6a997bad2b218eb915cb8a55eb65c960a3c1caa73a426fc12c632267785a3a2cede0ccafc79adf22293739c5422a342a91e43eae072bffffffff1bd18f2cd94b4ec28257450085db454fb50315ca77c6cf90097a73a187bb9975000000004a493046022100f7c9b2814c77e8561524538ca8207dfbf836084356635bc7e8e70a762727db96022100a24fc7079f1ffeb09c59f0465bd74a243aea7fddca814e44a26327f2ca30b03901ffffffff028064aa2901000000434104d3bbded1e8f62b6c0aff1246bbcabd8369acc036e0101bcd8b27d0ce499b6928339674b039f696c9ed9c5a763c832a5188dc679bc5b62f2e36cc37c92cd689e2ac40420f0000000000535308642f6d79736974652d7b226970223a22302e302e302e30222c226d6170223a7b222a223a7b226970223a22302e302e302e30227d7d7d6d7576a914aa4a090daafe78897d9459b47ffdcc46ea065bc588ac00000000",
  "mrkl_branch": [
    "dd8fdca4fbeb8d40dea5f0dfcbd88849c2ed7709da832adb2db595c71c0d0b2b"
  ]
}

Retrieving the history of a name record:

curl http://namecoin.webbtc.com/name/d/mysite.json?history
[
  {
    "height": 23336,
    "block": "e23cec220175fa6b6741825f270d7694e6e9589e4838eddc13241e70ca4d14e5",
    "expires_in": 30396,
    "address": "mjhhcFohjjGpcKQWWPEQUuJjdExxnmXwJ3",
    "txid": "fefb56b1e84208c92af46e30dd7a662fe9db8b8a4f280dd487de7608a6d032c7",
    "value": "{\"ip\":\"0.0.0.1\",\"map\":{\"*\":{\"ip\":\"0.0.0.1\"}}}",
    "name": "d\/mysite"
  },
  {
    "height": 23406,
    "block": "aa5f96aaac5b7447f5229a401689b98bea130f35646f65e266584d3213477761",
    "expires_in": 30466,
    "address": "mw3MrjSTETgLWP3x2Wro7bTx2QvdsL7idP",
    "txid": "0dc5b261eae6dd0c16c73025b59ac4f024464676dd4f020d0808bf7c086d2472",
    "value": "{\"ip\":\"0.0.0.0\",\"map\":{\"*\":{\"ip\":\"0.0.0.0\"}}}",
    "name": "d\/mysite"
  }
]