<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sigit JinLang</title>
    <description>The latest articles on DEV Community by Sigit JinLang (@sigit_jinlang_af98b274d24).</description>
    <link>https://dev.to/sigit_jinlang_af98b274d24</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4271344%2F04499346-89f2-4aa8-add6-e2a9ec718acb.jpg</url>
      <title>DEV Community: Sigit JinLang</title>
      <link>https://dev.to/sigit_jinlang_af98b274d24</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sigit_jinlang_af98b274d24"/>
    <language>en</language>
    <item>
      <title>How to Track Competitors' Longest-Running Google Ads Automatically (n8n + Public Data, Zero Browser)</title>
      <dc:creator>Sigit JinLang</dc:creator>
      <pubDate>Sat, 28 Nov 2026 20:51:59 +0000</pubDate>
      <link>https://dev.to/sigit_jinlang_af98b274d24/how-to-track-competitors-longest-running-google-ads-automatically-n8n-public-data-zero-browser-4o8p</link>
      <guid>https://dev.to/sigit_jinlang_af98b274d24/how-to-track-competitors-longest-running-google-ads-automatically-n8n-public-data-zero-browser-4o8p</guid>
      <description>&lt;p&gt;Public ad libraries are useful for creative research, but manually opening the same competitors every week gets repetitive. A small automation can collect creative observations, compare them with a previous snapshot, and send a digest when something changes.&lt;/p&gt;

&lt;p&gt;This tutorial uses the &lt;a href="https://apify.com/storepulselabs/google-ads-transparency-scraper" rel="noopener noreferrer"&gt;Google Ads Transparency Scraper &amp;amp; Winning-Ad Monitor&lt;/a&gt;, n8n, and Slack. Disclosure: I maintain the paid Actor through StorePulseLabs. The &lt;a href="https://github.com/storepulselabs/google-ads-transparency-n8n-monitor" rel="noopener noreferrer"&gt;companion n8n workflow and Node.js examples&lt;/a&gt; are MIT licensed.&lt;/p&gt;

&lt;p&gt;The Actor uses HTTP requests to public anonymous Transparency Center endpoints. It does not launch a browser or require a Google login. That reduces moving parts; it does not guarantee uninterrupted access to Google's endpoints.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a 30-day threshold actually tells you
&lt;/h2&gt;

&lt;p&gt;The output field is &lt;code&gt;daysRunning&lt;/code&gt;, computed as whole days between &lt;code&gt;firstShownAt&lt;/code&gt; and &lt;code&gt;lastShownAt&lt;/code&gt;. A span of at least 30 days is a practical way to shortlist creative ideas for review: the same creative was observed over a longer period than an ad seen only recently.&lt;/p&gt;

&lt;p&gt;It is not a profitability score. Public timestamps do not establish continuous delivery, conversions, spend, budget increases, or ROI. The Actor's event name &lt;code&gt;newly_scaled_winner&lt;/code&gt; is a label for crossing your chosen longevity threshold, not evidence of actual scaling.&lt;/p&gt;

&lt;p&gt;There are two modes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;scrape&lt;/code&gt;: export matching creatives. Here, &lt;code&gt;minDaysRunning: 30&lt;/code&gt; filters out shorter spans.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;watch&lt;/code&gt;: retain a baseline in named Apify key-value storage and emit changes. Here, the threshold identifies known ads crossing 30 days. New ads below 30 days can still be exported; they stay in memory so future threshold crossings are detectable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That distinction matters. A watch is not simply a repeatedly downloaded list filtered to 30+ days.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try a watch request with curl
&lt;/h2&gt;

