{"uid":"cap_NA6Rkto16TZoKfCNDq5UC","slug":"one-engine-object-size-74bf6ec8","name":"ONE Engine Object Size","description":"Low-cost pay-per-call utility APIs for autonomous agents using x402 on Base.","url":"https://one-search.one-engine.workers.dev/v1/object/size?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"value":{"type":"object"}}},"responseSchema":{"type":"json","example":{"count":2}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0009","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.0009/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0009","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0009","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_6N14LqUSnqV_ONLKMgWC7","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0009","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the number of properties (keys) in a given JSON object.","exampleAgentPrompt":"How many properties does this object have: {\"name\": \"Alice\", \"age\": 30, \"city\": \"NYC\"}? Use ONE Engine to count the keys for me.","exampleUseCases":[{"title":"Validate incoming API payload size","prompt":"Check how many fields are in this API response object before I process it — I want to make sure it has at least 5 properties: {\"id\":1,\"name\":\"Test\",\"status\":\"active\",\"created\":\"2024-01-01\",\"type\":\"user\"}."},{"title":"Dynamic form field count check","prompt":"I have a user-submitted form object and I need to know how many fields they filled in — can you count the properties in this object: {\"firstName\":\"Bob\",\"email\":\"bob@example.com\",\"phone\":\"555-1234\"}?"},{"title":"Agent memory slot counting","prompt":"My agent state object keeps growing — can you tell me how many keys are currently in this state blob so I know if I'm approaching my limit: {\"task\":\"search\",\"step\":3,\"result\":\"done\",\"context\":\"sales\",\"user\":\"alice\",\"timestamp\":\"now\"}?"}],"resultDescription":"Returns a JSON object with a `count` field containing the integer number of top-level properties in the submitted object (e.g. {\"count\": 2}).","failureModes":["Non-object input (e.g. array or primitive) may return an unexpected count or error","Missing or malformed `value` field in the request body may result in a 400 error","Empty object returns count of 0, which is valid but may be unexpected","Network or payment failure (x402) results in a 402 Payment Required response"],"whenToPreferThis":"Choose this endpoint when you need a fast, cheap, single-call utility to count the number of top-level keys in a JSON object without running local code. Ideal for AI agents that need lightweight introspection of dynamic payloads without spinning up a code execution environment. At $0.0009 USDC per call, it is cost-effective for high-frequency agent workflows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:44:15.218Z","isFirstParty":false,"canonicalSlug":"one-engine-object-size-74bf6ec8"}