> ## 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.

> [!NOTE]
>
> Tool ID: `polymarket_search`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
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={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute polymarket_search --input '{
  "q": "software companies hiring engineers"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "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 describe 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={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "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.

> [!NOTE]
>
> This output schema is too large for an inline display. Read the complete live contract with `deepline describe polymarket_search --json`.

## 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](https://deepline.com/docs/providers/polymarket/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


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