Menu

API reference · Dashboards

Data

dashboards · data · 2 operations

GET/v1/dashboards/data/sources

List the platforms and accounts you can query

dashboards.data.sources

ReadIdempotentSince 2026-11-01

Lists the platforms connected to the organization that the caller can read (ad platforms, Google Analytics 4, Search Console, Business Profile, YouTube, Facebook, Instagram, TikTok and LinkedIn pages), each with its linked accounts: id (the account_id of dashboards.data.query), name, currency (ISO code of an ad account, when the connection recorded it) and inherited (the connection belongs to the workspace), and connected. An Account also lists the connections it uses from its workspace. With platform, only that platform (also when it has no linked account: connected false, so its catalog can be read) and its full catalog: metrics (id, name, format, how the period total is built: sum, ratio recalculated from its parts, or average/none, which is not the sum of the rows; currency when an amount is always in one currency) and dimensions (id, name, whether it is time, whether it can filter or break down, and its fixed values when there are few). Ids are the platform's own: never reuse one from another platform. This is what dashboards.data.query reads; dashboards.data_sources.list is another thing (the sources a dashboard template maps to), with the same accounts named platform:id and TikTok as tiktok. Either form works as input on both sides: platform here takes tiktok too, and an account id from this list works in a dashboard's data_source_mapping. What each one returns does not change. Requires view access to a module that shows the platform's data: Dashboards, Monitors or Reports for any platform; Paid Insights or Ads Visualizer for the ad platforms; Social Insights for YouTube and the social pages; Indexation for Search Console; Local SEO for Business Profile. Through the API and the MCP, a platform whose terms do not allow that use is not listed: querying it answers 403 platform_terms_restricted, with details.platform and details.access (none, or own_key: only an organization API key, through the REST API). The developer documentation lists those platforms.

Instructions for agents

Call it with platform before the first query to a platform: query only with the ids it lists. If the platform the person asks about is not listed, or comes with connected: false, it is not connected or the person cannot read it: say so and point to Settings → Integrations. If asking for it answers 403 platform_terms_restricted, it is connected but its terms do not allow it through this connection: say it is only available on the MB Suite screen.

Scope
dashboards:read
Permission
View the module
MCP tool
dashboards_data_sourcesOn the full surface; on the compact one, mb_execute_operation with id: "dashboards.data.sources".

Declared cost: up to 2 reads and 0 writes per call (they count against the daily quota).

Parameters

platformenumqueryoptional

Only this platform, with its full catalog of metrics and dimensions. Without it, every connected platform and its accounts, without the catalog. Any of google_ads, meta_ads, tiktok_ads, linkedin_ads, google_analytics, google_search_console, google_business_profile, youtube, facebook_page, instagram, tiktok_organic, linkedin_page; the ids of dashboards.data_sources.list work too (tiktok and tiktok_organic are the same platform).

Values: google_ads, meta_ads, tiktok_ads, linkedin_ads, google_analytics, google_search_console, google_business_profile, youtube, facebook_page, instagram, tiktok_organic, linkedin_page, tiktok

Response

dataarray<object>

Errors

Example

curl "https://api.mb-suite.com/v1/dashboards/data/sources" \
  -H "Authorization: Bearer $MB_API_KEY"

Try it with your test API key

With a test API key the request always goes to your practice organization: example data you can reset.

curl "https://api.mb-suite.com/v1/dashboards/data/sources" \
  -H "Authorization: Bearer $MB_TEST_KEY"
POST/v1/dashboards/data/query

Query any connected platform: metrics by day, campaign or any dimension

dashboards.data.query

ReadIdempotentSince 2026-11-01

