API Documentation

Getting started

Prerequisites

To use the tagstack.io API, you will need:

Generate the API Key

You can generate an API key from your profile. Simply click the button "Generate API Key".

Please note that your API key must be kept secret.

Screenshot showing how to generate the tagstack.io API token

Authentication

All requests to the tagstack.io API must include your API key as a Bearer token in the Authorization header.

Authorization: Bearer $APIKEY

Scan a URL / Container ID

GET
/
v1
/
service.tagstack.io/api/scan?url=myurl.com

Scans the provided URL or container ID and returns detected technologies.

curl -H "Authorization: Bearer $APIKEY" https://service.tagstack.io/api/scan?url=ads.google.com

Headers

Authorization Required

Your API Key for authentication. Value: Bearer $yourAPIKey

Parameters

url Required

The domain, subdomain or GTM container ID you want to scan. Examples: ads.google.com, GTM-KL36Q2B

Response

JSON Response
{
  "success": true,
  "containers": {
    "G-59LMG6TE50": {
      "entityType": "GA4 Stream"
    },
    "GTM-M2PH3M87": {
      "cmp": null,
      "consentMode": false,
      "entityType": "GTM Container",
      "ga4ServerSide": false
    }
  },
  "url": "https://www.googletagmanager.com/gtm.js?id=GTM-M2PH3M87"
}

Save a Scan

POST
/
v1
/
service.tagstack.io/api/save-scan

Saves a scan for the provided URL or container ID and returns a permanent URL to access the saved scan.

curl -X POST -H "Authorization: Bearer $APIKEY" -H "Content-Type: application/json" -d '"url":"ads.google.com"' https://service.tagstack.io/api/save-scan

Headers

Authorization Required

Your API Key for authentication. Value: Bearer $yourAPIKey

Content-Type Required

Must be set to application/json

Parameters

url Required

The domain, subdomain or GTM container ID you want to scan and save. Examples: ads.google.com, GTM-KL36Q2B

Response

JSON Response
{
  "success": true,
  "scanId": "abc123def456",
  "savedscanUrl": "https://tagstack.io/scan/saved/abc123def456"
}

© 2024 tagstack. tagstack is not affiliated with Google or Adobe, nor is it endorsed by or sponsored by this ones. This site was built using the astrosaas template, go check it.