Fetching Criterions for a Campaign or AdGroup RRS feed

  • Question

  • Hello,

    I'm trying to use the API to fetch all Criterion objects (specifically LocationCriterion) from Campaigns and AdGroups. However I don't see a way to do that with the provided endpoints.

    I see GetCampaignCriterionsByIds and GetAdGroupCriterionsByIds , which seem like they would give me the results I need; but to do that I need a list of criterion IDs, and I don't know where those come from.

    A typical campaign in my account has no value in "Settings":

    {'audience_ads_bid_adjustment': -100,
    'bidding_scheme': {'type': ManualCpc},
    'budget_id': None,
    'budget_type': DailyBudgetStandard,
    'campaign_type': Search,
    'daily_budget': 2100.0,
    'experiment_id': None,
    'final_url_suffix': None,
    'forward_compatibility_map': None,
    'id': ***,
    'languages': {'string': [English]},
    'name': ***,
    'settings': None,
    'status': Active,
    'sub_type': None,
    'time_zone': EasternTimeUSCanada,
    'tracking_url_template': None,
    'url_custom_parameters': None}

    Which is what the documentation suggests is where those criterions would be listed.

    The campaign in question definitely has targeting locations attached; I can see them in the UI.

    How can I get these criterions via the API?

    Thursday, April 30, 2020 8:10 PM