Reads live from a connected platform the metrics you ask for, broken down by up to 3 dimensions (day, week, month, campaign, ad group, ad, keyword, search query, page, device, country… depending on the platform), for a date range, with optional comparison, filters and sort. It is the same reader as the Dashboards widgets, so the numbers match the screens. Use dashboards.data.sources with platform first to get valid metric and dimension ids and the account ids. Input: platform (the dashboards' id tiktok works for tiktok_organic); account_id (an id of dashboards.data.sources, or the platform:id of dashboards.data_sources.list; default: the first linked account); metrics (1–10); dimensions (0–3); range (a preset such as last_7_days, last_30_days, this_week, last_week, this_month, last_month, this_year, resolved in the organization's time zone, where the dashboards' names this_week_mon_today and last_week_mon_sun work too, or start_date and end_date in YYYY-MM-DD, up to 400 days; default last_30_days); compare (previous_period or previous_year); filters (up to 5: dimension, operator, value; in and not_in take a list); sort (by a metric or dimension of the query; default: a time series by date, a breakdown by the first metric descending); limit (1–500, default 50) and cursor for the next page. Unknown fields are an error. Output is a table: columns (id, name, dimension or metric, format, and currency when a metric is always in one currency), rows as arrays in the column order, row_count, has_more and next_cursor. Without dimensions there is one row: the period. totals are the period totals computed by MB Suite, not just the page: sums for additive metrics, ratios recalculated from their parts (CTR = clicks / impressions, never an average), and the platform's own total for unique counts when it gives one (GA4 users); metrics in non_additive (reach, frequency, unique users, average position) have no total from the rows: query them without dimensions for the period value. With compare: compare_totals, deltas (% change) and, for a breakdown that is not a time series, compare_rows (each row's metrics in the compared period, in the order of the metric columns). Percent metrics are fractions (0.15 = 15%); currency metrics are in the account's currency (account.currency) unless the column says otherwise; Google Ads cost_micros is already in currency units despite its name. notes explains anything unusual in one line each (history clamped by the platform, rows capped by the platform, totals from a daily read) and note_codes carries the same notes as codes with their values. Reading costs one unit of the organization's quota of that platform per live request (two with compare; Search Console broken down by query or page reads the days again for the totals); the same query within 5 minutes is answered from cache at no cost (cached: true). An account that is not linked to the organization is not_found and the platform is never asked. Requires view access to a module that shows that platform's data (see dashboards.data.sources). Through the API and the MCP, a platform whose terms do not allow that use answers 403 platform_terms_restricted, with details.platform and details.access (none, or own_key: only an organization API key, through the REST API); dashboards.data.sources does not list it. The developer documentation lists those platforms.

Instructions for agents

Read totals and deltas from the result: never add up rows or average percentages yourself, and never present a page as the whole. Name the account and its currency. If a metric is in non_additive and the person wants the period value, query again without dimensions. If notes says the platform capped the rows, say the list is partial. If the result is empty, say there is no data for that range; if the query failed, say which account and why (an expired connection is reconnected in Settings → Integrations).

Scope
dashboards:read
Permission
View the module
MCP tool
dashboards_data_queryOn the full surface; on the compact one, mb_execute_operation with id: "dashboards.data.query".

Declared cost: up to 6 reads and 0 writes per call (they count against the daily quota). Touches an external platform (google_ads): it counts against the external operations quota.

Parameters

platformenumbodyrequired

The platform to read (dashboards.data.sources lists the connected ones). Any of google_ads, meta_ads, tiktok_ads, linkedin_ads, google_analytics, google_search_console, google_business_profile, youtube, facebook_page, instagram, tiktok_organic, linkedin_page; the ids of dashboards.data_sources.list work too (tiktok and tiktok_organic are the same platform).

Values: google_ads, meta_ads, tiktok_ads, linkedin_ads, google_analytics, google_search_console, google_business_profile, youtube, facebook_page, instagram, tiktok_organic, linkedin_page, tiktok

metricsarray<string>bodyrequired

Metric ids of the platform (dashboards.data.sources with platform lists them), 1 to 10.

account_idstringbodyoptional

The account on the platform (an id from dashboards.data.sources; the platform:id form of dashboards.data_sources.list works too). Without it, the first account linked to the organization.

dimensionsarray<string>bodyoptional

Dimension ids to break the metrics down by (none: one row of totals), up to 3.

Default: []

rangeobjectbodyoptional

A preset in the organization's time zone, or a start and an end date (calendar days, up to 400). Default: last_30_days.

compareenumbodyoptional

Compare with another period: previous_period or previous_year (it fills compare_range, compare_totals, deltas and compare_rows).

Values: previous_period, previous_year

filtersarray<object>bodyoptional

Filters on dimensions, up to 5.

Default: []

sortarray<object>bodyoptional

The order of the rows.

limitintegerbodyoptional

How many rows per page (default 50, at most 500).

Default: 50

cursorstringbodyoptional

The next_cursor of the previous page.

Response

platformenum

Values: google_ads, meta_ads, tiktok_ads, linkedin_ads, google_analytics, google_search_console, google_business_profile, youtube, facebook_page, instagram, tiktok_organic, linkedin_page

accountobject
rangeobject
compare_rangeobject | null
columnsarray<object>
rowsarray<array<string | number | null>>
totalsobject
compare_totalsobject | null
deltasobject | null
compare_rowsarray<array<number | null> | null> | null
non_additivearray<string>
row_countinteger
has_moreboolean
next_cursorstring | null
notesarray<string>
note_codesarray<object>
cachedboolean

Errors

Example

curl -X POST "https://api.mb-suite.com/v1/dashboards/data/query" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "platform": "google_ads",
  "metrics": [
    "METRIC"
  ]
}'

Try it with your test API key

With a test API key the request always goes to your practice organization: example data you can reset. In the practice organization this operation is simulated: nothing is sent and the response carries simulated: true.

curl -X POST "https://api.mb-suite.com/v1/dashboards/data/query" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "platform": "google_ads",
  "metrics": [
    "METRIC"
  ]
}'