Documentation Index
Fetch the complete documentation index at: https://api-tools.memories.ai/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- You’re familiar with the concepts described on the Platform overview.
- You have created a memories.ai API key.
Host URL
Endpoint
POST /serve/api/v1/search_public
/serve/api/v1/search_public
Authentication
Pass your API key in the Authorization request header. Requests without a valid API key are rejected.
Content Type
The endpoint expects a JSON body (application/json).
Request Example
import requests
headers = {"Authorization": "<API_KEY>"}
json_body = {
"search_param": "<YOUR_PROMPT>",
"search_type": "BY_VIDEO",
"type": "TIKTOK",
"unique_id": "default",
"top_k": 10,
"filtering_level": "medium"
}
response = requests.post(
"https://api.memories.ai/serve/api/v1/search_public",
headers=headers,
json=json_body
)
print(response.json())
Request Body Example
{
"search_param": "Find sprint race with Usain Bolt",
"search_type": "BY_VIDEO",
"type": "TIKTOK",
"top_k": 3,
"filtering_level": "medium"
}
Request Parameters
The natural-language search query. Must be non-empty.
Search modality. Must be BY_VIDEO or BY_AUDIO. BY_VIDEO is treated as BY_CLIP internally. Sending BY_CLIP or BY_IMAGE is explicitly rejected on this endpoint (use the dedicated clip/image search endpoints instead).
Source platform to search within. One of TIKTOK, YOUTUBE, INSTAGRAM. Defaults to TIKTOK when omitted.
Scope identifier for the authenticated account. Must be non-empty when explicitly provided.
Maximum number of results to return. Must be an integer in the range 1 – 1000 inclusive.
Similarity-score filter strength. One of low, medium, high (corresponds to minimum scores of 0.15, 0.225, 0.4 respectively). When omitted no level filter is applied.
Notes & Limits
- Rate limiting: The endpoint is protected by a per-account public-search rate limit. Exceeding the limit returns an error indicating the request has exceeded the limit.
- Billing: This endpoint is metered — each successful call deducts points from your account balance.
- Unsupported
search_type values on this endpoint:
BY_CLIP → rejected with “Search type BY_CLIP is not supported in this API endpoint. Please use the search_clip endpoint instead.”
BY_IMAGE → rejected with “Search public type BY_IMAGE is not supported in this API endpoint.”
Response Example
{
"code": "0000",
"msg": "success",
"data": [
{
"videoNo": "PI-600947902470296459",
"videoName": "They played in their OPPONENTS jerseys?!?",
"startTime": "23",
"endTime": "27",
"audio_ts": "...matched transcript text...",
"score": 0.7350679636001586
}
],
"success": true,
"failed": false
}
Response Fields
Business status code. 0000 indicates success.
Human-readable status message.
Public video identifier (typically prefixed with PI-).
Matched segment start time, in seconds (as string).
Matched segment end time, in seconds (as string).
Matched audio transcript text (populated for BY_AUDIO).
Relevance score of the match.
Best Practices
- Platform selection: Use the
type parameter to specify the desired dataset (TikTok, YouTube, Instagram).
- Use
top_k: Limit results to the most relevant items for efficiency.
- Filter tuning: Adjust
filtering_level to balance recall and precision (low = broad, high = strict).
- Prompt clarity: Make queries concise and descriptive for optimal retrieval.
Natural-language search query. Must be non-empty.
Example:"Find sprint race with Usain Bolt"
search_type
enum<string>
default:BY_CLIP
Search modality. Only BY_VIDEO and BY_AUDIO are accepted here; BY_CLIP and BY_IMAGE are explicitly rejected. BY_VIDEO is treated as BY_CLIP internally.
Available options:
BY_VIDEO,
BY_AUDIO
type
enum<string>
default:TIKTOK
Source platform to search within.
Available options:
TIKTOK,
YOUTUBE,
INSTAGRAM
Scope identifier for the authenticated account.
Maximum number of results to return. Range 1-1000.
Required range: 1 <= x <= 1000
Similarity-score filter. low=0.15, medium=0.225, high=0.4.
Available options:
low,
medium,
high