UQRP Protocol

Universal Query Response Protocol for DNS-Based Data Storage

Quick Reference: This is a condensed overview. For the complete technical specification including formal grammar (ABNF), encryption wire formats, and implementation requirements, see the Full Protocol Specification.

Try it now

Live DNS Query
dig TXT
Try:
Query breakdown:
operation:getparams:quebecresource:weathernamespace:publicversion:v1

Overview

ResolveDB transforms DNS infrastructure into a data distribution platform. Data is encoded in DNS queries and responses, leveraging global DNS caching for sub-millisecond access.

Client                    DNS Resolver              ResolveDB
   |                           |                          |
   |-- get.settings.config.hooli.v1.resolvedb.net ------>|
   |                           |                          |
   |<-- TXT "v=rdb1;s=ok;d={"theme":"dark"}" ------------|
   |                           |                          |
   |-- (cached locally) ------>|                          |

Query Format

UQRP queries are structured DNS hostnames with each component serving a specific purpose:

<operation>.<params>.<resource>.<namespace>.<version>.resolvedb.<tld>
ComponentRequiredDescription
operationYesAction to perform (get, put, delete, etc.)
paramsNoEncoded parameters
resourceYesData resource name
namespaceYesScope (public, user, system)
versionYesProtocol version (v1)
resolvedbYesProtocol marker
tldYes.com, .net, .org, .io

Examples

# Weather by city (public service)
dig TXT get.seattle.weather.public.v1.resolvedb.net +short

# Weather by coordinates (d = decimal point, _ separates lat/lon)
dig TXT get.47d6062_-122d3321.weather.public.v1.resolvedb.net +short

# Weather by IP location
dig TXT get.ip-8-8-8-8.weather.public.v1.resolvedb.net +short

# Weather by what3words (hyphens replace dots)
dig TXT get.w3w-filled-count-soap.weather.public.v1.resolvedb.net +short

# 3-day forecast
dig TXT get.seattle.forecast.public.v1.resolvedb.net +short

# GeoIP lookup
dig TXT geoip.ip-8-8-8-8.public.v1.resolvedb.net +short

# Stock quote
dig TXT get.AAPL.stock.public.v1.resolvedb.net +short

# Forex rate
dig TXT get.USD-EUR.forex.public.v1.resolvedb.net +short

# Crypto price
dig TXT get.BTC-USD.crypto.public.v1.resolvedb.net +short

# Authenticated request (user namespace)
get.auth-eyJhbGciOiJFZDI1NTE5In0.preferences.users.myapp.v1.resolvedb.net

Operations

OperationDescriptionAuth RequiredTransport
getRetrieve dataNo (public) / Yes (user)DNS
putStore dataYesHTTP API
deleteRemove dataYesHTTP API
listList resourcesDependsDNS
searchSearch resourcesDependsDNS
watchSubscribe to changesYesDNS (returns WebSocket URL)
infoResource metadata & JSON SchemaNoDNS + HTTP
healthSystem healthNoDNS
geoipClient IP geolocationNoDNS

Note: Write operations (put, delete) are handled via the HTTP API at api.resolvedb.io, not via DNS queries. DNS is optimized for reads; writes flow through the API.

Schema Discovery (info Operation)

Get JSON Schema for any resource to understand its response format:

# Via DNS
dig TXT info.weather.public.v1.resolvedb.net +short

# Via HTTP (copy-paste any query - operation and params are ignored)
curl 'https://api.resolvedb.io/schema?q=weather.public.v1.resolvedb.net'
curl 'https://api.resolvedb.io/schema?q=get.seattle.weather.public.v1.resolvedb.net'

Response includes:

  • schema: JSON Schema with field types, descriptions, and examples
  • meta: Auth requirements, rate limits, default TTL
  • dns_format: Query template and example response
  • error_responses: Expected error codes and descriptions

See Schema Access in the full spec.

Parameter Encoding

Parameters requiring special characters are encoded using DNS-safe prefixes. All prefixes use hyphens (-) as separators since colons are not valid in DNS labels per RFC 1035.