&lt;p&gt;You need an Apify account and API token. Supply &lt;code&gt;APIFY_TOKEN&lt;/code&gt; securely in your shell; do not paste a real token into a public example or commit it to a repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl --silent --show-error --fail-with-body --max-time 210 \
  --request POST \
  &lt;span class="s1"&gt;'https://api.apify.com/v2/acts/storepulselabs~google-ads-transparency-scraper/run-sync-get-dataset-items?timeout=180&amp;amp;memory=256&amp;amp;maxTotalChargeUsd=0.25'&lt;/span&gt; \
  --header &lt;span class="s2"&gt;"Authorization: Bearer ${APIFY_TOKEN}"&lt;/span&gt; \
  --header &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; \
  --data &lt;span class="s1"&gt;'{
    "mode": "watch",
    "domains": ["nike.com", "gymshark.com"],
    "region": "US",
    "minDaysRunning": 30,
    "strictDomainMatch": true,
    "pageSize": 100,
    "maxWatchPagesPerTarget": 25,
    "stateKey": "google-ads-curl-watch",
    "seedFirstRun": false
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The synchronous endpoint returns dataset rows as a JSON array. With &lt;code&gt;seedFirstRun: false&lt;/code&gt;, the initial baseline does not export initial creatives, so &lt;code&gt;[]&lt;/code&gt; can be the expected first response. Repeat with the same state name later to observe changes. The curl state name differs from the workflow's state name so this test does not advance that workflow's baseline.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;$0.25&lt;/code&gt; parameter is a maximum event charge, not an estimate of the run's cost. Hitting it can leave partial results. A timeout does not prove that a remote run stopped: inspect Apify Console before starting another POST. For workloads approaching the synchronous endpoint's &lt;a href="https://docs.apify.com/api/v2/actor-run-sync-get-dataset-items-post" rel="noopener noreferrer"&gt;300-second limit&lt;/a&gt;, start a run asynchronously, poll its status, and retrieve its dataset instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use the Node.js examples
&lt;/h2&gt;

&lt;p&gt;Clone the &lt;a href="https://github.com/storepulselabs/google-ads-transparency-n8n-monitor" rel="noopener noreferrer"&gt;companion repository&lt;/a&gt; and use Node.js 20+:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# APIFY_TOKEN is already available through your environment/secret manager.&lt;/span&gt;
node examples/run_scrape.mjs
node examples/run_watch.mjs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are no dependencies to install. Both examples use built-in &lt;code&gt;fetch&lt;/code&gt;, a token header, explicit timeouts, and a spending cap; neither reads a &lt;code&gt;.env&lt;/code&gt; file. The core request looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="s1"&gt;'https://api.apify.com/v2/acts/storepulselabs~google-ads-transparency-scraper/run-sync-get-dataset-items?timeout=180&amp;amp;memory=256&amp;amp;maxTotalChargeUsd=0.25'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'POST'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nc"&gt;Authorization&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sb"&gt;`Bearer ${process.env.APIFY_TOKEN}`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="s1"&gt;'Content-Type'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'application/json'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'scrape'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;domains&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'gymshark.com'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;region&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'US'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="n"&gt;minDaysRunning&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;strictDomainMatch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="n"&gt;maxCreativesPerTarget&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;maxPagesPerTarget&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;signal&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;AbortSignal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;timeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;210000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`Apify HTTP ${response.status}`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isArray&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Expected a dataset array'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The packaged client adds token validation and sanitized failure messages. &lt;code&gt;maxCreativesPerTarget&lt;/code&gt; is a scrape-mode limit; it does not cap watch exports. Watch uses &lt;code&gt;maxWatchPagesPerTarget&lt;/code&gt; to bound scan depth.&lt;/p&gt;

&lt;h2&gt;
  
  
  Import the n8n workflow
&lt;/h2&gt;

&lt;p&gt;Download &lt;a href="https://github.com/storepulselabs/google-ads-transparency-n8n-monitor/blob/main/workflows/n8n_google_ads_spy.json" rel="noopener noreferrer"&gt;n8n_google_ads_spy.json&lt;/a&gt; and import it into n8n. The graph uses built-in nodes only:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Schedule Trigger / Manual test
  -&amp;gt; HTTP Request: run Apify watch
  -&amp;gt; Code: validate response and build one digest
  -&amp;gt; IF count &amp;gt; 0
      true  -&amp;gt; HTTP Request: Slack chat.postMessage -&amp;gt; check acknowledgement
      false -&amp;gt; no notification
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Configure two separate Header Auth credentials. The Apify credential contains &lt;code&gt;Authorization: Bearer &amp;lt;APIFY_TOKEN&amp;gt;&lt;/code&gt;. The Slack credential contains &lt;code&gt;Authorization: Bearer &amp;lt;SLACK_BOT_TOKEN&amp;gt;&lt;/code&gt;. Select each in its corresponding HTTP node, replace the Slack channel placeholder, grant the bot &lt;code&gt;chat:write&lt;/code&gt;, and invite it to that channel. Slack's &lt;a href="https://docs.slack.dev/reference/methods/chat.postMessage/" rel="noopener noreferrer"&gt;&lt;code&gt;chat.postMessage&lt;/code&gt;&lt;/a&gt; response must contain &lt;code&gt;ok: true&lt;/code&gt;; an HTTP 200 alone is not sufficient.&lt;/p&gt;

