Resolve .algo names and perform name operations on ANS .algo names.
Resolve .algo name
Resolve .algo name to get the address of the owner. Use query params listed below to get further information including linked socials and other metadata.
curl --location --request GET "https://api.algonameservice.com/name/asalyticapp?socials=true&metadata=true"{"found":true,"address":"MLFVS7JYC5S7TEWUWDY5HHJTCS3EHWV6KZKOM43Q2RSCX6VZH7DEBJXZYQ","name":"asalyticapp.algo","socials": [{"key":"twitter","value":"https://twitter.com/asalytic" }],"metadata": [{"key":"subdomain","value":"" },{"key":"transfer_to","value":"" },{"key":"transfer_price","value":"" },{"key":"expiry","value":"Sat Mar 04 2023" },{"key":"name","value":"asalyticapp" }]}
Names owned by address
This GET method gets all the names owned by an Algorand address in reverse chronological order of registration. Use query parameters listed below to get more details about the name including linked socials and other metadata including avatar and transfer information.
Method: GET
https://api.algonameservice.com/account/:address
Query Params:
curl --location --request GET "https://api.algonameservice.com/account/RANDGVRRYGVKI3WSDG6OGTZQ7MHDLIN5RYKJBABL46K5RQVHUFV3NY5DUE"
{ "result": [ { "name":"randgallery.algo","expiry":"Sat Feb 25 2023" }, {"name":"rand.algo","expiry":"Sat Feb 25 2023" } ]}
Multiple account reverse lookup
This GET method gets the most recently registered domain name by each of the Algorand address provided through accounts[] query parameter.
curl --location --request POST "https://api.algonameservice.com/names/register/txns" \--data-raw '{"name":"johndoe07.algo","address":"PRVIUNUJ2TIPL5PK5NFMPTUF2DQL5ZVU7IENDNNB2U4JEGW5FYCEQF2HOQ","period":1} '
Renew name
Retrieve transactions to renew a name. The ANS registry currently supports renewal only by the owner hence the transactions will fail if the input address is not the current owner of the name.
Method: POST
https://api.algonameservice.com/names/renew
Query Params:
curl --location --request POST "https://api.algonameservice.com/names/renew" \--data-raw '{"name":"johndoe07.algo","address":"PRVIUNUJ2TIPL5PK5NFMPTUF2DQL5ZVU7IENDNNB2U4JEGW5FYCEQF2HOQ","period":5} '
Update Name (Set name properties)
Retrieve transactions to set the social media handles of a domain name
Method: POST
https://api.algonameservice.com/names/update
curl --location --request POST "https://api.algonameservice.com/names/update" \--data-raw '{"name":"johndoe07.algo","address":"PRVIUNUJ2TIPL5PK5NFMPTUF2DQL5ZVU7IENDNNB2U4JEGW5FYCEQF2HOQ","updatedHandles": {"twitter":"@johndoe","discord":"johndoe#6711" }}'
Initiate transfer
Retrieve the transactions to initiate name transfer. The owner is required to set the price for transfer and the recipient's algorand account address.
curl --location --request POST "https://api.algonameservice.com/names/put-for-transfer" \--data-raw '{"name":"johndoe07.algo","owner":"PRVIUNUJ2TIPL5PK5NFMPTUF2DQL5ZVU7IENDNNB2U4JEGW5FYCEQF2HOQ","transfer_to":"G5EIF27LMQZPLJP45OYVNSCHIU4JQ2C2PERIDMHWDJOTIXBCZHBS4H5HCU","price":5}'
Accept transfer
Retrieve the transactions to complete the transfer by providing the current owner's address, the transfer recipient's address, and the price set by the owner