Lists the Google Analytics 4 accounts and properties the connected Google account can see.
curl -X POST "https://api.primaryapi.com/v1/run/google-analytics.properties" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'{
"output": {
"found": true,
"data": {
"nextCursor": null,
"properties": [
{
"displayName": "example.com - GA4",
"property": "properties/312345678",
"propertyType": "PROPERTY_TYPE_ORDINARY",
"parent": "accounts/1000001", …
}, …
],
"accounts": [
{
"displayName": "Example Inc.",
"propertyCount": 2,
"account": "accounts/1000001",
"accountId": "1000001"
}
]
}
},
"credits": 1
}Input and output
3 fields
7 fields
Good to know
Runs as your connected Google account. Needs the Read Google Analytics capability.
Use propertyId with google-analytics.report. google-analytics.realtime_report, google-analytics.metadata and the key event and custom dimension APIs.
One page per call. Send nextCursor back as cursor to read the next page.
The same key and credits work for every API.