MMetadata /docs
Docs/Tools/get_campaign_targeting_locations

get_campaign_targeting_locations

Where a campaign actually TARGETS, by channel, with the platform's location ids resolved to country and state names.

Read campaigns

Returns data. Calling it changes nothing, so it is safe in an unattended loop.

What it does

Where a campaign actually TARGETS, by channel, with the platform's location ids resolved to country and state names.

                KEYWORDS: campaign, targeting, location, geo, country, region, where, targets, germany, dach, emea, market, geographic

                WHEN TO USE:
                - "Which campaigns target <country>?" / "Do we run anything in Germany?"
                - "Where is this campaign targeted?" before editing or launching it
                - Any question about geographic TARGETING

                DO NOT ANSWER GEO TARGETING FROM demographic_country_stats. That tool reports where ads were SERVED (delivery); this one reports where they are AIMED. The two disagree routinely, and answering a targeting question from delivery data is how the agent once told an account with 68 Germany campaigns that it had none.

                RETURNS:
                - campaigns: [{campaignId, name, status, channels[], summary}]
                - channels[]: {channel, enabled, geoSource, targeting{resolved, countries[{id,name}], states[], ...}, exclusions}
                  geoSource is "search_ad_location" (Google/Microsoft, held on the channel) or
                  "native_audience" (LinkedIn/Meta/Reddit, held on the attached audience).
                - summary: {countries[], unresolvedIds[], partial}
                - query: {countryFilter, scanned, matched, unreadable[]}
                - limitations: []

                READING THE RESULT - these three distinctions are the whole point:
                - countries: [] means nothing is targeted. targeting.resolved false means it could NOT BE READ. Never report the second as the first.
                - exclusions.readable is ALWAYS false: the platform offers no GET for negative locations. Never state that a campaign excludes, or does not exclude, anywhere.
                - summary.partial true means this answer is incomplete. Say so rather than presenting it as a full list.
                - If `limitations` mentions truncation, you have NOT seen the whole account. Re-call with a higher max_campaigns before answering "there are none".

                PARAMETERS:
                - campaign_ids: specific wizard campaign ids (optional)
                - country_names: filter to campaigns targeting these, e.g. ["Germany"] (optional). Names must match the platform catalog; unmatched names are reported, never silently dropped.
                - max_campaigns: cap when scanning the account (default 25, max 100)

                With neither campaign_ids nor country_names, returns the most recent campaigns up to max_campaigns.

Arguments

ArgumentTypeNotes
campaign_ids array Wizard campaign ids to read. Omit to scan the account.
country_names array Filter to campaigns targeting these countries, e.g. ["Germany", "Austria"].
max_campaigns integer Cap on campaigns read when scanning (default 25, max 100).

Request

curl
curl -s -X POST https://mcp-server.metadata.io/mcp \
  -H "Authorization: $METADATA_PAT" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "MCP-Protocol-Version: 2025-11-25" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_campaign_targeting_locations","arguments":{}}}'

Response

Real, from the production server, in 17166 ms. The full response was 160,938 bytes; this is the first part of it. Values that identify a customer or disclose money are replaced with typed placeholders; keys, types and nesting are exactly as returned.

recorded response
{
 "campaigns": [
  {
   "campaignId": "[number redacted]",
   "name": "[name redacted]",
   "status": "Draft",
   "channels": [
    {
     "channelId": "[number redacted]",
     "channel": "Facebook",
     "enabled": true,
     "exclusions": {
      "readable": false,
      "reason": "[reason redacted]"
     },
     "geoSource": "native_audience",
     "resolvedFrom": [
      {
       "audienceId": "[number redacted]",
       "audienceName": "[audienceName redacted]",
       "type": "NATIVE"
      },
      {
       "audienceId": "[number redacted]",
       "audienceName": "[audienceName redacted]",
       "type": "NATIVE"
      },
      {
       "audienceId": "[number redacted]",
       "audienceName": "[audienceName redacted]",
       "type": "NATIVE"
      }
     ],
     "targeting": {
      "resolved": true,
      "countries": [],
      "states": [],
      "cities": [],
      "geoMarkets": [],
      "targetType": "PRESENCE"
     }
    },
    {
     "channelId": "[number redacted]",
     "channel": "[channel redacted]",
     "enabled": false,
     "exclusions": {
      "readable": false,
      "reason": "[reason redacted]"
     },
     "geoSource": "search_ad_location",
     "targeting": {
      "resolved": true,
      "countries": [
       {
        "id": "[number redacted]",
        "name": "[name redacted]"
       }
      ],
      "states": [],
      "targetType": "PRESENCE"
     }
    },
    {
     "channelId": "[number redacted]",
     "channel": "Instagram",
     "enabled": false,
     "exclusions": {
      "readable": false,
      "reason": "[reason redacted]"
     },
     "geoSource": "native_audience",
     "resolvedFrom": [],
     "targeting": {
      "resolved": true,
      "countries": [],
      "states": [],
      "cities": [],
      "geoMarkets": [],
      "targetType": "PRESENCE"
     },
     "note": "[note redacted]"
    },
    {
     "channelId": "[number redacted]",
     "channel": "LinkedIn",
     "enabled": true,
     "exclusions": {
      "readable": false,
      "reason": "[reason redacted]"
     },
     "geoSource": "native_audience",
     "resolvedFrom": [
      {
       "audienceId": "[number redacted]",
       "audienceName": "[audienceName redacted]",
       "type": "NATIVE"
      },
      {
       "audienceId": "[number redacted]",
       "audienceName": "[audienceName redacted]",
       "type": "NATIVE"
      },
      {
       "audienceId": "[number redacted]",
       "audienceName": "[audienceName redacted]",
       "type": "NATIVE_LINKEDIN"
      }
     ],
     "targeting": {
      "resolved": true,
      "countries": [
       {
        "id": 73,
        "name": "[name redacted]",
        "externalId": "[externalId redacted]"
       },
       {
        "id": 78,
        "name": "[name redacted]",
        "externalId": "[externalId redacted]"
       },
       {
        "id": "[number redacted]",
        "name": "[name redacted]",
        "externalId": "[externalId redacted]"
       },
       {
        "id": 21,
        "name": "[name redacted]",
        "externalId": "[externalId redacted]"
       },
       {
        "id": 72,
        "name": "[name redacted]",
        "externalId": "[externalId redacted]"
       },
       {
        "id": "[number redacted]",
        "name": "[name redacted]",
        "externalId": "[externalId redacted]"
       },
       {
        "id": "[number redacted]",
        "name": "[name redacted]",
        "externalId": "[externalId redacted]"
       },
       {
        "id": 57,
        "name": "[name redacted]",
        "externalId": "[externalId redacted]"
       },
       {
        "id": "[number redacted]",
        "name": "[name redacted]",
        "externalId": "[externalId redacted]"
       },
       {
        "id": "[number redacted]",
        "name": "[name redacted]",
        "externalId": "[externalId redacted]"
       },
       {
        "id": "[number redacted]",
        "name": "[name redacted]",
        "externalId": "[externalId redacted]"
       },

  … truncated

Other campaigns tools:

All 160 tools · machine-readable index