79trust / 100

Memories Search

by Mem0 Cloud in Search & web

x402 APIPassing, checked 3 h ago

Search your stored memories by meaning, like mem0's search: embeds the query and returns the closest memories with a relevance score from 0 to 1. Only memories stored under the same memory_key (your secret string; required) are searched. filters must name at least one of user_id, agent_id, app_id, run_id. Returns {results:[{id, memory, score, metadata, ...}]}.

POST
https://mem0-cloud.saastemly.com/v3/memories/search
Price
$0.004
per call in USDC
Uptime
100%
last 30 days
Response time
338 ms
634 ms slowest 5%
Last check
Passed
3 h ago, next any minute now

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Status and outage history · Atom feed · Watch with other listings

How to call it

POST https://mem0-cloud.saastemly.com/v3/memories/search

Each call costs $0.004 in USDC on Base, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

POST https://mem0-cloud.saastemly.com/v3/memories/search
content-type: application/json

{
  "filters": {
    "user_id": "alice"
  },
  "memory_key": "mk_7f3a9c1e5b2d48a6b0c4e9d1",
  "query": "where does the user live?",
  "top_k": 5
}

Parameters

ParameterTypeRequiredDescription
filtersobjectYesmem0 filters: at least one of user_id, agent_id, app_id, run_id, each a string, "*" or {"in": [up to 20 strings]}; AND lists of those. OR and NOT are not supported.
memory_keystringYesYour secret: a random string of 16-256 characters that you generate once and keep (also accepted as the X-Memory-Key header). Memories are stored and searched only under its hash, so nobody who lacks it can read them, whatever user_id they send. Lose it and the memories are unreachable.
querystringYesWhat to look for, in natural language (up to 500 characters)
show_expiredbooleanNoInclude memories whose expiration_date has passed (default false)
thresholdnumberNoMinimum relevance score, 0-1 (default 0.1; 0 disables)
top_kintegerNoHow many memories to return, 1-100 (default 10)

Example response

The provider's example. We can't check it without paying.

{
  "results": [
    {
      "agent_id": null,
      "app_id": null,
      "categories": [],
      "created_at": "2026-10-03T09:00:00.000Z",
      "expiration_date": null,
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "memory": "User moved to San Francisco from New York.",
      "metadata": {
        "source": "onboarding"
      },
      "run_id": null,
      "score": 0.82,
      "updated_at": null,
      "user_id": "alice"
    }
  ]
}

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.004.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://mem0-cloud.saastemly.com/v3/memories/search' \
  -H 'content-type: application/json' \
  --data-raw '{"filters":{"user_id":"alice"},"memory_key":"mk_7f3a9c1e5b2d48a6b0c4e9d1","query":"where does the user live?","top_k":5}'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://mem0-cloud.saastemly.com/v3/memories/search' \
  -H 'content-type: application/json' \
  --data-raw '{"filters":{"user_id":"alice"},"memory_key":"mk_7f3a9c1e5b2d48a6b0c4e9d1","query":"where does the user live?","top_k":5}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $0.004 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.004" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.004 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fmem0-cloud.saastemly.com%2Fv3%2Fmemories%2Fsearch&method=POST
const res = await pay("https://mem0-cloud.saastemly.com/v3/memories/search", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "filters": {
      "user_id": "alice"
    },
    "memory_key": "mk_7f3a9c1e5b2d48a6b0c4e9d1",
    "query": "where does the user live?",
    "top_k": 5
  }),
});
console.log(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $0.004 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.004"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.post(
        "https://mem0-cloud.saastemly.com/v3/memories/search",
        json={
            "filters": {
                "user_id": "alice",
            },
            "memory_key": "mk_7f3a9c1e5b2d48a6b0c4e9d1",
            "query": "where does the user live?",
            "top_k": 5,
        },
    )
    print(res.status_code, res.text)

Security scan

No findings

We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed402278 ms$0.004
7 h agoPassed402319 ms$0.004
12 h agoPassed402382 ms$0.004
17 h agoPassed402337 ms$0.004
21 h agoPassed402550 ms$0.004
Show 10 older checks
26 h agoPassed402259 ms$0.004
30 h agoPassed402265 ms$0.004
34 h agoPassed402548 ms$0.004
39 h agoPassed402492 ms$0.004
43 h agoPassed402413 ms$0.004
47 h agoPassed402315 ms$0.004
2 days agoPassed402484 ms$0.004
2 days agoPassed402264 ms$0.004
3 days agoPassed402446 ms$0.004
3 days agoPassed402363 ms$0.004