{"uid":"cap_bmD2rOIDNLBqXSDT8-hOm","slug":"2s-kv-store-get-key-58f691e3","name":"2s KV Store — Get Key","description":"The (most) everything API: 575+ pay-per-call endpoints for AI agents — ground-truth data, a full AI gateway, and agent infrastructure (storage, queues, watchers). USDC via x402, no signup, no API keys, and upto billing: pay actual usage, not the quote.","url":"https://2s.io/api/store/kv-get","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"ns":{"type":"string","description":"Namespace the key lives in."},"key":{"type":"string","description":"Key to read."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_6MD_IbPq2qwzT9xN2GrM3","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Reads a value from a namespaced key-value store by key name, returning the stored value and its expiry metadata.","exampleAgentPrompt":"Retrieve the value stored under the key 'session-token' in the namespace 'user-auth' from the 2s key-value store.","exampleUseCases":[{"title":"Restore agent session state","prompt":"Fetch the value stored under key 'agent-state' in namespace 'my-workflow' from the KV store — I need to resume where the agent left off."},{"title":"Read cached API response","prompt":"Get the cached result stored under key 'weather-nyc-2024-06-01' in the 'cache' namespace so I don't have to re-fetch it."},{"title":"Check stored user preference","prompt":"Look up the value for key 'preferred-language' in namespace 'user-prefs-42' from the key-value store and tell me what it says."}],"resultDescription":"Returns a JSON object with ok=true, an items array containing objects with the key name, stored value, and expiresAt timestamp, the total count of matching rows, and source provenance metadata (provider, URL, license).","failureModes":["Key not found — items array is empty, total is 0","Namespace does not exist — empty result set returned","Missing required fields (ns or key) — request rejected with error","Network timeout or upstream storage unavailability — request fails","Expired key — may return empty items if TTL has elapsed"],"whenToPreferThis":"Use this endpoint when you need to read a previously stored value from 2s.io's namespaced key-value store, particularly in agent workflows where you need to retrieve persisted state, cached data, configuration, or agent memory without managing your own storage infrastructure. It is ideal for stateless agents that need lightweight, pay-per-call persistent storage accessible across calls.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:42:46.661Z","isFirstParty":false}