PrefixEncodingUse Case
(none)Plain alphanumericSimple keys, city names
ip-IP addressDots replaced with hyphens (8-8-8-8)
w3w-what3wordsDots replaced with hyphens (filled-count-soap)
b64-Base64 URL-safeJSON, binary, complex params
b32-Base32Case-insensitive
hex-HexadecimalBinary hashes
auth-JWT tokenAuthentication
chunk-Chunk referenceLarge data
h-Hash referenceContent-addressed
ts-Unix timestampReplay protection
nonce-Random stringReplay protection
cursor-Pagination cursorList/search pagination
limit-Result limitPagination (1-1000)
offset-Result offsetPagination
geo-CoordinatesGeoIP queries

Coordinate Encoding

For lat/lon coordinates, use d as decimal point and _ as separator:

# 47.6062, -122.3321 becomes:
dig TXT get.47d6062_-122d3321.weather.public.v1.resolvedb.net +short

Token Hash References

JWT tokens often exceed the 63-character DNS label limit. Use hash references for long tokens:

# Full token (may exceed label limit)
get.auth-eyJhbGciOi...longtoken....resource.namespace.v1.resolvedb.net

# Hash reference (always fits)
get.auth-h-a1b2c3d4e5f6g7h8i9j0k1l2.resource.namespace.v1.resolvedb.net

Register your token via the API to receive a hash reference. Hash references require at least 32 hex characters (128 bits).

Response Format

Responses are returned as DNS TXT records with a structured format:

v=rdb1;s=<status>;t=<type>;e=<encoding>;f=<format>;ttl=<seconds>;d=<data>
FieldDescriptionValues
vProtocol versionrdb1
sStatus codeok, notfound, auth, error...
tResponse typedata, url, multi, stream, encrypted
eEncodingplain, b64, b32, hex, compressed, encrypted
fFormatjson, xml, text, binary
hSHA-256 hashFirst 16+ hex chars
ttlCache durationSeconds
errError codeE001-E017
retryRetry afterSeconds
dData payloadEncoded data

Response Examples

# Success with JSON
v=rdb1;s=ok;t=data;e=plain;f=json;ttl=300;d={"temp":72,"unit":"F"}

# URL redirect for large data
v=rdb1;s=redirect;t=url;ttl=3600;d=https://cdn.resolvedb.cloud/blob/abc123

# Rate limited
v=rdb1;s=ratelimit;err=E010;retry=60;ttl=1;d=Rate limit exceeded

Status Codes

CodeHTTP EquivDescription
ok200Success
partial206Partial content
redirect301See URL in data
invalid400Malformed query
auth401Authentication required
forbidden403Access denied
notfound404Resource not found
ratelimit429Too many requests
toolarge413Response exceeds limits
secviol400Security violation (signature invalid, replay detected)
error500Server error
unavail503Service unavailable

Error Codes

Machine-readable error codes for programmatic handling:

CodeStatusDescriptionRetryable
E001invalidMalformed query syntaxNo
E002invalidUnknown operationNo
E003invalidInvalid encoding prefixNo
E004notfoundResource does not existNo
E005notfoundNamespace does not existNo
E006authMissing authenticationNo
E007authToken expiredNo
E008authToken invalidNo
E009forbiddenInsufficient permissionsNo
E010ratelimitRate limit exceededYes
E011toolargePayload exceeds 64KBNo
E012errorInternal server errorYes
E013unavailService temporarily unavailableYes
E014secviolEncrypted transport requiredYes
E015toolargeResponse requires TCPYes
E016secviolReplay attack detectedNo
E017invalidCursor validation failedNo

Namespaces

ResolveDB organizes data into hierarchical namespaces:

resolvedb.<tld>
├── public.resolvedb.<tld>    # Public data services
├── user.resolvedb.<tld>      # User-owned namespaces
├── system.resolvedb.<tld>    # System operations
└── registry.resolvedb.<tld>  # Service registry

Public Namespace

Globally accessible data through standardized interfaces:

current.celsius.newyork.weather.v1.public.resolvedb.net
price.aapl.nasdaq.stock.v1.public.resolvedb.net

User Namespace

