{"uid":"cap_VfcS7liuqw4as_cpzlPhb","slug":"delx-commerce-safe-integer-parser-5ec08981","name":"Delx Commerce — Safe Integer Parser","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-int-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":42,"schema":"delx/util-parse-int-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_NTvuC57o636Tmg7tv28Ci","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 an integer, returning a fallback default value if parsing fails, with verifiable pay-per-result delivery.","exampleAgentPrompt":"Parse the text '42abc' into an integer safely, and if it can't be parsed, use 0 as the default.","exampleUseCases":[{"title":"Sanitize user-submitted numeric input","prompt":"I'm getting form input from users and some fields like quantity might be things like '3' or 'three' or just garbage — can you safely parse '3' to an integer and fall back to 1 if it's not valid?"},{"title":"Extract integer from mixed-content string","prompt":"I have this string '  99 items' coming from a scraper — can you safely pull the integer out of it and use -1 as the fallback if nothing parseable is found?"},{"title":"Validate config value before pipeline step","prompt":"Before I run the next step in my workflow, I need to confirm that the config value 'timeout_ms' which is currently '500' is a valid integer — parse it safely and use 30 as the default if it's not."}],"resultDescription":"Returns a JSON object with an 'ok' boolean indicating parse success, a 'value' integer (either the parsed result or the provided default), and a 'schema' string identifying the response format as 'delx/util-parse-int-safe/v1'.","failureModes":["Missing 'text' field returns an error response","Non-integer default value causes schema validation failure","Payment failure via x402 prevents execution","Extremely large numeric strings may overflow integer bounds"],"whenToPreferThis":"Choose this endpoint when you need a guaranteed non-crashing integer parse with an explicit fallback value, especially in agent pipelines where input strings may be malformed or user-provided, and you want verifiable pay-per-result execution without API key setup.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:54:08.189Z","isFirstParty":false,"canonicalSlug":"delx-commerce-safe-integer-parser-5ec08981"}