Skip to main content
Glama
hashcott

Meta Ads MCP Server

by hashcott

Get Meta Ads by Ad Account

meta_ads_get_ads_by_adaccount
Read-onlyIdempotent

Retrieve ads from a Meta ad account with filtering by status, date range, and custom fields. Paginated results for efficient data extraction.

Instructions

Retrieve all ads from a specific Meta ad account with filtering and pagination.

Args:

  • act_id (string): Ad account ID prefixed with 'act_', e.g., 'act_1234567890'

  • fields (string[]): Fields per ad. Common: id, name, account_id, adset_id, campaign_id, status, effective_status, configured_status, creative, bid_amount, bid_type, created_time, updated_time, targeting, conversion_specs, recommendations, preview_shareable_link

  • effective_status (string[]): Filter by status: ACTIVE, PAUSED, DELETED, PENDING_REVIEW, DISAPPROVED, PREAPPROVED, PENDING_BILLING_INFO, CAMPAIGN_PAUSED, ARCHIVED, ADSET_PAUSED, IN_PROCESS, WITH_ISSUES

  • filtering (object[]): Additional filter objects with field, operator, value

  • limit (number): Results per page (1-100, default: 25)

  • after / before (string): Pagination cursors

  • date_preset / time_range: Date filter

  • updated_since (number): Unix timestamp — return ads updated since this time

Returns: Object with data (ad array) and paging. Use meta_ads_fetch_pagination_url with paging.next for more results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
act_idYesAd account ID prefixed with 'act_', e.g., 'act_1234567890'
fieldsNoList of specific fields to retrieve. If omitted, default fields are returned
filteringNoList of filter objects. Each has 'field', 'operator', and 'value'. Example: [{field: 'spend', operator: 'GREATER_THAN', value: 50}]
date_presetNoPredefined relative time range. Options: today, yesterday, this_month, last_month, this_quarter, maximum, last_3d, last_7d, last_14d, last_28d, last_30d, last_90d, last_week_mon_sun, last_week_sun_sat, last_quarter, last_year, this_week_mon_today, this_week_sun_today, this_year. Default: last_30d. Ignored if time_range, time_ranges, since, or until is provided
time_rangeNoCustom time range with since/until dates in YYYY-MM-DD format
updated_sinceNoReturn ads updated since this Unix timestamp
effective_statusNoFilter by effective status. Options: ACTIVE, PAUSED, DELETED, PENDING_REVIEW, DISAPPROVED, PREAPPROVED, PENDING_BILLING_INFO, CAMPAIGN_PAUSED, ARCHIVED, ADSET_PAUSED, IN_PROCESS, WITH_ISSUES
limitNoMaximum number of results to return per page (1-100, default: 25)
afterNoCursor for the next page of results, from response.paging.cursors.after
beforeNoCursor for the previous page of results, from response.paging.cursors.before
offsetNoAlternative pagination: number of results to skip

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hashcott/meta-ads-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server