Redis · Example Payload

Redis Set Get Example

Basic Redis SET and GET operations

CacheDatabaseIn-MemoryKey-Value StoreNoSQLOpen-SourceStreaming

Redis Set Get Example is an example object payload from Redis, with 2 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

descriptionexamples

Example Payload

redis-set-get-example.json Raw ↑
{
  "description": "Basic Redis SET and GET operations",
  "examples": [
    {
      "operation": "SET",
      "description": "Store a string value with optional expiry",
      "command": "SET user:1234:name 'Alice' EX 3600",
      "explanation": "Sets key 'user:1234:name' to 'Alice' with a 1-hour TTL.",
      "response": "OK"
    },
    {
      "operation": "GET",
      "description": "Retrieve a string value",
      "command": "GET user:1234:name",
      "explanation": "Returns the string value for the key.",
      "response": "Alice"
    },
    {
      "operation": "MSET/MGET",
      "description": "Set and get multiple keys at once",
      "set_command": "MSET user:1:name Alice user:2:name Bob user:3:name Carol",
      "get_command": "MGET user:1:name user:2:name user:3:name",
      "set_response": "OK",
      "get_response": ["Alice", "Bob", "Carol"]
    },
    {
      "operation": "INCR",
      "description": "Atomic increment counter",
      "command": "INCR page:views:homepage",
      "explanation": "Atomically increments the integer stored at the key. Creates key if absent.",
      "response": 1
    }
  ]
}

Work with this as data

Every example here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for examples

4 MCP tools reach this
  • find_examplesBrowse and filter every example in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This example
curl "https://apis.io/api/v1/examples/redis-set-get-example"
All examples
curl "https://apis.io/api/v1/examples?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.