Static Ads Lab
API ReferenceSwipe filesV1Swipe filesSearch

Search swipe files

Filtered vector search. The text query is embedded and cosine-matched against swipe file image embeddings, optionally filtered by industry, ad_format, and aspect_ratio. Only ready swipe files are returned. This is a read operation and requires the swipe_files:read scope.

POST
/v1/swipe-files/search
X-API-Key<token>

API key for authentication. Include in the X-API-Key header.

In: header

querystring

Natural-language query. Embedded and cosine-matched against swipe file image embeddings.

Length1 <= length
industry?string & array<string>

Restrict results to one or more industries. Pass a string or an array of strings; multiple values match any.

ad_format?string & array<string>

Restrict results to one or more ad formats. Pass a string or an array of strings; multiple values match any.

aspect_ratio?string & array<string>

Restrict results to one or more aspect ratios. Pass a string or an array of strings; multiple values match any.

data_source_ids?array<string>

Restrict managed results to these subscribed data sources. Omit for all subscribed sources; pass an empty array to exclude managed designs entirely.

include_own?boolean

Whether to include your organization's own uploads. Defaults to true.

limit?number

Maximum number of results to return (1-100, default 20).

Default20
Range1 <= value <= 100

Response Body

curl -X POST "https://api.staticadslab.com/v1/swipe-files/search" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "minimalist beige flatlay"
  }'
{
  "data": [
    {
      "id": "sf_a1b2c3d4e5f67890",
      "image_url": "https://cdn.staticadslab.com/swipe-files/sf_abc.png",
      "thumbnail_url": "string",
      "width": 1080,
      "height": 1080,
      "aspect_ratio": "1:1",
      "industry": "Apparel & Accessories",
      "ad_format": "Sale",
      "source": "upload",
      "is_managed": false,
      "status": "ready",
      "error": "string",
      "created_at": "2026-07-03T12:00:00.000Z",
      "updated_at": "2026-07-03T12:00:00.000Z",
      "similarity": 0.82
    }
  ],
  "meta": {
    "request_id": "req_a1b2c3d4e5f67890",
    "timestamp": "2026-03-27T12:00:00.000Z"
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request body",
    "details": [
      {
        "field": "string",
        "message": "string"
      }
    ]
  },
  "meta": {
    "request_id": "req_a1b2c3d4e5f67890",
    "timestamp": "2026-03-27T12:00:00.000Z"
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request body",
    "details": [
      {
        "field": "string",
        "message": "string"
      }
    ]
  },
  "meta": {
    "request_id": "req_a1b2c3d4e5f67890",
    "timestamp": "2026-03-27T12:00:00.000Z"
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request body",
    "details": [
      {
        "field": "string",
        "message": "string"
      }
    ]
  },
  "meta": {
    "request_id": "req_a1b2c3d4e5f67890",
    "timestamp": "2026-03-27T12:00:00.000Z"
  }
}