{"uid":"cap_OCUiiZJLmD96nxB9kQsBw","slug":"delx-commerce-parse-float-safe-52468aae","name":"Delx Commerce — Parse Float Safe","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/parse-float-safe?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"Input field: text."},"default":{"type":"integer","description":"Input field: default."}}},"responseSchema":{"type":"json","example":{"ok":true,"value":12.5,"schema":"delx/util-parse-float-safe/v1"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_tAqkLgFtgm3ebpDZMi2WK","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Safely parses a string into a floating-point number, returning a default integer value if parsing fails","exampleAgentPrompt":"Parse the text '12.5kg' into a float for me, and if it can't be parsed, return 0 as the default.","exampleUseCases":[{"title":"Parse user-entered price input","prompt":"A user typed '9.99' into a price field — can you safely parse that into a float and use 0 as the fallback if it's not a valid number?"},{"title":"Extract numeric sensor reading","prompt":"I have a sensor reading string like '23.7°C' — parse it into a float value for me, falling back to -1 if it can't be converted."},{"title":"Validate form field before calculation","prompt":"Before I run my budget calculation, parse the input string '1,200.50' into a float and return 0 as the default if parsing fails."}],"resultDescription":"Returns a JSON object with an 'ok' boolean indicating success, a 'value' field containing the parsed float (or the provided default if parsing failed), and a 'schema' identifier string ('delx/util-parse-float-safe/v1').","failureModes":["Text is empty or null — may return default value with ok:false","Default value not provided — API may reject or use a built-in fallback","Non-numeric text with complex formatting may fail to parse and return default","Payment failure via x402 — call not processed"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call float parsing utility that handles malformed or invalid numeric strings gracefully without throwing exceptions, especially in agent pipelines where unreliable user input or scraped text must be converted to numbers safely. It is preferable to implementing custom parsing logic when reliability and a verifiable result schema matter.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T18:13:14.466Z","isFirstParty":false,"canonicalSlug":"delx-commerce-parse-float-safe-52468aae"}