{"uid":"cap_f7XmCuxCOgcyx8PlQu_xf","slug":"2s-io-unit-converter-81d0f5b1","name":"2s.io Unit Converter","description":"Convert a value between units of measure: mass (g, kg, mg, lb, oz, t, st), length (m, km, cm, mm, in, ft, yd, mi), volume (l, ml, m3, gal, gal-imp, qt, pt, cup, floz, tbsp, tsp), area (m2, km2, ft2, acre, ha), and temperature (C, F, K). Units are matched case-insensitively with common aliases (kg/kilogram/kgs). Returns {value, from, to, dimension, result}. Exact factors — the ground-truth answer a CPG/ETL pipeline needs instead of an LLM approximating conversions. Cross-dimension conversions (kg→m) return 400.","url":"https://2s.io/api/convert/unit","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","queryParams"],"properties":{"type":{"const":"http"},"method":{"const":"GET"},"queryParams":{"required":["value","from","to"],"properties":{"to":{"type":"string","description":"Target unit (same dimension)."},"from":{"type":"string","description":"Source unit (alias-tolerant)."},"value":{"type":"number","description":"Numeric value to convert."}}}}}}},"responseSchema":null,"example":{"request":{"input":{"type":"http","method":"GET","queryParams":{"to":"kilograms","from":"pounds","value":150}}},"response":{"data":{"ok":true,"items":[{"to":"kg","from":"lb","value":150,"reason":null,"result":68.03885550000001,"dimension":"mass"}],"total":1,"source":{"url":"https://2s.io","license":"No upstream license — computed by 2s.io","provider":"2s.io unit converter"}},"meta":{"cost":{"usd":0.001,"tier":0},"caller":"x402","version":null,"endpoint":"convert.unit","settlement":{"txHash":"0xefa5b8f7792e85806d6f295db650a68e818fb35cb05204c9b3b63feb78af796d","network":"eip155:8453","success":true}}}},"exampleRequest":{"to":"kilograms","from":"pounds","value":150},"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_d4Mo1oXFz09kK7DueE74o","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0025","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts a numeric value between units of measure across mass, length, volume, area, and temperature dimensions using exact conversion factors.","exampleAgentPrompt":"Convert 150 pounds to kilograms for me — I need the exact answer, not an estimate.","exampleUseCases":null,"resultDescription":"Returns a JSON object with fields: value (original numeric input), from (source unit as recognized), to (target unit as recognized), dimension (e.g. 'mass', 'length'), and result (the converted numeric value using exact conversion factors). Cross-dimension conversion attempts (e.g. kg to meters) return HTTP 400.","failureModes":["Cross-dimension conversion (e.g. kg to meters) returns HTTP 400 with an error message","Unrecognized unit string returns an error — check aliases (kg/kilogram/kgs are all valid)","Non-numeric value parameter causes a bad request error","Missing required query parameter (value, from, or to) returns a 400-level error"],"whenToPreferThis":"Choose this endpoint when you need exact, deterministic unit conversion results rather than LLM-approximated values — especially in CPG, ETL pipelines, scientific calculations, or any context where precision matters. Prefer this over asking an LLM to convert units directly when accuracy is critical.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:46:42.822Z","isFirstParty":false}