To read the rows etlmcp has stored, send GET /api/v1/data with a date range and, if you want, a network, a source and a list of fields. The answer holds the rows, a count, and a truncated flag. When truncated is true, more rows matched than your limit allowed and the rest were left out, so you must ask again with a narrower date range. The rows are the ones pulled from each network, before any pipeline's transform rules, and their dates are in each ad account's own time zone.
Query stored data lists the parameters and the response schema. This page shows how to use them without losing rows.
A first request
Send an API key in the Authorization header (see API keys):
curl -s -H "Authorization: Bearer $ETLMCP_API_KEY" \
"https://app.etlmcp.com/api/v1/data?start=2026-11-01&end=2026-11-07&network=mock&fields=date,campaign_name,cost,clicks,currency&limit=5000"
The example reads the demo connector's rows, whose network key is mock. What to know about each parameter:
startandendare days writtenYYYY-MM-DD, and both ends are included. Leave either out and that side of the range is open.networkkeeps one network's rows. Use the network key that List networks returns.source_idkeeps one source: one ad account, GA4 property or store. Take the id from List sources.fieldsis a comma-separated list of the columns you want. Without it, each row carries every column plus anextraobject.limitcaps the rows in one answer. It has a default and a ceiling, both given as the parameter'sdefaultandmaximumin the OpenAPI document. Set it yourself so you know which numbertruncatedis measured against.
You only see the rows of the workspace your credential belongs to.
Choosing fields
The standard columns are source_id, date and network; the ids account_id, campaign_id, adgroup_id and ad_id; the names account_name, campaign_name, adgroup_name and ad_name; and the measures impressions, clicks, cost, conversions, conversion_value, ctr, cpc, cpm, cpa and currency.
Anything a network reports beyond those lives in extra. Ask for one of its keys with extra.<key>, such as extra.reach. A row that lacks that key returns it as null, so an empty column usually means the network does not report it, not that the request failed. Ask for extra alone to get the whole object.
Any other name is refused with a 400 and unknown field: {…}, naming the field. Keep currency in your field list whenever you add up cost across accounts: rows from accounts that bill in different currencies cannot be summed as one number.
Paging by date
There is no cursor or offset. You page by narrowing the date range, which works because the rows come back sorted by date first, then by network, campaign, ad group and ad.
A loop that never drops a row:
- Ask for your full range with a
limityou choose. - If
truncatedis false, you have every row. Stop. - If it is true, note the date of the last row you got. Drop every row with that date from what you keep, because that day may be cut off partway.
- Ask again with
startset to that date and the sameend, and go back to step 2.
If one day alone fills the limit, step 3 leaves you with nothing new. Split that day by network or by source_id instead, or raise limit.
import os, requests
URL = "https://app.etlmcp.com/api/v1/data"
HEADERS = {"Authorization": f"Bearer {os.environ['ETLMCP_API_KEY']}"}
def fetch(start, end, limit, **filters):
rows = []
while True:
page = requests.get(URL, headers=HEADERS, timeout=60,
params={"start": start, "end": end, "limit": limit, **filters}).json()
if not page["truncated"]:
return rows + page["rows"]
last = page["rows"][-1]["date"]
kept = [r for r in page["rows"] if r["date"] != last]
if not kept:
raise RuntimeError(f"{last} alone exceeds limit; split by network or source_id")
rows += kept
start = last
The loop keeps date in each row; if you pass fields, include date in it.
Errors to expect
Errors come back as JSON with an error message.
- 400:
start must not be after endwhen the range is reversed; astartorendthat cannot be read as a date; alimitoutside the allowed range; or an unknown field. - 404:
not foundwhensource_idis not a source in your workspace. A source in another workspace answers the same way as one that does not exist. - 429: each credential may make 120 requests a minute, REST and MCP together. A paging loop over a long range can reach this; wait the seconds the
Retry-Afterheader gives before the next call.
What the rows are and are not
The data endpoint reads what etlmcp stored from the network, not what your destination holds. If a pipeline renames, drops or computes columns with transform rules, those changes appear in the destination only. Compare like with like: check API totals against the network's own reports, and destination totals against the pipeline that wrote them.
Each day is the ad account's own day. Two accounts set to different time zones each report on their own calendar, so a date range covers slightly different hours per account.
If an AI assistant reads your data through MCP instead, it uses query_data, which returns at most 500 rows per call. Use this endpoint for bulk pulls into notebooks, scripts and BI tools.