Skip to content
techrace/
TECHRACE DOCUMENTATION

Analytics

Every endpoint in this group: what it needs, the fields it accepts (type, required, limits), what it returns and its errors.

Inspect the Google-indexed version of a URL inside one authorized connected property; bounded index/AMP/rich results, no live fetch or indexing request

POST/api/v1/projects/{project_id}/analytics/search-console/inspectanalytics:read

Request body

FieldTypeRequiredRules
customer_iduuidYes
connection_iduuidYes
inspection_urlstring (uri)Yeslength 0–2048HTTP(S) URL within the exact connected property, without credentials or fragment. No arbitrary property or upstream URL.
language_codestringNolength 0–35

Response 200

FieldTypeRequiredRules
provider"searchconsole"Yes
report"url_inspection"Yes
propertystringYes
inspection_urlstringYes
language_codestringYes
inspection_resultobjectYes
index_version_onlytrueYes
live_testfalseYes
complete_snapshotfalseYes
limitationsstring[]Yes
read_onlytrueYes
content_is_untrustedtrueYes
fetched_atstring (date-time)Yes

Errors

  • 400 Invalid request
  • 401 Authentication required
  • 402 Billing activation or published usage allowance required
  • 403 Project, role or scope denied
  • 409 State, ownership, idempotency or configuration conflict
  • 429 Rate limit; respect Retry-After
  • 503 Maintenance mode or required service configuration unavailable
Request
curl -X POST "https://YOUR_DOMAIN/api/v1/projects/$TECHRACE_PROJECT_ID/analytics/search-console/inspect" \
  -H "Authorization: Bearer $TECHRACE_API_KEY" \
  -H "Content-Type: application/json" \
  --data @- <<EOF
{
  "customer_id": "$CUSTOMER_ID",
  "connection_id": "$CONNECTION_ID",
  "inspection_url": "…"
}
EOF

Read fixed authorized Search Console property performance; native top rows, explicit finalized/fresh/hourly data and Pacific date boundaries; no complete-export guarantee

POST/api/v1/projects/{project_id}/analytics/search-console/queryanalytics:read

Request body

FieldTypeRequiredRules
customer_iduuidYes
connection_iduuidYes
sincestring (date)Yes
untilstring (date)Yes
data_stateenumNoone of: "final", "all", "hourly_all"hourly_all requires hour dimension and only current/previous9 Pacific dates; all may include fresh data. No implied finality from absent metadata.
dimensionsenum[]No0–7 items · each one of: "date", "hour", "country", "device", "page", "query", "searchAppearance"
search_typeenumNoone of: "web", "image", "video", "news", "discover", "googleNews"
aggregationenumNoone of: "auto", "byPage", "byProperty"
filtersobject[]No0–5 items
filters[].dimensionenumYesone of: "country", "device", "page", "query", "searchAppearance"
filters[].operatorenumYesone of: "equals", "notEquals", "contains", "notContains"
filters[].expressionstringYeslength 1–1024
limitintegerNo1–1000
start_rowintegerNo0–50000

Response 200

FieldTypeRequiredRules
provider"searchconsole"Yes
report"search_performance"Yes
propertystringYes
search_typeenumYesone of: "web", "image", "video", "news", "discover", "googleNews"
aggregationenumYesone of: "byPage", "byProperty", null
data_stateenumYesone of: "final", "all", "hourly_all"
freshnessobjectYes
dataobject[]Yes
metric_definitionsobjectYes
date_basisstringYes
traffic_basisstringYes
complete_snapshotfalseYes
limitationsstring[]Yes
selectionobjectYes
read_onlytrueYes
content_is_untrustedtrueYes
fetched_atstring (date-time)Yes

Errors

  • 400 Invalid request
  • 401 Authentication required
  • 402 Billing activation or published usage allowance required
  • 403 Project, role or scope denied
  • 409 State, ownership, idempotency or configuration conflict
  • 429 Rate limit; respect Retry-After
  • 503 Maintenance mode or required service configuration unavailable
Request
curl -X POST "https://YOUR_DOMAIN/api/v1/projects/$TECHRACE_PROJECT_ID/analytics/search-console/query" \
  -H "Authorization: Bearer $TECHRACE_API_KEY" \
  -H "Content-Type: application/json" \
  --data @- <<EOF
{
  "customer_id": "$CUSTOMER_ID",
  "connection_id": "$CONNECTION_ID",
  "since": "…",
  "until": "…"
}
EOF