Isolated data storage for individuals and organizations:

get.preferences.users.hooli.v1.resolvedb.net
get.settings.config.hooli.v1.resolvedb.net

Namespace Rules

RuleConstraint
Length1-32 characters
Charactersa-z, 0-9, - (hyphen)
Start/EndMust be alphanumeric
CaseCase-insensitive (normalized to lowercase)

Reserved Namespaces: public, system, registry, admin, root, api, www, cdn, dns, ns*, mail, resolvedb, rdb, and all underscore-prefixed names (_*).

Dual Addressing

Organizations receive both a vanity name and a stable hash ID:

get.settings.config.hooli.v1.resolvedb.net           # vanity (readable)
get.settings.config.a7f3b2c4e8d9f012.v1.resolvedb.net  # hash ID (stable)

Hash IDs are 16 hex characters (64-bit) and remain stable across renames.

TTL & Caching

ResolveDB leverages the global DNS caching infrastructure. When a response is returned with a TTL, every resolver in the hierarchy caches it independently, dramatically reducing origin queries.

TTL Classes

ClassTTLUse Case
immutable7 daysHash-addressed content, versioned data
stable24 hoursReference data, documentation
info1 hourSchema metadata (info operation)
standard1 hourDefault for most data
dynamic5 minUser data, frequently changing content
volatile30-60 secReal-time status, health checks
nocache0Write confirmations, errors

Write Operations

Write operations (put, delete) use the HTTP API, not DNS. See API Reference for details.

# Create/update a record
curl -X POST https://api.resolvedb.io/api/v1/records \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"record": {"key": "settings.config.hooli.v1", "data": "eyJoZWxsbyI6IndvcmxkIn0="}}'

# Delete a record
curl -X DELETE https://api.resolvedb.io/api/v1/records/rec_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"

After a write, data is immediately available via DNS queries.

Pagination

For list and search operations, use cursor-based pagination:

# First page (50 results)
list.limit-50.resources.hooli.v1.resolvedb.net

# Next page (use cursor from previous response)
list.cursor-eyJsYXN0IjoiZm9vIn0.resources.hooli.v1.resolvedb.net

Response includes pagination metadata:

{"items": [...], "cursor": "eyJsYXN0IjoiYmFyIn0", "hasMore": true}

Large Data

For data exceeding 4KB, use chunked retrieval:

# 1. Get manifest
dig get.manifest.bigfile.hooli.v1.resolvedb.net TXT

# 2. Retrieve chunks in parallel (format: chunk-index-total-hash)
dig get.chunk-0-5-abc123def4567890.bigfile.hooli.v1.resolvedb.net TYPE=NULL
dig get.chunk-1-5-abc123def4567890.bigfile.hooli.v1.resolvedb.net TYPE=NULL

Verify each chunk's hash before reassembly. See PROTOCOL.md for full chunking specification.

Security

ResolveDB implements multiple security layers:

Layer 1: DNSSEC

ECDSA P-256 signing, automatic key rotation, NSEC3 for authenticated denial.

Layer 2: Content Integrity

SHA-256 hash verification, Ed25519 signatures, Unix timestamps for replay protection.

Layer 3: Encryption

AES-256-GCM symmetric encryption, X25519 key exchange, ChaCha20-Poly1305.

Layer 4: Query Privacy

DNS-over-HTTPS (DoH) and DNS-over-TLS (DoT) encrypt queries in transit:

MethodEndpointUse Case
DoH JSONapi.resolvedb.io/resolveBrowsers, debugging
DoH Wireapi.resolvedb.io/dns-queryRFC 8484 clients
DoTapi.resolvedb.io:853Native TLS clients

See DNS Access Methods for details and code examples.

Authentication

JWT tokens are passed via the auth- prefix:

get.auth-<jwt>.resource.namespace.v1.resolvedb.net

# JWT Claims
{
  "sub": "user-id",
  "tenant": "namespace",
  "exp": 1234567890,
  "scopes": ["read", "write"]
}

Complete Specification

This quick reference covers the essentials. For comprehensive details, see:


Ready to build?

Create an account and start using the UQRP protocol.