Skip to content

API

Search videos, authors, hashtags, and comments. The body is JSON, and there is no key. Each endpoint page has the request, a full example, and every column.

Version 1.0.0No keyRead-only

Shared rules

Filters, full text, paging, and errors are the same on every search.

Filters

An empty JSON object is the first page. A column you omit is not filtered. A column value is an object, and an empty object is rejected. Operators on one column are combined. Columns are combined with each other. Setting eq and gt together is valid and may match nothing.

Unknown fields are rejected. A JSON string is not a number. A JSON number is not an id. 1.0 is not an integer. Values are not trimmed.

in takes 1 to 100 items. match takes 1 to 512 characters and rejects @. regex takes 1 to 256 characters. It is an RE2 pattern, case-sensitive unless it includes (?i), and it is matched against the whole stored string.

An id is digits only, from 0 through 18446744073709551615. Leading zeros are accepted and compared as integers. A comparison between two columns is not a filter. Read both values and compare them in your own code.

text
match, eq, neq. The value is a string. match is full text on that field. eq and neq compare the stored string.
string
eq, neq, in, regex. The value is a string, or an array of strings for in. regex is an RE2 pattern against the whole stored string.
bool
eq only. true or false. true is stored as 1 and false as 0.
int
eq, neq, gt, gte, lt, lte, in. An integer, or an array of integers for in. 1.0 is not an integer.
float
eq, neq, gt, gte, lt, lte, in. A number, or an array of numbers for in. A JSON integer is accepted as a float.
id
eq, neq, gt, gte, lt, lte, in. A digit string, or an array of digit strings for in. A JSON number is rejected.

Videos, authors, and hashtags include soft-deleted rows until you set is_deleted. Videos also include moderated rows until you set is_moderated. Comments have no delete flag.

Full text

A top-level match searches every text field on that table. A field match searches only that field. Several matches become one query and are combined. The service does not rewrite the query.

There is no stemming. dance does not match dancing. The index drops the letters a through z, and these words: am, an, and, are, as, at, be, by, for, from, in, is, it, of, on, or, the, to, was, with. A query that is only those words matches nothing. This API does not cap a query at eight terms.

  • # and @ in stored text are indexed both ways. A stored #fyp matches the query fyp. The request still cannot contain @.
  • Apostrophes in stored text are ignored, so it's and its are the same token. HTML is not stripped.
  • t-shirt, t shirt, tee-shirt, and tee shirt match tshirt. make-up matches makeup. tik tok matches tiktok. covid-19 matches covid19. wi-fi matches wifi. e-mail matches email.
  • CJK and Thai are indexed as single characters.
  • weight is the relevance of the current match. It exists only when a match was sent. Sorting by weight without a match is rejected.

Paging

limit
Page size. Default 20. Minimum 1. Maximum 100.
offset
Matching rows to skip. Default 0. offset plus limit cannot exceed 1000.
sort
One to three {field, direction} keys. Direction is asc or desc. Field is a column, or weight when a match is set.
order
With a match and no sort, weight descending, then id ascending. Otherwise id ascending. An explicit sort replaces that and does not add id.
First page
{}

Response

total is how many rows match the filter, before paging. It is not the length of this page. limit and offset are the values after defaults. hits holds at most limit rows, and each row has every column, in catalog order. No rows is still 200, with total 0 and hits empty. 0, an empty string, and -1 stay as stored. They are not turned into null. The response sends Cache-Control: no-store.

Id columns come back as strings, with no leading zeros. Bools are true or false. Ints are JSON integers. Floats are JSON numbers. Text and string columns are JSON strings. Avatars, thumbnails, music titles, and the list of videos on a hashtag are not in this index.

Envelope
{
  "total": 48220,
  "limit": 20,
  "offset": 0,
  "hits": []
}

Errors

If the count or the page fails, the response is the error. There is no partial page.

  • 422The body failed validation. detail is a list of problems. Stable messages include match cannot contain @, match cannot be empty, regex cannot be empty, in cannot be empty, in accepts at most 100 values, offset + limit cannot exceed 1000, weight requires a match, id must be a decimal string, and id is outside uint64.
  • 502The index did not answer, or the payload could not be read. detail is one of Manticore is unavailable., Manticore HTTP 500. with the real status, the error string from the index, Manticore returned an unreadable payload., Manticore row is missing a column., or Manticore row has a bad value.
  • 504The index did not answer within 30 seconds. detail is Manticore timed out.

Videos, MCP, Python, JavaScript.