> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Polymarket: Search

> Finding prediction markets by keyword; returns events with their nested markets, current outcome prices, and token ids. Polymarket Search reference includes.

Finding prediction markets by keyword; returns events with their nested markets, current outcome prices, and token ids.

<Info>
  Tool ID: `polymarket_search`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'polymarket_search',
  {
    "q": "software companies hiring engineers"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={null}
deepline tools execute polymarket_search --input '{
  "q": "software companies hiring engineers"
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "events": [
      {
        "id": "id_123",
        "ticker": "example",
        "slug": "example"
      }
    ],
    "tags": [
      {
        "id": "id_123",
        "label": "example",
        "slug": "example"
      }
    ],
    "profiles": [
      {
        "id": "id_123",
        "name": "Example",
        "user": 1
      }
    ]
  }
}
```

Use `deepline tools get polymarket_search --json` for the latest machine-readable contract.

## Input reference

Search markets, events, and profiles

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.q` | `string` | Yes | — | — |
| `payload.cache` | `boolean` | No | — | — |
| `payload.events_status` | `string` | No | — | — |
| `payload.limit_per_type` | `integer` | No | — | — |
| `payload.page` | `integer` | No | — | — |
| `payload.events_tag` | `array` | No | — | — |
| `payload.keep_closed_markets` | `integer` | No | — | — |
| `payload.sort` | `string` | No | — | — |
| `payload.ascending` | `boolean` | No | — | — |
| `payload.search_tags` | `boolean` | No | — | — |
| `payload.search_profiles` | `boolean` | No | — | — |
| `payload.recurrence` | `string` | No | — | — |
| `payload.exclude_tag_id` | `array` | No | — | — |
| `payload.optimized` | `boolean` | No | — | — |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Search markets, events, and profiles",
    "properties": {
      "q": {
        "type": "string"
      },
      "cache": {
        "type": "boolean"
      },
      "events_status": {
        "type": "string"
      },
      "limit_per_type": {
        "type": "integer"
      },
      "page": {
        "type": "integer"
      },
      "events_tag": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "keep_closed_markets": {
        "type": "integer"
      },
      "sort": {
        "type": "string"
      },
      "ascending": {
        "type": "boolean"
      },
      "search_tags": {
        "type": "boolean"
      },
      "search_profiles": {
        "type": "boolean"
      },
      "recurrence": {
        "type": "string"
      },
      "exclude_tag_id": {
        "type": "array",
        "items": {
          "type": "integer"
        }
      },
      "optimized": {
        "type": "boolean"
      }
    },
    "required": [
      "q"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.events` | `array \| null` | No | — | — |
| `result.data.events[].id` | `string` | No | — | — |
| `result.data.events[].ticker` | `string \| null` | No | — | — |
| `result.data.events[].slug` | `string \| null` | No | — | — |
| `result.data.events[].title` | `string \| null` | No | — | — |
| `result.data.events[].subtitle` | `string \| null` | No | — | — |
| `result.data.events[].description` | `string \| null` | No | — | — |
| `result.data.events[].resolutionSource` | `string \| null` | No | — | — |
| `result.data.events[].startDate` | `string \| null` | No | — | Format: `date-time`. |
| `result.data.events[].creationDate` | `string \| null` | No | — | Format: `date-time`. |
| `result.data.events[].endDate` | `string \| null` | No | — | Format: `date-time`. |
| `result.data.events[].image` | `string \| null` | No | — | — |
| `result.data.events[].icon` | `string \| null` | No | — | — |
| `result.data.events[].active` | `boolean \| null` | No | — | — |
| `result.data.events[].closed` | `boolean \| null` | No | — | — |
| `result.data.events[].archived` | `boolean \| null` | No | — | — |
| `result.data.events[].new` | `boolean \| null` | No | — | — |
| `result.data.events[].featured` | `boolean \| null` | No | — | — |
| `result.data.events[].restricted` | `boolean \| null` | No | — | — |
| `result.data.events[].liquidity` | `number \| null` | No | — | — |
| `result.data.events[].volume` | `number \| null` | No | — | — |
| `result.data.events[].openInterest` | `number \| null` | No | — | — |
| `result.data.events[].sortBy` | `string \| null` | No | — | — |
| `result.data.events[].category` | `string \| null` | No | — | — |
| `result.data.events[].subcategory` | `string \| null` | No | — | — |
| `result.data.events[].isTemplate` | `boolean \| null` | No | — | — |
| `result.data.events[].templateVariables` | `string \| null` | No | — | — |
| `result.data.events[].published_at` | `string \| null` | No | — | — |
| `result.data.events[].createdBy` | `string \| null` | No | — | — |
| `result.data.events[].updatedBy` | `string \| null` | No | — | — |
| `result.data.events[].createdAt` | `string \| null` | No | — | Format: `date-time`. |
| `result.data.events[].updatedAt` | `string \| null` | No | — | Format: `date-time`. |
| `result.data.events[].commentsEnabled` | `boolean \| null` | No | — | — |
| `result.data.events[].competitive` | `number \| null` | No | — | — |
| `result.data.events[].volume24hr` | `number \| null` | No | — | — |
| `result.data.events[].volume1wk` | `number \| null` | No | — | — |
| `result.data.events[].volume1mo` | `number \| null` | No | — | — |
| `result.data.events[].volume1yr` | `number \| null` | No | — | — |
| `result.data.events[].featuredImage` | `string \| null` | No | — | — |
| `result.data.events[].disqusThread` | `string \| null` | No | — | — |
| `result.data.events[].parentEvent` | `string \| null` | No | — | — |
| `result.data.events[].enableOrderBook` | `boolean \| null` | No | — | — |
| `result.data.events[].liquidityClob` | `number \| null` | No | — | — |
| `result.data.events[].negRisk` | `boolean \| null` | No | — | — |
| `result.data.events[].negRiskMarketID` | `string \| null` | No | — | — |
| `result.data.events[].negRiskFeeBips` | `integer \| null` | No | — | — |
| `result.data.events[].commentCount` | `integer \| null` | No | — | — |
| `result.data.events[].imageOptimized` | `object` | No | — | — |
| `result.data.events[].imageOptimized.id` | `string` | No | — | — |

The table shows the first 50 fields. Use the live contract below for every field.

<Info>
  This output schema is too large to embed without slowing the page. Get the complete live contract with `deepline tools get polymarket_search --json`.
</Info>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Polymarket provider guide](/docs/providers/polymarket/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.