get_adset_by_id
Fetch a Facebook ad set's targeting, budget, scheduling, and status by its ID. Get a complete snapshot of any ad set's configuration and performance.
Instructions
Retrieves detailed information about a specific Facebook ad set by its ID.
This function accesses the Facebook Graph API to retrieve information about a single ad set, including details about its targeting, budget, scheduling, and status.
Args: adset_id (str): The ID of the ad set to retrieve information for. fields (Optional[List[str]]): A list of specific fields to retrieve. If None, a default set of fields will be returned. Available fields include: - 'id': The ad set's ID - 'name': The ad set's name - 'account_id': The ID of the ad account this ad set belongs to - 'campaign_id': The ID of the campaign this ad set belongs to - 'bid_amount': The bid amount for this ad set - 'bid_strategy': Strategy used for bidding. Options include: 'LOWEST_COST_WITHOUT_CAP', 'LOWEST_COST_WITH_BID_CAP', 'COST_CAP' - 'billing_event': The billing event type. Options include: 'APP_INSTALLS', 'CLICKS', 'IMPRESSIONS', 'LINK_CLICKS', 'NONE', 'OFFER_CLAIMS', 'PAGE_LIKES', 'POST_ENGAGEMENT', 'THRUPLAY' - 'budget_remaining': The remaining budget for this ad set (in cents/smallest currency unit) - 'configured_status': The status set by the user. Options include: 'ACTIVE', 'PAUSED', 'DELETED', 'ARCHIVED' - 'created_time': When the ad set was created - 'daily_budget': The daily budget for this ad set (in cents/smallest currency unit) - 'daily_min_spend_target': The minimum daily spend target (in cents/smallest currency unit) - 'daily_spend_cap': The daily spend cap (in cents/smallest currency unit) - 'destination_type': Type of destination for the ads - 'effective_status': The effective status (actual status). Options include: 'ACTIVE', 'PAUSED', 'DELETED', 'PENDING_REVIEW', 'DISAPPROVED', 'PREAPPROVED', 'PENDING_BILLING_INFO', 'CAMPAIGN_PAUSED', 'ARCHIVED', 'ADSET_PAUSED', 'IN_PROCESS', 'WITH_ISSUES' - 'end_time': When the ad set will end (in ISO 8601 format) - 'frequency_control_specs': Specifications for frequency control - 'lifetime_budget': The lifetime budget (in cents/smallest currency unit) - 'lifetime_imps': The maximum number of lifetime impressions - 'lifetime_min_spend_target': The minimum lifetime spend target - 'lifetime_spend_cap': The lifetime spend cap - 'optimization_goal': The optimization goal for this ad set. Options include: 'APP_INSTALLS', 'BRAND_AWARENESS', 'CLICKS', 'ENGAGED_USERS', 'EVENT_RESPONSES', 'IMPRESSIONS', 'LEAD_GENERATION', 'LINK_CLICKS', 'NONE', 'OFFER_CLAIMS', 'OFFSITE_CONVERSIONS', 'PAGE_ENGAGEMENT', 'PAGE_LIKES', 'POST_ENGAGEMENT', 'QUALITY_LEAD', 'REACH', 'REPLIES', 'SOCIAL_IMPRESSIONS', 'THRUPLAY', 'VALUE', 'VISIT_INSTAGRAM_PROFILE' - 'pacing_type': List of pacing types. Options include: 'standard', 'no_pacing' - 'promoted_object': The object this ad set is promoting - 'recommendations': Recommendations for improving this ad set - 'rf_prediction_id': The Reach and Frequency prediction ID - 'source_adset_id': ID of the source ad set if this is a copy - 'start_time': When the ad set starts (in ISO 8601 format) - 'status': Deprecated. The ad set's status. Use 'effective_status' instead. - 'targeting': The targeting criteria for this ad set (complex object) - 'time_based_ad_rotation_id_blocks': Time-based ad rotation blocks - 'time_based_ad_rotation_intervals': Time-based ad rotation intervals in seconds - 'updated_time': When this ad set was last updated - 'use_new_app_click': Whether to use the newer app click tracking
Returns: Dict: A dictionary containing the requested ad set information.
Example: ```python # Get basic ad set information adset = get_adset_by_id( adset_id="23843211234567", fields=["name", "campaign_id", "effective_status", "targeting", "budget_remaining"] )
# Get detailed scheduling information
adset_schedule = get_adset_by_id(
adset_id="23843211234567",
fields=["name", "start_time", "end_time", "daily_budget", "lifetime_budget"]
)
```
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | No | ||
| adset_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |