{"uid":"cap_HinRAQVdicP2aGGgkRvj1","slug":"delx-commerce-string-index-of-lookup-aab60f82","name":"Delx Commerce — String Index-Of Lookup","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/index-of?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"Input field: text."},"needle":{"type":"string","description":"Input field: needle."}}},"responseSchema":{"type":"json","example":{"found":true,"index":6,"schema":"delx/util-index-of/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_r6PFqAu3TXXfUF6E0LmIj","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":"Returns the index position of a needle substring within a text string, or indicates not found","exampleAgentPrompt":"Find the position of the word 'error' in this log line: 'INFO 2024-01-15 error: disk full at /var/log' — I need to know where it starts.","exampleUseCases":[{"title":"Log parsing substring search","prompt":"I have this log message: 'WARNING: connection timeout at endpoint /api/health' — can you find where the word 'timeout' starts in that string?"},{"title":"Template variable position detection","prompt":"In the template string 'Hello {{name}}, your order {{id}} is ready', find the index of '{{name}}' so I know where to begin substituting."},{"title":"CSV field boundary detection","prompt":"Given the CSV row 'Alice,30,Engineer,New York', find the index of the third comma so I can split out the last field."}],"resultDescription":"Returns a JSON object with a boolean 'found' field indicating whether the needle was located, an 'index' integer giving the zero-based position of the first occurrence within the text (e.g. 6), and a 'schema' string identifying the response version (delx/util-index-of/v1).","failureModes":["Missing 'text' or 'needle' fields returns an error","Empty needle or text may produce undefined behavior","Payment failure via x402 will block the request","Very long strings may exceed request size limits"],"whenToPreferThis":"Choose this endpoint when an AI agent needs a verifiable, pay-per-use string index-of operation without signing up for an account, particularly in crypto-native or x402-compatible payment workflows on Base or Solana. Useful when deterministic string position lookup is needed as a composable microservice step in an agent pipeline.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:40.821Z","isFirstParty":false,"canonicalSlug":"delx-commerce-string-index-of-lookup-aab60f82"}