{"uid":"cap_1R57-a0NyF6X1uKt825uh","slug":"delx-index-of-90938f23","name":"Delx Index Of","description":"Find first index of a substring. Call when you need slice boundaries for agent text surgery. Returns index and found flag (-1 if missing) for $0.001 USDC via x402 on Base. No network, no keys, no retention; first-party local JSON only. Results are advisory; the caller owns budgets, auth, and production controls.","url":"https://api.delx.ai/api/v1/x402/index-of","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_8nDGAg532cvPIFRhuUvet","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":"Finds the first index of a substring (needle) within a given text, returning the position and a found flag.","exampleAgentPrompt":"Find the first position of the word 'error' in the string 'The system returned an error on line 42' so I know where to cut the text.","exampleUseCases":[{"title":"Locate delimiter before splitting","prompt":"In the string 'user:admin:1234', find the first index of the colon ':' so I can split the username out correctly."},{"title":"Check if keyword present in log line","prompt":"Tell me if the word 'FAILED' appears in this log line and where: 'Task scheduler FAILED to complete job 99 at 03:00'."},{"title":"Find tag start for text surgery","prompt":"I need to know the index of '<body>' in this HTML snippet so I can insert content right before it: '<!DOCTYPE html><html><head></head><body><p>Hello</p></body></html>'."}],"resultDescription":"Returns a JSON object containing the integer index of the first occurrence of the needle within the text (or -1 if not found), plus a boolean found flag indicating whether the needle was present.","failureModes":["Missing 'text' or 'needle' fields returns a validation error","Empty needle string may return index 0 or an error depending on implementation","Very large text payloads may be rejected or time out","Payment failure via x402 returns a 402 response before processing occurs","Malformed JSON body returns a 400 error"],"whenToPreferThis":"Use this endpoint when an agent needs a quick, cheap, local string-search operation with no external dependencies — especially for finding slice boundaries before doing text surgery, locating delimiters, or confirming substring presence with an exact position. Prefer it over regex or full-text-search endpoints when only a simple first-index lookup is needed and cost/latency must be minimal.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:57:11.738Z","isFirstParty":false}