Skip to content
Knowledge Base

Get Your Data Builder Table Data Into Your Own Code

Last updated

Note: You built a data table in Data Builder and want its data in your own script, warehouse, or scheduled job. The Power My Analytics API has no Data Builder endpoint, so for code that runs on its own, you rebuild what the table does with the API. To look at or analyze a table you've already built, ask your AI assistant: once it's connected to the PMA MCP server, it can read your Data Builder tables directly.

Before you start

Which path is yours

You want to... Use Why
Pull the data into your own code, a warehouse, or a scheduled job API Runs without a browser. You rebuild what your table does with per-connector reports, fields, and date ranges.
Look at or analyze the rows of a table you already built, including a blended table AI assistant (MCP server) It reads your existing datasets and tables directly, so there is no rebuilding.

The API and the MCP server read the same warehoused data and share the same per-plan limits.

Important: The MCP server accepts only connections made through sign-in from an AI assistant, and it doesn't accept API keys. A script or scheduled job can't read your Data Builder tables through it. If you had a job that sent an API key to the MCP server, it stopped working on August 15, 2026; move it to the API path below.

Rebuild the query with the API

Rebuild what your table does against the connector layer. It takes four calls:

  1. Get your account IDs. GET /http-organizations/{organizationId}/accounts/{providerType}. Your organization ID is in your Hub URL: hub.powermyanalytics.com/organizations/[organization ID]/overview. The provider type is a string such as facebook_ads; GET /http-connectors lists them all.
  2. Get the config that connector expects. GET /connectors-{connectorType}-config. Use dashes, not underscores, in connectorType (for example, facebook-ads).
  3. Get the field names. GET /connectors-{connectorType}-schema
  4. Get the report. GET /connectors-{connectorType}-report with your config, start, end, fields, and aggregate.

Send the config payload as URI-encoded JSON, and include your API key in the header authorization: Bearer YOUR_API_KEY. Full reference: SwaggerHub PMA-V4 2.0.0. Every PMA connector uses this same reference.

Where to find the account IDs your table uses

In Data Builder, add the Account ID field to your report and run it. The values it returns are what you pass to the API.

Does my API key expire?

The API key you generate under MCP & API > REST API does not expire on its own. Rotate it from the Hub whenever you would rotate any production secret (when someone leaves, when you suspect it has leaked, or when your policy calls for it), then update it in your secret store and restart your service.

Read a built table through your AI assistant

When you want to see or analyze a table you've already built, ask your AI assistant. Once it's connected to the PMA MCP server, it reads your Data Builder datasets directly:

  1. Ask it to list your datasets. It calls pma_list_datasets to find your dataset and the data tables inside it.

  2. Ask for the rows:

    • For a specific data table, it calls pma_get_data_table_data with that table. This returns the table whole, including a blended table that combines several sources.
    • For the combined result across every table in a dataset, it calls pma_get_dataset_data with the dataset and a date range.

For example: "Show me the rows of the Google Ads table in my Q4 Performance dataset for last month."

Other Data Builder calls available over MCP

  • pma_get_dataset: the structure of one dataset and the fields each table pulls.
  • pma_add_data_table: adds a data table to an existing dataset.
  • pma_create_dataset: creates a dataset, blank or from a template.
  • pma_list_dataset_templates: the pre-built dataset recipes.

Anything you create this way is the same dataset you see in the Hub under Data Builder. You can edit it in either place.

What you will see in your results

The API path returns raw connector rows. If your table blended several sources, you will get one response per connector and you do the joining in your own code.

The AI assistant path returns the same rows you see when you preview the table in Data Builder: same fields, same order, same date-range logic. pma_get_data_table_data returns one data table whole, including a blended table that combines several sources. pma_get_dataset_data returns the combined result across every table in a dataset.

Still stuck?

Submit a ticket with your organization ID and the name of the data table you are trying to reach, and we will send you the exact call.

Related Articles