Skip to main content
POST
Search from Public Video Sources
Product: Visual Search Use case: Upload videos and images, auto-index them, then search by natural language, image, or transcript phrase Host: https://api.memories.ai/serve/api/v1 Auth: Authorization: sk-mavi-... (no Bearer prefix)
Use a natural-language query to find relevant clips or audio moments from the pre-indexed public social-media library — no upload required. For image queries see Search Public — by Image; for exact-phrase transcript search see Search Public — by Transcript.

Prerequisites

Request Example

Parameters

string
required
Natural-language search query. Must be non-empty.
string
default:"BY_VIDEO"
What to search. The server-side enum is [BY_CLIP, BY_VIDEO, BY_AUDIO, BY_IMAGE]; only the first three are meaningful here (BY_IMAGE is exposed via the dedicated Search Public — by Image endpoint).
  • BY_VIDEO — video clips (default). BY_CLIP is an accepted alias.
  • BY_AUDIO — spoken-word transcripts (semantic, not exact-match). audio_ts is only populated in the response for this mode.
Unknown values are rejected with code: "0003" and a JSON deserialization error listing the live enum values.
string
default:"TIKTOK"
Platform to search. One of TIKTOK, YOUTUBE, INSTAGRAM. The server does not validate this string — passing an unknown value silently falls back to a default rather than returning an error, so prefer one of the documented values explicitly.
integer
default:"100"
Maximum results to return. Range: 1 – 1000.
string
Minimum similarity score threshold:
  • low — score ≥ 0.15
  • medium — score ≥ 0.225
  • high — score ≥ 0.4
When omitted, no score filter is applied.

Response

string
Public video identifier (typically prefixed with PI-).
string
Public video title or name.
string
Matched segment start time, in seconds.
string
Matched segment end time, in seconds.
string
Transcript text of the segment. Populated for BY_AUDIO searches.
number
Relevance score. Higher is more relevant.
string
GCS bucket of our cached copy of the public video. Omitted when the storage location cannot be resolved.
string
GCS blob (object) path of the cached video. Use it with video_bucket at GET /serve/api/v2/download?bucket=&blob= to fetch the file directly.
string
GCS bucket of the matched keyframe image (BY_CLIP only).
string
GCS blob (object) path of the matched keyframe image.

Notes & Limits

  • Rate limiting: Exceeding the per-account rate limit returns an error. See Rate limits.
  • Billing: Each successful call deducts credits from your account balance.

Authorizations

Authorization
string
header
required

Body

application/json
search_param
string
required

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
Example:

"BY_VIDEO"

type
enum<string>
default:TIKTOK

Source platform to search within.

Available options:
TIKTOK,
YOUTUBE,
INSTAGRAM
top_k
integer
default:100

Maximum number of results to return. Range 1-1000.

Required range: 1 <= x <= 1000
filtering_level
enum<string>

Similarity-score filter. low=0.15, medium=0.225, high=0.4.

Available options:
low,
medium,
high
Example:

"medium"

Response

200 - application/json

Successful response

code
string
Example:

"0000"

msg
string
Example:

"success"

data
object[]
success
boolean
Example:

true

failed
boolean
Example:

false