Decode Bencode to a JSON value
API · /bencode-api
Bencode API
Encode and decode Bencode (BEP 3) — the serialization format BitTorrent uses for .torrent metainfo files and tracker responses. The encode endpoint turns a JSON value into Bencode: objects become dictionaries with their keys sorted in raw byte order exactly as the spec demands, arrays become lists, whole numbers become integers, and strings become length-prefixed byte strings. The decode endpoint parses Bencode back into a JSON value and enforces the spec strictly — no leading zeros in integers, no negative zero, dictionary keys must be sorted and unique, and no trailing data is tolerated — so malformed input is rejected rather than silently mangled. Binary byte strings that are not valid UTF-8 are represented losslessly as a {"_bytes_hex":"…"} object, so encode and decode round-trip exactly even for the binary "pieces" field of a real torrent. Decode accepts the data either as text or, for genuinely binary payloads, as hex; encode returns both the Bencode text (when printable) and its hex bytes. Everything is computed locally and deterministically, so it is instant and private. Ideal for building and parsing .torrent files, tracker tooling, BitTorrent clients and DHT messages, and teaching how the format works. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is BitTorrent's Bencode specifically; for base64, hex, URL or HTML encoding use a general encoding API, and for JSON, YAML, TOML or XML use those format APIs.
API health
healthy- Uptime
- 100.00%
- Server probes · 24h
- Avg latency
- 350 ms
- Server probes · 24h
- Subscribers
- 4,713
- active
- Total calls
- 39
- last 7 days
Pricing
Pick a tier — billed monthly, cancel anytime.
Free
Free
- 5,335 calls / month
- 2 requests / second
- Hard cap (429 above quota, no overage)
- 5,335 calls/month
- 2 req/sec
- Encode + decode
- No credit card
Starter
€6.85 /month
- 14,850 calls / month
- 8 requests / second
- Hard cap (429 above quota, no overage)
- 14.85k calls/month
- 8 req/sec
- Binary-safe (hex) round-trip
- Email support
Pro
€26.75 /month
- 199,500 calls / month
- 20 requests / second
- Hard cap (429 above quota, no overage)
- 199.5k calls/month
- 20 req/sec
- Torrent / tracker pipelines
- Priority support
Mega
€64.75 /month
- 1,040,000 calls / month
- 50 requests / second
- Hard cap (429 above quota, no overage)
- 1.04M calls/month
- 50 req/sec
- Platform scale
- Dedicated SLA
Built by
Related APIs
Other APIs with overlapping tags.
CBOR API
Encode and decode CBOR (RFC 8949, Concise Binary Object Representation) — the IETF-standard binary data format behind COSE, WebAuthn/FIDO2, the EU Digital COVID Certificate, and many IoT and constrained-device protocols. The encode endpoint turns a JSON value into compact, definite-length CBOR, choosing the smallest head for each integer, string, array and map; the decode endpoint parses CBOR back into a JSON value. It implements the spec across all major types — unsigned and negative integers of every width, byte and text strings (including indefinite-length chunked strings), arrays, maps, tags, the simple values false/true/null, and half-, single- and double-precision floats — and rejects trailing or truncated data rather than silently mangling it. Byte strings and any non-UTF-8 text come back losslessly as {"_bytes_hex":"…"}, tags as {"_tag":{"tag":N,"value":…}}, non-finite floats as {"_float":"NaN|Infinity|-Infinity"}, and other simple values as {"_simple":N}, so encode and decode round-trip exactly. Bytes are exchanged as both hex and base64 so they survive any transport. Everything is computed locally and deterministically, so it is instant and private. Ideal for debugging CBOR, COSE and WebAuthn payloads, bridging JSON and CBOR systems, IoT and smart-card pipelines, and teaching the format. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is CBOR specifically; for MessagePack use the MessagePack API, for BitTorrent's Bencode use the Bencode API, for JSON, YAML, TOML or XML use those format APIs, and for base64, hex, URL or HTML encoding use a general encoding API.
api.oanor.com/cbor-api
MessagePack API
Encode and decode MessagePack — the compact binary serialization format ("it's like JSON, but fast and small") used by Redis, Fluentd, many RPC systems and IoT protocols. The encode endpoint turns a JSON value into MessagePack bytes, automatically choosing the smallest representation for each integer, string, array and map; the decode endpoint parses MessagePack back into a JSON value. It implements the full spec — nil, booleans, every fixed and variable integer width, float32 and float64, str and bin, arrays and maps, and the ext family — and rejects trailing or truncated data rather than silently mangling it. Binary (bin) values and any non-UTF-8 string come back losslessly as a {"_bytes_hex":"…"} object, and ext values as {"_ext":{"type":N,"hex":"…"}}, so encode and decode round-trip exactly. Bytes are exchanged as both hex and base64 so they survive any transport. Everything is computed locally and deterministically, so it is instant and private. Ideal for debugging MessagePack payloads, bridging JSON and msgpack systems, RPC and cache tooling, IoT pipelines, and teaching the format. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is MessagePack specifically; for JSON, YAML, TOML or XML use those format APIs, for BitTorrent's Bencode use the Bencode API, and for base64, hex, URL or HTML encoding use a general encoding API.
api.oanor.com/msgpack-api
Ice Cream API
Ice-cream and gelato batch maths as an API, computed locally and deterministically — the overrun, yield and solids numbers a gelatiere, ice-cream maker or production planner balances a mix by. The overrun endpoint measures the air whipped into the mix during freezing by the weight method: from the same container filled first with mix and then with frozen ice cream, overrun = (mix weight − frozen weight) ÷ frozen weight × 100 — a cup that drops from 1000 g to 625 g ran 60 % overrun. Dense gelato sits around 20–35 %, premium ice cream 25–50 %, soft-serve and economy tubs 50–100 %+; more air means a lighter, cheaper, faster-melting product. The yield endpoint turns a mix volume and an overrun into the frozen volume (mix × (1 + overrun/100)) and the number of scoops at a given scoop size, so 2 litres of mix at 60 % overrun yields 3.2 litres and about 53 sixty-millilitre scoops — which is why overrun is a direct cost lever. The total-solids endpoint balances a recipe: total solids (sugar + fat + milk-solids-not-fat + other) as a percent of the mix weight, with the fat, sugar, MSNF and water percentages — a typical ice cream runs 36–42 % total solids, gelato lower in fat, and balancing solids against water is what keeps the texture smooth rather than icy. Everything is computed locally and deterministically, so it is instant and private. Ideal for gelateria and creamery tools, recipe-balancing apps, and food-production calculators. Pure local computation — no key, no third-party service, instant. 3 compute endpoints. For general cooking measure conversions use a cooking API.
api.oanor.com/icecream-api
Wood Moisture API
Wood-moisture maths as an API, computed locally and deterministically — the moisture-content, oven-dry-weight and drying-target numbers a woodworker, sawyer, kiln operator or firewood seller weighs timber by. The moisture-content endpoint takes a wet weight and an oven-dry weight and returns the moisture content on both conventions: the dry basis (water ÷ oven-dry weight × 100, the forestry and woodworking standard) and the wet/green basis (water ÷ wet weight × 100, common in agriculture and paper) — a board weighing 120 g that dries to 100 g holds 20 g of water and is 20 % dry-basis or 16.7 % wet-basis, so it always matters which is quoted. Above fibre saturation (~28–30 %) the wood is still shedding free water and has not begun to shrink. The dry-weight endpoint back-calculates the unchanging oven-dry weight from a current weight and a meter reading (wet ÷ (1 + MC/100)), the anchor for any drying plan because the wood substance does not change as water leaves. The target-weight endpoint uses that anchor to give the weight a piece should reach for a target moisture content and the water still to drive off — taking 120 g at 20 % down to 12 % means a 112 g target and 8 g of water to lose, so you simply weigh the piece down to that figure. Everything is computed locally and deterministically, so it is instant and private. Ideal for woodworking and lutherie tools, sawmill and kiln-drying apps, and firewood-seasoning calculators. Pure local computation — no key, no third-party service, instant. Mass-balance maths — pair it with a real moisture meter. 3 compute endpoints. For board feet use a lumber API; for a wood-stack volume a firewood API.
api.oanor.com/woodmoisture-api
Frequently asked questions
Quick answers about pricing, quotas, and integration.
How do I get an API key for Bencode API?
What's the rate limit for Bencode API?
How much does Bencode API cost?
Can I cancel my subscription anytime?
Is Bencode API GDPR-compliant?
Pick an endpoint from the list on the left to see its details and try it.
Code snippets
Sign up to get an API key, then call any path under your slug.
curl https://api.oanor.com/bencode-api/SOME_PATH \
-H "x-oanor-key: oanor_test_..."
const res = await fetch("https://api.oanor.com/bencode-api/SOME_PATH", {
headers: { "x-oanor-key": "oanor_test_..." }
});
const data = await res.json();
$ch = curl_init("https://api.oanor.com/bencode-api/SOME_PATH");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
$response = curl_exec($ch);
import requests
r = requests.get(
"https://api.oanor.com/bencode-api/SOME_PATH",
headers={"x-oanor-key": "oanor_test_..."},
)
print(r.json())
Ratings
Sign in to rate.
No reviews yet.
Discussion
Ask questions, share usage tips, get answers from the provider and other developers. Public — anyone can read.
Sign in to start a thread or reply.
Sign inNew thread
·
-
Provider answer
🔒 This thread is locked — no new replies.
-
·
- No threads yet — start the discussion.
Support
Private 1:1 support with the provider — billing questions, integration issues, account problems. Only you and the provider team can see these threads.
Sign in to open a support ticket.
Sign inOpen new ticket
Describe what you need help with. The provider team gets an email and replies on the ticket page.
-
·
Urgent - No tickets yet for this API.