Connect Wallet
⟳

TAU.GE

Public API

Read on-chain shortlinks by wallet address or by unique code. No API key, no database.

Network

Chain—
Chain ID—
JSON-RPC—
Explorer—
Contract—
Base URL—

All responses are JSON with a boolean ok field. Errors return { "ok": false, "error": "…" } with a 4xx/5xx status. CORS is open for GET.

1. Get links by wallet address

GET api/links.php?address={wallet}&offset=0&limit=20

Returns every shortlink owned by a wallet, paginated. Reads getLinksByOwner() and linkCountOf() straight from the contract.

ParamTypeRequiredDescription
addressstringyesEVM address, 0x + 40 hex chars
offsetintnoStart index within that wallet's list. Default 0
limitintnoItems per page, max 50. Default 20

2. Get one link by unique shortlink code

GET api/links.php?code={code}

Returns the full record for a single code, including owner and visit count. Responds 404 when the code was never planted.

ParamTypeRequiredDescription
codestringyes3–32 chars of A-Z a-z 0-9 - _

3. Latest links

GET api/links.php?offset=0&limit=20

Newest first, across all wallets. Same shape as the queries above with "mode": "latest".

4. Resolve a code to its destination

GET api/resolve.php?code={code}

Lightweight lookup that returns only the destination URL. Unlike links.php?code= it answers 200 with "exists": false for unknown codes, which is handy for polling.

5. Registry stats

GET api/stats.php

Total links, plant fee in wei, pause flag, live block number and chain ID.

6. Redirect endpoint

GET /{code}

The shortest form, such as https://tau.ge/hJGQLx2, resolves on-chain and issues a 302 to the destination. It is identical to go.php?c=hJGQLx2 and /go/hJGQLx2. Only http and https targets are followed; anything else is blocked. Inactive or unknown codes return 404.

All equivalent forms

URLResolved byNeeds JS
/{code}server (go.php)no
/go/{code}server (go.php)no
go.php?c={code}serverno
/r/{code}browser (redirect.html)yes

The first three are byte-identical in behaviour. /r/{code} reads the contract straight from the visitor's browser via JSON-RPC, so it works even when PHP is unavailable; it falls back to the server if the RPC call fails.

Response shape

{
  "ok": true,
  "mode": "address",
  "address": "0xabc…",
  "count": 2,
  "total": 2,
  "offset": 0,
  "limit": 20,
  "contract": "0x…",
  "chainId": 677,
  "items": [
    {
      "code": "my-link",
      "shortUrl": "https://tau.ge/my-link",
      "url": "https://example.com/a/very/long/path",
      "owner": "0xabc…",
      "createdAt": 1756500000,
      "createdAtIso": "2025-08-30T12:00:00+00:00",
      "clicks": 4,
      "active": true
    }
  ]
}

Examples

cURL

…

JavaScript (fetch)

const base = '…';

// by wallet
const mine = await fetch(`${base}/api/links.php?address=${wallet}&limit=50`)
  .then(r => r.json());

// by unique code
const one = await fetch(`${base}/api/resolve.php?code=my-link`)
  .then(r => r.json());
console.log(one.url);

Direct contract read (no backend)

The registry is fully public, so you can skip this API and hit the RPC yourself.

import { JsonRpcProvider, Contract } from 'ethers';

const provider = new JsonRpcProvider('https://rpc.botchain.ai', 677);
const abi = [
  'function getLinksByOwner(address,uint256,uint256) view returns (tuple(string code,string url,address owner,uint64 createdAt,uint64 clicks,bool active)[])',
  'function getLink(string) view returns (tuple(string code,string url,address owner,uint64 createdAt,uint64 clicks,bool active))',
  'function resolve(string) view returns (string)'
];
const registry = new Contract('0x…', abi, provider);

await registry.resolve('my-link');
await registry.getLinksByOwner(wallet, 0, 50);

Writing (requires a wallet)

Planting is a state change, so it happens client-side against the contract — the API is read-only by design and never holds a private key.

const registry = new Contract(address, abi, signer);
const fee = await registry.createFee();

// auto-generated 7-char code
await registry.plantAuto('https://example.com', { value: fee });

// custom code
await registry.plant('my-link', 'https://example.com', { value: fee });

Rate limits & caveats

  • No auth and no rate limit at the app layer; the public RPC upstream may throttle.
  • Every response is read live from the chain — nothing is cached server-side.
  • limit is capped at 50 to keep eth_call payloads small.
  • Codes are case-sensitive: MyLink and mylink are distinct records.