Surface map
Preferred base URL:
https://memex.garden/api
Core operations
Search saved content
- REST route:
POST https://memex.garden/api/search - Also accepted:
POST https://memex.garden/api/search-content - MCP tool:
search_content - Auth: Authentication
- Response contract: Response shape
Parameters
Search behavior
rawdefaults tofalse, which returns the compact, token-efficient response shape with consistent top-leveltype,url,createdAt,title?,text, and optional slimmedia.- Set
raw: trueto receive the original machine-readable response withresults,extraEntities,referencesByResultId,referencedEntities, andreferencedTags. - If your client exposes response options named
llmandfull, usellmwhen you want the default compact response (raw: falseor omitted), and usefullwhen you want the machine-readable response (raw: true). - Search responses include direct references for annotation and chat-thread results by default.
- Search result entities include a resolved
urlwhenever Memex can derive a stable source URL. Prefer that field for citations and references. includeTagsadds related tag entities and tag IDs toreferencesByResultId.- In
raw: true,includeNotesadds anannotationsarray on each matched result. Each note includes compiledtext,resolvedReferences, and areferencesfield. Thatreferencesfield contains the note’s direct reference entities, and if one of those direct references is itself an annotation, that nested annotation includes its ownreferencesone level deeper. - In
raw: false,includeNotesaddsuser_noteson each compact result in theresultsarray. Each note is precompiled into YAML text with its own compactreferencesobject. - Raw annotation and chat-thread references are resolved from both
reference_content_idsandmemex-referencenodes found inside annotation JSON content or chat-thread message JSON content. - Search responses report charges directly in USD micros through
usageMicrosChargedand the remaining dollar-denominated balance throughremainingUsageBalance. - Compact
raw=falserequests default reranking on when the query is eligible for rerank. Rawraw=truerequests default reranking off unless you explicitly passenableRerank: true. - Search requests currently report
usageMicrosCharged: 0. - Unsupported
contentTypesvalues are rejected with an error that includes the supported values. - Omitting both
feedIdsandfeedScopesearches the full library, not only feed-sourced content.
LLM vs full response options
Use the same search route for both response modes:llmresponse: omitrawor set"raw": false. This is the default and is best for agent prompts, summaries, and direct LLM context because results are compact and normalized.fullresponse: set"raw": true. This is best for programmatic processing because it preserves the full result graph, includingextraEntities,referencesByResultId,referencedEntities, andreferencedTags.
Feed-focused search
UsePOST /list-feeds or MCP list_subscribed_feeds to fetch feed IDs first.
Search one feed:
Available contentTypes values
These are the exact persisted content_entity.type values accepted by POST /search, POST /search-content, and the MCP search_content tool:
web, pdf, youtube, twitter, instagram, tiktok, facebook, linkedin, pinterest, reddit, chatgpt, claude, annotation, image, transcribedMedia, audioRecording, selector, chatThread, twitterProfile, subreddit, youtubeChannel
Example:
Save content or a public URL
- REST route:
POST https://memex.garden/api/save-content-entity - URL-only REST route:
POST https://memex.garden/api/save-content-by-url - MCP tool:
save_content_by_url - Auth: Authentication
- Response contract: Response shape
Parameters
URL-save payload:
Behavior notes:
- Tag names are trimmed and deduplicated.
- For normal web URLs without
html, Memex fetches the page body itself. - Pass
data.urlfor structured saves, orurlfor URL-only saves.
Create a public sharing link
- REST route:
POST https://memex.garden/api/ensure-shared-library-entry-link - MCP tool:
create_sharing_link - Auth: Authentication
- Response contract: Response shape
REST payload:
MCP example:
shareUrl: full Memex URL for the public share linkpublicToken: underlying public invite tokenaccess: requested API access value, eithervieworcollaborateaccessMode: stored Memex access mode
List public sharing links
- REST route:
POST https://memex.garden/api/list-shared-library-entry-links - MCP tool:
list_sharing_links - Auth: Authentication
- Response contract: Response shape
REST payload:
MCP example:
View endpoints
Views are saved search scopes. Use them to define a reusable subset of a Memex library, list the caller’s accessible scopes, then run search constrained to one view.POST /create-view
- Full URL:
https://memex.garden/api/create-view - Auth: authenticated user
- Used for: creating a saved view owned by the caller
scope.expression can be one of:
Example:
- Returns
view. view.idis the value to pass asviewIdto/execute-view-search.defaults.sortByapplies when a view search request omitssortBy.defaults.includeNotescontrols whether scoped search returns attached notes.
POST /list-views
- Full URL:
https://memex.garden/api/list-views - Auth: authenticated user
- Used for: listing views the caller owns or can access through sharing
- Returns
views: ViewListItem[]. - Each view includes
id,title,description,scope,createdAt,updatedAt, andaccessRole. accessRoleisowner,viewer, orwriter.- Returns
tagEntitiesfor tag IDs referenced by the listed view scopes.
POST /execute-view-search
- Full URL:
https://memex.garden/api/execute-view-search - Auth: authenticated user for
viewId, or no auth when using a public shared viewtoken - Used for: searching only inside the content matched by a saved view
- Response contract: the full/raw
/searchresponse shape from Response shape
POST /execute-view-search always returns the full response shape. If you
want the LLM-ready compact response for a private view, call POST /search
with viewIds: ["view_id"] and omit raw or set raw: false. Use raw: true for the full response.
Authenticated view example:
- The search is first constrained to content matched by the view’s saved expression.
tagIds,contentTypes, andtimeRangeonly narrow the view result set further.- If the scoped view contains no matching content, the response uses the raw search shape with an empty
resultsarray.
Content endpoints
POST /get-available-tag-names
- Full URL:
https://memex.garden/api/get-available-tag-names - Auth: authenticated user
- Used for: fetching the caller’s available tag names for autocomplete, filtering, or agent prompts
- Returns
tagNames: string[]. - Names are deduplicated case-insensitively and sorted alphabetically.
- Includes ordinary tags and any user-available special tags.
execute_action:
tags and the compatibility
tagNames list. Pass input.query to filter case-insensitively or
input.limit to request a bounded result set.
POST /list-auto-tagging-rules
- Full URL:
https://memex.garden/api/list-auto-tagging-rules - Auth: authenticated user
- Used for: reading the caller’s auto-tagging rule configuration
- Returns
rules, an array of auto-tagging rules. - Rule fields include
id,tag_id,add_tag_ids,enabled, source flags,text_queries,ai_prompt,content_types,feed_ids, andcondition_expression.
POST /create-auto-tagging-rule
- Full URL:
https://memex.garden/api/create-auto-tagging-rule - Auth: authenticated user
- Used for: creating an auto-tagging rule for one or more existing tag IDs
- Returns
ruleId. - Provide
tag_idor at least oneadd_tag_idsvalue. - If omitted,
enableddefaults tofalse.
POST /list-feeds
- Full URL:
https://memex.garden/api/list-feeds - Auth: authenticated user
- Used for: listing the caller’s subscribed RSS and YouTube feeds
- Returns
feeds: FeedListItem[]. - Feed items include IDs, source URLs, display metadata, read-state timestamps, visibility, status, and initial import progress when present.
- Only subscriptions owned by the authenticated user are returned.
POST /list-handoffs
- Full URL:
https://memex.garden/api/list-handoffs - MCP tool:
list_handoffs - Auth: authenticated user
- Used for: listing handoffs across statuses, readiness states, or time frames
status and readyOnly are omitted, this endpoint returns handoffs across
every status and approval state. Use status: "pending" for a normal poll that
excludes previously processed handoffs while still showing both approved and
unapproved items.
Pending handoffs:
- Returns
handoffs: Handoff[]. - Handoffs are operational queue records, not content entities.
- This endpoint does not mark handoffs as processed.
Account and billing helper endpoints
POST /agent-create-user
- Full URL:
https://memex.garden/api/agent-create-user - Auth:
x-agent-service-token - Used for: agent-assisted signup on behalf of a human
POST /get-available-plans
- Full URL:
https://memex.garden/api/get-available-plans - Auth: none
- Used for: fetching the live pricing catalog before checkout
POST /checkout
- Full URL:
https://memex.garden/api/checkout - Auth:
X-Api-Key: <apiKey>or an accepted Memex bearer token - Used for: buying one-time credit plans from an agent runtime
Use
/checkout for one-time plans. For subscription plans, send the user to
https://memex.garden/pricing.
MCP protocol request shape
MCP requests go to:https://memex.garden/api/mcp
List tools
Call a tool
Related docs
- Auth and signup: Authentication
- NPM client: SDK
- Credit purchase flow: Buy credits
- Parsed response contracts: Response shape
- Agent-facing overview: MCP

