Maton

Search Functions

GET/functions/search

Authorization

bearerAuth
AuthorizationBearer <token>

Your Maton API key, sent as Authorization: Bearer <MATON_API_KEY>. Create one at https://maton.ai/settings.

In: header

Query Parameters

q?string

Search query. Bare text ranks on name and description; "..." greps code literally; /.../ greps code as a regular expression.

owner?string

Whose functions to search. ALL covers every account's PUBLIC functions.

Default"SELF"
Value in"SELF" | "ALL"
visibility?string

Filter by visibility. Must be PUBLIC (or omitted) when owner=ALL.

Value in"PRIVATE" | "PUBLIC" | "UNLISTED"
case?string

Case sensitivity of a grep query. auto is case-sensitive only when the pattern contains an uppercase letter.

Default"auto"
Value in"auto" | "yes" | "no"
context?integer

Number of context lines to return around each grep hit.

Default0
limit?integer

Maximum number of functions to return (max 100).

Default25
Rangevalue <= 100

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET \  "https://api.maton.ai/functions/search?q=gmail%20send" \  -H "Authorization: Bearer $MATON_API_KEY"
{
  "query": "\"maton.google_mail.message.send\"",
  "mode": "literal",
  "count": 1,
  "truncated": false,
  "functions": [
    {
      "function_id": "7c1e2f3a-9b4d-4c8e-a1f2-3b4c5d6e7f80",
      "name": "my-fn",
      "description": "Sends a welcome email via Gmail.",
      "runtime": "python3.12",
      "visibility": "PRIVATE",
      "account_id": "b3f6c9d2-4a1e-4f8b-9c0d-1e2f3a4b5c6d",
      "version": 3,
      "network_policy": "ALLOW_ALL",
      "url": "https://my-fn-3k9xq2v.maton.app",
      "star_count": 0,
      "view_count": 0,
      "created_at": "2026-08-20T18:11:04.512331Z",
      "updated_at": "2026-08-31T22:40:15.883210Z",
      "hits": [
        {
          "path": "main.py",
          "line": 12,
          "text": "    maton.google_mail.message.send(to=\"alice@example.com\", subject=\"hi\", body=\"hello\")",
          "before": [],
          "after": []
        }
      ],
      "hit_count": 1
    }
  ]
}
{
  "message": "Invalid app name.",
  "type": "Bad Request",
  "code": 400
}
{
  "message": "Invalid API key.",
  "type": "Unauthorized",
  "code": 401
}
{
  "message": "Too many requests.",
  "type": "Too Many Requests",
  "code": 429
}
{
  "message": "Internal server error.",
  "type": "Internal Server Error",
  "code": 500
}