&lt;p&gt;The Apify HTTP node uses &lt;strong&gt;Include Response Headers and Status&lt;/strong&gt; and JSON response format. That gives the next node one envelope with &lt;code&gt;body&lt;/code&gt; and &lt;code&gt;statusCode&lt;/code&gt;, even for an empty array. The Code node validates that shape and builds a single digest. The IF node checks its numeric &lt;code&gt;count&lt;/code&gt;; empty arrays take the quiet branch. Unexpected HTTP or payload errors fail the execution rather than becoming a fake quiet watch. Authentication uses n8n's &lt;a href="https://docs.n8n.io/integrations/builtin/credentials/httprequest/" rel="noopener noreferrer"&gt;Header Auth mechanism&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The schedule defaults to Monday 09:00 in &lt;code&gt;Asia/Jakarta&lt;/code&gt;. To run daily, edit its single rule to Days / every 1 day / 09:00. Verify the workflow timezone, test manually, then save and publish/activate it. Scheduling uses the &lt;a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/" rel="noopener noreferrer"&gt;workflow/instance timezone&lt;/a&gt;, so do not assume your laptop timezone controls it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Interpret the digest
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;code&gt;status&lt;/code&gt;&lt;/th&gt;
&lt;th&gt;What it means&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;new_ad&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;This watch has not recorded the creative before. An older ad can first appear after a capped earlier scan.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;newly_scaled_winner&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A previously recorded creative crossed the configured &lt;code&gt;daysRunning&lt;/code&gt; threshold.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;stopped_ad&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A previously recorded creative was absent from a complete, parsed scan. This is not proof that its campaign was switched off.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Messages show each sample's &lt;code&gt;daysRunning&lt;/code&gt; and &lt;code&gt;transparencyUrl&lt;/code&gt;. Null spans display as unknown, and advertiser text is escaped before Slack formatting. Only ten sample rows are displayed; the full exported result remains in Apify. The first silent seed is deliberate — turn &lt;code&gt;seedFirstRun&lt;/code&gt; on only if you want an initial export and accept its result charges.&lt;/p&gt;

&lt;p&gt;Keep the state name stable and run one execution per state store at a time. Changing region, format, strict-domain setting, or a creative filter starts another target baseline. The strict-domain option is an advertiser-name matching heuristic, not verified corporate ownership; use explicit advertiser IDs when legal-entity identity matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  Price, measured behavior, and failure handling
&lt;/h2&gt;

&lt;p&gt;The Actor event price is &lt;strong&gt;$0.0012 per exported row, or $1.20 per 1,000&lt;/strong&gt;. A genuinely zero-export quiet watch incurs &lt;code&gt;$0&lt;/code&gt; Actor event charges. Empty, blocked, or error source requests add no result fee; useful rows exported before a later failure can still be charged. Your n8n hosting and Slack costs are separate.&lt;/p&gt;

&lt;p&gt;In a recorded build &lt;code&gt;0.0.13&lt;/code&gt; scrape on 28 November 2026 UTC, querying Gymshark creatives at a 14-day threshold exported 30 creatives (minimum observed span: 15 days) with one residential fallback retry. A supplementary run with &lt;code&gt;minDaysRunning: 365&lt;/code&gt; exported 20 rows across two pages, with observed spans of 410–1,859 days, demonstrating post-filter pagination.&lt;/p&gt;

&lt;p&gt;Do not infer a safe requests-per-IP quota from single samples. Empty exports do not establish source health: inspect &lt;code&gt;batch_summary.json&lt;/code&gt; in Apify's Key-Value Store for blocked requests, incomplete targets, and parsing errors, and configure separate n8n execution-error alerts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Apify Actor:&lt;/strong&gt; &lt;a href="https://apify.com/storepulselabs/google-ads-transparency-scraper" rel="noopener noreferrer"&gt;Google Ads Transparency Scraper &amp;amp; Winning-Ad Monitor&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free MIT n8n Workflow &amp;amp; Node.js Examples:&lt;/strong&gt; &lt;a href="https://github.com/storepulselabs/google-ads-transparency-n8n-monitor" rel="noopener noreferrer"&gt;storepulselabs/google-ads-transparency-n8n-monitor on GitHub&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>n8n</category>
      <category>automation</category>
      <category>javascript</category>
      <category>marketing</category>
    </item>
  </channel>
</rss>
