{
  "summary": "Pull FULL Ahrefs GB organic keyword list (raw per-keyword) for a single domain, save raw + per-URL aggregate",
  "agentCount": 1,
  "logs": [
    "Ahrefs raw pull: cinik"
  ],
  "result": {
    "domains": [
      {
        "site": "cinik",
        "ahrefs_rows_pulled": 250,
        "en_keyword_rows": 244,
        "unique_urls": 74,
        "ahrefs_units_cost": 5750,
        "sample_rows": [
          "dr cinik,2,800,https://emrahcinik.com/,177",
          "beard transplant turkey,1,600,https://emrahcinik.com/hair-transplant/beard-transplant/,149",
          "minoxidil foam vs liquid,2,250,https://emrahcinik.com/minoxidil-foam-vs-liquid/,115",
          "turkey beard transplant,1,250,https://emrahcinik.com/hair-transplant/beard-transplant/,97",
          "no shave hair transplant,2,250,https://emrahcinik.com/hair-transplant/unshaven/,82",
          "hair transplant turkey,14,9600,https://emrahcinik.com/,70",
          "dr cinik turkey,1,150,https://emrahcinik.com/,60",
          "can endometriosis cause hair loss,2,150,https://emrahcinik.com/endometriosis-hair-loss/,57",
          "dr cinik hair transplant,2,150,https://emrahcinik.com/,53",
          "ketoconazole shampoo hair loss,4,600,https://emrahcinik.com/ketoconazole-hair-loss/,51"
        ],
        "notes": "Single Ahrefs call succeeded (target=emrahcinik.com, mode=subdomains, country=gb, date=2026-06-01, limit=1000, csv). API returned 250 rows (full list; under the 1000 cap, so this is the complete UK organic keyword set). apiUsageCosts: rows=250, units-cost-row=23, units-cost-total=5750 (cache miss).\n\nEN filter: 244 of 250 rows kept; 6 excluded. Excluded = 5 language-coded URLs (first path segment in lang set) + 1 non-English-folder multi-segment URL:\n- /tr (x2): 'sac ekimi istanbul', 'sac ekimi sonuclari' (/tr/sonuclar)\n- /it (x2): 'trapianto capelli turchia', 'trapianto capelli' (/it/trapianto-capelli-eta)\n- /fr (x1): 'greffe de cheveux turquie'\n- /web-stories/rio-ferdinands-hair-transplant-by-dr-cinik-dr-cinik (x1, kw 'rio ferdinand beard'): first segment 'web-stories', a 2-segment path not under any English folder (/hair-transplant/, /hair-loss/, /london/) and not a root single-segment slug, so correctly fails the EN rule.\n\nEN buckets seen: root single-segment slugs (e.g. /minoxidil-foam-vs-liquid, /ketoconazole-hair-loss, /timeline, /celebrities-hair-transplant, /endometriosis-hair-loss, the homepage /), and English folder /hair-transplant/ (subpaths: /beard-transplant, /unshaven, /dhi, /for-women, /afro, /stem-cells, /needle-free-anesthesia). No /hair-loss/, /london/ subfolder URLs appeared in the data. No /uk/ or /us/ path segments present anywhere in the dataset (so no /uk//us/ nuance to resolve). The only 'uk' token appears inside single-segment slug /hair-transplant-uk-vs-turkey which is correctly treated as EN.\n\nURL normalization applied: lowercase host, strip trailing slash, URL-decode %xx (e.g. /hair-transplant-density-cm%C2%B2 decoded to .../hair-transplant-density-cm-squared char).\n\nFiles written and verified:\n- /opt/automator/cinik-rponse/files/raw/cinik_ahrefs_raw.csv -> 245 lines (1 header + 244 EN keyword rows), confirmed via wc -l. Header: url,keyword,volume,position,traffic.\n- /opt/automator/cinik-rponse/files/raw/cinik_ahrefs_agg.csv -> 75 lines (1 header + 74 unique URLs). Header: url,real_keyword,volume,position,traffic,n_keywords,top_keywords. real_keyword = max-traffic keyword per URL; traffic = sum; n_keywords = distinct keyword count; top_keywords = top 8 by volume joined with '|'. Top URLs by traffic: homepage / (526 traffic, 22 kw), /celebrities-hair-transplant (321, 43 kw), /hair-transplant/beard-transplant (264, 3 kw).\nBuilder script saved at /opt/automator/cinik-rponse/files/raw/build_cinik.py (embeds all 250 raw rows verbatim)."
      }
    ]
  }
}