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 included audiences or target groups).
                - Native targeting also carries audienceIds, targetGroupIds and resolvedFrom with the attached group names and member audience ids. Target group criteria supply that group's geo; its exclusion criteria are never included in the targeted country list.
                - summary: {countries[], unresolvedIds[], partial}
                - query: {countryFilter, scanned, matched, unreadable[]}
                - limitations: []

                READING THE RESULT - these three distinctions are the whole point:
                - countries: [] is not evidence that no audience is attached. Check audienceIds, targetGroupIds and resolvedFrom. A target group can be attached without a direct audience id. resolvedFrom.countrySource member_audience identifies countries derived from its included member audiences when the group has only non-country location criteria. targeting.resolved false means its geographic scope could NOT BE fully READ, including a native city or region whose country could not be derived. Never report that as no audience or no targeting.
                - 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

Request template, not a complete runnable example. Replace placeholders, empty objects, arrays, and zero values with valid account-specific inputs. Read required fields and nested constraints in the full schema. Confirm the account, connected channels, and referenced assets before calling a write tool.

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

Recorded 2026-09-05 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:

Browse the tool catalog · machine-readable index