add_ads
Create text ads in specified ad groups for Yandex Direct campaigns. Supports headlines, body text, mobile targeting, and extensions. After creation, ads require moderation.
Instructions
Create text ads in ad groups.
Args: ads: List of ad objects. Each must include: - AdGroupId (int): target ad group (required) - TextAd (dict): ad content (required for text ads): - Title (str): headline, max 35 chars (required) - Title2 (str, optional): second headline, max 30 chars - Text (str): body text, max 81 chars (required) - Href (str, optional): destination URL (can be set at group/keyword level) - Mobile (str): "YES"|"NO" — whether this is a mobile-only ad (default "NO") - DisplayUrlPath (str, optional): display URL path after domain (max 20 chars) - SitelinkSetId (int, optional): ID of sitelink extension set - VCardId (int, optional): ID of contact info card
confirm: True to execute; False returns dry-run plan.TIPS: - Title + Title2 must fit Yandex requirements (no caps abuse, no prohibited phrases). - After creation, ads go to DRAFT status — call moderate_ads to submit for review. - Create multiple ads per group (2-3) for A/B testing — Yandex will rotate them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ads | Yes | ||
| confirm | No |