## Workflow Search

`search.workflow_search(SearchWorkflowSearchParams**kwargs)  -> SyncSearchHitsOffset[SearchWorkflowSearchResponse]`

**post** `/search/workflows`

Search for workflows.
At least one of the following fields must have a value: `query` or `filter`.

### Parameters

- `original_assets: Optional[bool]`

  If set to true, returns the original asset without transformation

- `project_id: Optional[str]`

  The projectId used for ownership resource management. Either to assert ownership or to set the owner of the resource(s)

- `filter: Optional[str]`

  Filter queries by an attribute's value

- `hits_per_page: Optional[float]`

  Maximum number of documents returned for a page. Must be used with `page`.

- `limit: Optional[float]`

  Maximum number of documents returned. Must be used with `offset`.

- `offset: Optional[float]`

  Number of documents to skip. Must be used with `limit`. Starts from 0.

- `page: Optional[float]`

  Request a specific page of results. Must be used with `hitsPerPage`.

- `public: Optional[bool]`

  Search for public workflows not necessarily belonging to the current `ownerId`

- `query: Optional[str]`

  A string used for querying search results.

- `query_semantic_ratio: Optional[float]`

  Query embedding for hybrid search, if possible

- `sort_by: Optional[Sequence[str]]`

  Sort the search results by the given attributes. Each attribute in the list must be followed by a colon (`:`) and the preferred sorting order: either ascending (`asc`) or descending (`desc`).

  Example: `['createdAt:desc']`

### Returns

- `class SearchWorkflowSearchResponse: …`

  - `id: str`

    Unique identifier for the workflow (e.g., "workflow_abc123")

  - `author_id: str`

    User ID of the workflow creator/author

  - `collection_ids: List[str]`

    Array of collection IDs this workflow belongs to

  - `created_at: str`

    Creation timestamp in ISO 8601 format (e.g., "2025-01-16T11:19:41.579Z")

  - `description: str`

    Full description of the workflow

  - `name: str`

    Display name of the workflow

  - `owner_id: str`

    Project ID of the workflow owner

  - `privacy: str`

    Privacy setting of the workflow ("public", "private", or "unlisted")

  - `status: str`

    Status of the workflow (e.g., "ready", "draft", "deleted")

  - `tags: List[str]`

    Array of user-assigned tags for categorization

  - `team_id: str`

    Team ID of the workflow owner

  - `updated_at: str`

    Last modification timestamp in ISO 8601 format (e.g., "2025-01-16T11:19:41.579Z")

  - `after: Optional[After]`

    After image information for the workflow

    - `asset_id: str`

      ID of the asset used as after image

    - `url: str`

      Signed URL of the after image

  - `before: Optional[Before]`

    Before image information for the workflow

    - `asset_id: str`

      ID of the asset used as before image

    - `url: str`

      Signed URL of the before image

  - `score: Optional[float]`

    Score assigned to the workflow based on usage and popularity

  - `short_description: Optional[str]`

    Short description of the workflow

  - `thumbnail: Optional[Thumbnail]`

    Thumbnail image information for the workflow

    - `asset_id: str`

      ID of the asset used as thumbnail

    - `url: str`

      Signed URL of the thumbnail

### Example

```python
import os
from scenario_sdk import Scenario

client = Scenario(
    api_key=os.environ.get("SCENARIO_SDK_API_KEY"),  # This is the default and can be omitted
    api_secret=os.environ.get("SCENARIO_SDK_API_SECRET"),  # This is the default and can be omitted
)
page = client.search.workflow_search()
page = page.hits[0]
print(page.id)
```

#### Response

```json
{
  "hits": [
    {
      "id": "id",
      "authorId": "authorId",
      "collectionIds": [
        "string"
      ],
      "createdAt": "createdAt",
      "description": "description",
      "name": "name",
      "ownerId": "ownerId",
      "privacy": "privacy",
      "status": "status",
      "tags": [
        "string"
      ],
      "teamId": "teamId",
      "updatedAt": "updatedAt",
      "after": {
        "assetId": "assetId",
        "url": "url"
      },
      "before": {
        "assetId": "assetId",
        "url": "url"
      },
      "score": 0,
      "shortDescription": "shortDescription",
      "thumbnail": {
        "assetId": "assetId",
        "url": "url"
      }
    }
  ],
  "limit": 0,
  "offset": 0,
  "estimatedTotalHits": 0,
  "hitsPerPage": 0,
  "page": 0,
  "totalHits": 0,
  "totalPages": 0
}
```
