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

# Search Geo

> Search OpenAI Ads geo targets by name or postal code for campaign targeting

Search OpenAI Ads geo targets by name or postal code for campaign targeting. Returns at most 100 locations across all terms; check metadata for skipped or potentially truncated terms before treating a bulk lookup as complete.

| | |
| - | - |
| **App** | OpenAI Ads |
| **Operation ID** | `openai_ads_search_geo` |
| **Type** | Action |
| **Connection** | `openai_ads` (required) |
| **Credits per run** | 1 |
| **Agent / MCP tool** | Yes |

## Inputs

| Field | Type | Required | Default | Description |
| - | - | - | - | - |
| `search_terms` | string | Yes | - | Location names to search for, separated by commas or newlines (e.g. 'California, New York, United States'). Returns location IDs to use in campaign targeting (openai\_ads\_create\_campaign location\_ids). Terms are searched in order until the combined result limit is reached. Check output metadata for skipped terms and potentially incomplete matches. |
| `limit` | integer | No | `50` | Maximum number of unique locations across all search terms, from 1 to 100. Default: 50. This is a combined limit, not a per-term limit; remaining terms are skipped when it is reached. |

## Output

**Type**: `Dict`

Returns \{metadata, locations} inside output.data. Location rows contain id, type, name, canonical\_name, country\_code, region\_code, parent\_country, parent\_id, and search\_term. Metadata contains partial, warning, limit, returned\_count, searched\_terms, skipped\_terms, and potentially\_truncated\_terms; partial also flags possible API truncation, not just skipped terms.

**Fields**: dynamic (depend on the inputs)

**Example**:

```json theme={"dark"}
{
  "metadata": {
    "partial": false,
    "warning": null,
    "limit": 50,
    "returned_count": 1,
    "searched_terms": [
      "california"
    ],
    "skipped_terms": [],
    "potentially_truncated_terms": []
  },
  "locations": [
    {
      "id": "2000043",
      "type": "region",
      "name": "California",
      "country_code": "US",
      "search_term": "california"
    }
  ]
}
```


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