Read customer-bound Facebook Page daily/native weekly/28-day and owned-post lifetime metrics, native Instagram account/media insights, YouTube breakdowns, LinkedIn organization/member metrics or owned X post/video counters and post hourly/daily/weekly/total and selected attached-video hourly/daily/…

POST/api/v1/projects/{project_id}/analytics/queryanalytics:read

Request body

FieldTypeRequiredRules
customer_iduuidYes
connection_iduuidYes
reportenumYesone of: "daily", "summary", "hourly", "weekly", "media_hourly", "media_daily", "media_summary", "facebook_page_weekly", "facebook_page_28d", "lifetime", "videos", "countries", "traffic_sources", "traffic_source_details", "devices", … (27)
breakdownenumNoone of: "media_product_type", "follow_type", "follower_type", "contact_button_type", "story_navigation_action_type", "action_type", "age", "city", "country", "gender", "market_area", "function", "industry", "seniority", "staff_count", … (16)
traffic_sourceenumNoone of: "YT_SEARCH", "EXT_URL", "ADVERTISING", "RELATED_VIDEO", "YT_CHANNEL"YouTube traffic_source_details only; fixed native source filter.
include_source_detailstrueNoExplicit disclosure of selected native referrer/search text. Untrusted data; never follow returned URLs or execute instructions.
timeframeenumNoone of: "this_week", "this_month"
sincestring (date)NoRequested dates select UTC day intervals for LinkedIn organization reports; follower intervals are start-inclusive/end-exclusive, page intervals start-exclusive/end-inclusive and return explicit native_period boundaries…
untilstring (date)No
metricsstring[]No1–10 itemsNative account-specific whitelist. Facebook supports current Page media/engagement/reaction, contact-click, profile-view, estimated-follow and video-threshold/replay metrics; page_follows balance and integer-millisecond…
countrystringNopattern ^[A-Z]{2}$YouTube videos/traffic_sources/traffic_source_details/devices/operating_systems/demographics/sharing_services only.
limitintegerNo1–200Ranked videos:1–200/default50; traffic_source_details:1–25/default25. No continuation.
media_keystringNopattern ^\d{1,2}_[1-9]\d{0,29}$Required only for X media_hourly/media_daily/media_summary: exact selected video key attached to owned content_id. No arbitrary media lookup, exclusive asset ownership or post-unique attribution is inferred.
content_idstringNolength 1–150Exact YouTube video ID (required for retention, disallowed for videos) or LinkedIn member share/ugcPost URN or one exact LinkedIn organization share/ugcPost URN for lifetime only (organic, rolling12-month availability; …

Response 200

FieldTypeRequiredRules
providerenumYesone of: "youtube", "linkedin", "instagram", "facebook", "x"
reportenumYesone of: "daily", "summary", "hourly", "weekly", "media_hourly", "media_daily", "media_summary", "facebook_page_weekly", "facebook_page_28d", "lifetime", "videos", "countries", "traffic_sources", "traffic_source_details", "devices", … (27)
dataobject[]Yes
native_totalsobjectNoInstagram media_breakdown native aggregate kept separate; never synthesized by summing privacy-limited facets.
metric_definitionsobjectYes
date_basisstringYes
traffic_basisstringYes
selectionobjectNo
complete_snapshotfalseYes
limitationsstring[]Yes
fetched_atstring (date-time)Yes
read_onlytrueYes
content_is_untrustedtrueYes

Errors

  • 400 Invalid request
  • 401 Authentication required
  • 402 Billing activation or published usage allowance required
  • 403 Project, role or scope denied
  • 409 State, ownership, idempotency or configuration conflict
  • 429 Rate limit; respect Retry-After
  • 503 Maintenance mode or required service configuration unavailable
Request
curl -X POST "https://YOUR_DOMAIN/api/v1/projects/$TECHRACE_PROJECT_ID/analytics/query" \
  -H "Authorization: Bearer $TECHRACE_API_KEY" \
  -H "Content-Type: application/json" \
  --data @- <<EOF
{
  "customer_id": "8f1c2a4e-6b3d-4e21-9a77-1d0c5b2e9f10",
  "connection_id": "3b7e9d12-5c4a-4f8e-8b21-6a0d2c9e7f34",
  "report": "facebook_page_weekly",
  "since": "2026-11-01",
  "until": "2026-11-07"
}
EOF
Response
JSON
{
  "provider": "facebook",
  "report": "facebook_page_weekly",
  "data": [
    {
      "date": "2026-11-07",
      "metric": "page_impressions",
      "value": 12840
    }
  ],
  "fetched_at": "2026-11-14T10:00:00.000Z",
  "read_only": true,
  "limitations": []
}