{"id":1976,"date":"2026-04-25T20:00:00","date_gmt":"2026-04-25T11:00:00","guid":{"rendered":"https:\/\/syuji-engineer.com\/?p=1976"},"modified":"2026-04-20T16:01:20","modified_gmt":"2026-04-20T07:01:20","slug":"search-console%e3%81%ae%e5%ae%9a%e7%82%b9%e3%83%81%e3%82%a7%e3%83%83%e3%82%af%e3%81%af%e3%80%81%e4%bb%95%e7%b5%84%e3%81%bf%e3%81%ab%e3%81%97%e3%81%aa%e3%81%84%e3%81%a8%e7%b6%9a%e3%81%8b%e3%81%aa","status":"publish","type":"post","link":"https:\/\/syuji-engineer.com\/?p=1976","title":{"rendered":"Search Console\u306e\u5b9a\u70b9\u30c1\u30a7\u30c3\u30af\u306f\u3001\u4ed5\u7d44\u307f\u306b\u3057\u306a\u3044\u3068\u7d9a\u304b\u306a\u3044"},"content":{"rendered":"\n<p>\u203b\u3053\u306e\u8a18\u4e8b\u306b\u306f\u30a2\u30d5\u30a3\u30ea\u30a8\u30a4\u30c8\u30ea\u30f3\u30af\u3092\u542b\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u7d50\u8ad6\u304b\u3089\u8a00\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>Search Console\u306f\u300c\u898b\u3088\u3046\u3068\u3057\u306a\u3044\u3068\u898b\u306a\u3044\u300d\u30c4\u30fc\u30eb\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u90311\u56de\u624b\u52d5\u3067\u78ba\u8a8d\u3057\u3088\u3046\u3068\u3057\u3066\u3082\u3001\u5b9f\u969b\u306b\u306f\u307b\u3068\u3093\u3069\u7d9a\u304d\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>\u3063\u3066\u3053\u3068\u3067\u3001Python\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u6539\u5584\u5019\u88dc\u8a18\u4e8b\u3092\u81ea\u52d5\u62bd\u51fa\u3057\u3066Markdown\u30ec\u30dd\u30fc\u30c8\u306b\u51fa\u529b\u3059\u308b\u4ed5\u7d44\u307f\u3092\u4f5c\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u4e00\u5ea6\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308c\u3070\u3001\u30b3\u30de\u30f3\u30c91\u884c\u3067\u6539\u5584\u5019\u88dc\u304c\u51fa\u3066\u304f\u308b\u72b6\u614b\u306b\u306a\u308a\u307e\u3059\u3002\u3042\u3068\u306f1\u672c\u305a\u3064\u76f4\u3059\u3060\u3051\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u300c\u3068\u308a\u3042\u3048\u305a\u767b\u9332\u3057\u305f\u300d\u3067\u7d42\u308f\u3063\u3066\u3044\u305f<\/h3>\n\n\n\n<p>WordPress\u3067\u30d6\u30ed\u30b0\u3092\u7d9a\u3051\u3066\u3044\u308b\u3068\u3001\u300cSEO\u306e\u305f\u3081\u306b\u3068\u308a\u3042\u3048\u305a\u5165\u308c\u305f\u300d\u72b6\u614b\u306e\u30c4\u30fc\u30eb\u304c\u5897\u3048\u3066\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>Search Console\u3082\u305d\u306e\u3072\u3068\u3064\u3067\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u767b\u9332\u306f\u3057\u3066\u3044\u305f\u3002\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u306f\u958b\u3044\u305f\u3053\u3068\u304c\u3042\u308b\u3002\u3067\u3082\u4f55\u3092\u898b\u308c\u3070\u3044\u3044\u306e\u304b\u3088\u304f\u308f\u304b\u3089\u305a\u3001\u6570\u5b57\u304c\u5897\u3048\u3066\u3082\u6e1b\u3063\u3066\u3082\u3001\u6b21\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u304c\u51fa\u3066\u3053\u306a\u3044\u3002<\/p>\n\n\n\n<p>\u305d\u3046\u3044\u3046\u72b6\u614b\u304c\u534a\u5e74\u4ee5\u4e0a\u7d9a\u3044\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u610f\u8b58\u304c\u4f4e\u304b\u3063\u305f\u304b\u3089\u3067\u306f\u306a\u304b\u3063\u305f\u3068\u4eca\u306f\u601d\u3063\u3066\u3044\u307e\u3059\u3002\u300e\u898b\u3066\u3082\u5224\u65ad\u3067\u304d\u306a\u3044\u300f\u304b\u3089\u624b\u304c\u6b62\u307e\u3063\u3066\u3044\u305f\u3001\u3068\u3044\u3046\u306e\u304c\u6b63\u76f4\u306a\u3068\u3053\u308d\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u624b\u52d5\u30c1\u30a7\u30c3\u30af\u304c\u7d9a\u304b\u306a\u3044\u7406\u7531<\/h3>\n\n\n\n<p>\u90311\u56de\u3001\u5b9a\u671f\u7684\u306b\u78ba\u8a8d\u3057\u3088\u3046\u3068\u3057\u305f\u6642\u671f\u3082\u3042\u308a\u307e\u3057\u305f\u3002\u3067\u3082\u7d9a\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u7d9a\u304b\u306a\u3044\u7406\u7531\u306f2\u3064\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305a\u3001\u300e\u3069\u3053\u3092\u898b\u308c\u3070\u3044\u3044\u304b\u3092\u6bce\u56de\u5224\u65ad\u3059\u308b\u30b3\u30b9\u30c8\u304c\u3042\u308b\u300f\u3053\u3068\u3002\u8868\u793a\u56de\u6570\u3001\u30af\u30ea\u30c3\u30af\u6570\u3001CTR\u3001\u9806\u4f4d\u30024\u3064\u3042\u308b\u6307\u6a19\u306e\u3069\u308c\u3092\u57fa\u6e96\u306b\u3059\u308b\u304b\u3092\u3001\u6bce\u56de\u8003\u3048\u308b\u72b6\u614b\u306b\u306a\u3063\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u6b21\u306b\u3001\u300e\u6539\u5584\u5019\u88dc\u304c\u3069\u308c\u304b\u3092\u81ea\u5206\u3067\u7d5e\u308a\u8fbc\u3080\u5fc5\u8981\u304c\u3042\u308b\u300f\u3053\u3068\u3002\u8a18\u4e8b\u304c\u5897\u3048\u3066\u304f\u308b\u3068\u30011\u672c1\u672c\u78ba\u8a8d\u3059\u308b\u306e\u306f\u73fe\u5b9f\u7684\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>\u8981\u306f\u3001\u300c\u78ba\u8a8d\u3059\u308b\u524d\u306b\u5224\u65ad\u304c\u5fc5\u8981\u300d\u306a\u69cb\u9020\u306b\u306a\u3063\u3066\u3044\u305f\u3053\u3068\u304c\u554f\u984c\u3067\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u5224\u65ad\u304c\u5148\u306b\u3042\u308b\u3068\u3001\u52d5\u3051\u306a\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">SEO\u6539\u5584\u304c\u6b62\u307e\u308b4\u30d1\u30bf\u30fc\u30f3<\/h3>\n\n\n\n<p>\u30fb\u300eSearch Console\u3092\u767b\u9332\u3057\u305f\u307e\u307e\u653e\u7f6e\u3057\u3066\u3044\u308b\u300f \u30c4\u30fc\u30eb\u304c\u300c\u3042\u308b\u3060\u3051\u300d\u306e\u72b6\u614b\u3002\u30c7\u30fc\u30bf\u306f\u6e9c\u307e\u3063\u3066\u3044\u308b\u304c\u6d3b\u304b\u305b\u3066\u3044\u306a\u3044\u3002<\/p>\n\n\n\n<p>\u30fb\u300e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3092\u773a\u3081\u308b\u3060\u3051\u3067\u7d42\u308f\u308b\u300f \u6570\u5b57\u306f\u898b\u3066\u3044\u308b\u3002\u3067\u3082\u300c\u3067\u3001\u3069\u3046\u3059\u308c\u3070\u3044\u3044\uff1f\u300d\u304c\u51fa\u3066\u3053\u306a\u3044\u3002<\/p>\n\n\n\n<p>\u30fb\u300e\u8868\u793a\u56de\u6570\u306f\u5897\u3048\u3066\u3044\u308b\u306e\u306b\u30af\u30ea\u30c3\u30af\u304c\u6765\u306a\u3044\u300f Google\u306b\u306f\u8a55\u4fa1\u3055\u308c\u3066\u3044\u308b\u304c\u3001\u30bf\u30a4\u30c8\u30eb\u3084\u30e1\u30bf\u304c\u8aad\u8005\u306b\u523a\u3055\u3063\u3066\u3044\u306a\u3044\u72b6\u614b\u3002\u6c17\u3065\u304d\u306b\u304f\u3044\u3002<\/p>\n\n\n\n<p>\u30fb\u300e\u90311\u78ba\u8a8d\u3057\u3088\u3046\u3068\u3057\u305f\u304c3\u56de\u3067\u6b62\u307e\u3063\u305f\u300f \u300c\u78ba\u8a8d\u3059\u308b\u524d\u306b\u5224\u65ad\u304c\u5fc5\u8981\u300d\u306a\u624b\u9806\u3060\u3068\u3001\u601d\u8003\u304c\u6b62\u307e\u3063\u3066\u7d9a\u304b\u306a\u3044\u3002<\/p>\n\n\n\n<!-- \u554f\u3044\u30ab\u30fc\u30c9\uff1aHTML_BLOCK_ASK -->\n<div style=\"border:1px solid #e5e7eb;border-radius:12px;padding:16px;margin:24px 0;background:#fafafa;\">\n  <div style=\"font-weight:700;margin-bottom:6px;\">\u8003\u3048\u76f4\u3059<\/div>\n  <div style=\"padding-left:12px;border-left:3px solid #111;line-height:1.7;\">\n    Search Console\u3092\u300c\u773a\u3081\u308b\u3060\u3051\u300d\u3067\u7d42\u308f\u3063\u3066\u3044\u306a\u3044\u304b\u78ba\u8a8d\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<br>\n    \u30fb\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u306e\u306b\u30af\u30ea\u30c3\u30af\u3055\u308c\u3066\u3044\u306a\u3044\u8a18\u4e8b\u304c\u3001\u4eca\u4f55\u672c\u3042\u308a\u307e\u3059\u304b\uff1f\n  <\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u898b\u308b\u3079\u304d\u6307\u6a19\u306f2\u30d1\u30bf\u30fc\u30f3\u3060\u3051<\/h3>\n\n\n\n<p>Search Console\u3067\u78ba\u8a8d\u3059\u308b\u306e\u306f4\u6307\u6a19\u3067\u3059\u304c\u3001\u30a2\u30af\u30b7\u30e7\u30f3\u306b\u3064\u306a\u304c\u308b\u306e\u306f2\u30d1\u30bf\u30fc\u30f3\u3060\u3051\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u6307\u6a19<\/th><th>\u610f\u5473<\/th><\/tr><\/thead><tbody><tr><td>\u8868\u793a\u56de\u6570<\/td><td>Google\u306e\u691c\u7d22\u7d50\u679c\u306b\u51fa\u305f\u56de\u6570<\/td><\/tr><tr><td>\u30af\u30ea\u30c3\u30af\u6570<\/td><td>\u5b9f\u969b\u306b\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u56de\u6570<\/td><\/tr><tr><td>CTR\uff08\u30af\u30ea\u30c3\u30af\u7387\uff09<\/td><td>\u8868\u793a\u3055\u308c\u305f\u3046\u3061\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u5272\u5408<\/td><\/tr><tr><td>\u63b2\u8f09\u9806\u4f4d<\/td><td>\u5e73\u5747\u4f55\u4f4d\u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u304b<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u300e\u2460\u8868\u793a\u56de\u6570\u304c\u591a\u3044\u306e\u306bCTR\u304c\u4f4e\u3044\u8a18\u4e8b\u300f\u306f\u3001Google\u306b\u306f\u8a55\u4fa1\u3055\u308c\u3066\u3044\u308b\u306e\u306b\u30bf\u30a4\u30c8\u30eb\u3084\u30e1\u30bf\u304c\u523a\u3055\u3063\u3066\u3044\u306a\u3044\u72b6\u614b\u3067\u3059\u3002\u30bf\u30a4\u30c8\u30eb\u6539\u5584\u304c\u6709\u52b9\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u300e\u2461\u63b2\u8f09\u9806\u4f4d\u304c11\u301c20\u4f4d\u306e\u8a18\u4e8b\u300f\u306f\u3001\u691c\u7d22\u7d50\u679c\u306e2\u30da\u30fc\u30b8\u76ee\u306b\u3044\u308b\u8a18\u4e8b\u3067\u3059\u3002\u8a18\u4e8b\u3092\u5f37\u5316\u3059\u308c\u30701\u30da\u30fc\u30b8\u76ee\u306b\u4e0a\u304c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306e2\u30d1\u30bf\u30fc\u30f3\u3092\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u81ea\u52d5\u62bd\u51fa\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<!-- Google -->\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-8421777867084732\"\n     crossorigin=\"anonymous\"><\/script>\n<!-- \u30b9\u30af\u30a8\u30a2 -->\n<ins class=\"adsbygoogle\"\n     style=\"display:block\"\n     data-ad-client=\"ca-pub-8421777867084732\"\n     data-ad-slot=\"8629238674\"\n     data-ad-format=\"auto\"\n     data-full-width-responsive=\"true\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<h3 class=\"wp-block-heading\">\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u624b\u9806<\/h3>\n\n\n\n<p>\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306f3\u30b9\u30c6\u30c3\u30d7\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305a\u3001Google Cloud Console\u3067Search Console API\u3092\u6709\u52b9\u5316\u3057\u307e\u3059\u3002\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u3066\u300cAPI\u3068\u30b5\u30fc\u30d3\u30b9\u3092\u6709\u52b9\u5316\u300d\u304b\u3089Google Search Console API\u3092\u9078\u629e\u3057\u307e\u3059\u3002\u8a8d\u8a3c\u60c5\u5831\u3067OAuth\u30af\u30e9\u30a4\u30a2\u30f3\u30c8ID\u3092\u4f5c\u6210\u3059\u308b\u3068\u304d\u3001\u540c\u610f\u753b\u9762\u306eUser Type\u306f\u300c\u5916\u90e8\u300d\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u7a2e\u985e\u306f\u300c\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u30a2\u30d7\u30ea\u300d\u3092\u9078\u3093\u3067\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305fJSON\u30d5\u30a1\u30a4\u30eb\u306f <code>scripts\/<\/code> \u306b\u914d\u7f6e\u3057\u307e\u3059\u3002\u540c\u610f\u753b\u9762\u306e\u300c\u30c6\u30b9\u30c8\u30e6\u30fc\u30b6\u30fc\u300d\u306b\u81ea\u5206\u306eGoogle\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3082\u5fd8\u308c\u305a\u306b\u3002<\/p>\n\n\n\n<p>\u6b21\u306b\u3001\u5fc5\u8981\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-verse\">pip3 install google-auth google-auth-oauthlib google-api-python-client<\/pre>\n\n\n\n<p>\u6700\u5f8c\u306b\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u3092 <code>scripts\/search_console_report.py<\/code> \u3068\u3057\u3066\u4fdd\u5b58\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u306a\u304a\u3001\u30d1\u30fc\u30de\u30ea\u30f3\u30af\u8a2d\u5b9a\u3092\u300c\u57fa\u672c\u300d\u304b\u3089\u5909\u66f4\u3059\u308b\u3068\u65e2\u5b58URL\u304c\u3059\u3079\u3066\u5909\u308f\u308a\u307e\u3059\u3002\u904b\u7528\u4e2d\u306e\u30b5\u30a4\u30c8\u3067\u306f\u5909\u66f4\u3057\u306a\u3044\u307b\u3046\u304c\u5b89\u5168\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u30b9\u30af\u30ea\u30d7\u30c8\u5168\u4f53<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/usr\/bin\/env python3\nimport os\nimport re\nimport time\nimport urllib.request\nfrom datetime import datetime, timedelta, timezone\nfrom html.parser import HTMLParser\n\nfrom google.oauth2.credentials import Credentials\nfrom google_auth_oauthlib.flow import InstalledAppFlow\nfrom google.auth.transport.requests import Request\nfrom googleapiclient.discovery import build\n\nBASE_DIR = os.path.dirname(__file__)\nCREDENTIALS_FILE = os.path.join(BASE_DIR, \"client_secret_***.apps.googleusercontent.com.json\")\nTOKEN_FILE = os.path.join(BASE_DIR, \"token.json\")\nSITE_URL = \"https:\/\/yoursite.com\/\"\nSCOPES = &#91;\"https:\/\/www.googleapis.com\/auth\/webmasters.readonly\"]\nREPORT_DIR = os.path.join(BASE_DIR, \"..\", \"posts\", \"report\")\n\n\nclass TitleParser(HTMLParser):\n    def __init__(self):\n        super().__init__()\n        self._in_title = False\n        self.title = \"\"\n\n    def handle_starttag(self, tag, attrs):\n        if tag == \"title\":\n            self._in_title = True\n\n    def handle_endtag(self, tag):\n        if tag == \"title\":\n            self._in_title = False\n\n    def handle_data(self, data):\n        if self._in_title:\n            self.title += data\n\n\ndef fetch_title(url):\n    try:\n        req = urllib.request.Request(url, headers={\"User-Agent\": \"Mozilla\/5.0\"})\n        with urllib.request.urlopen(req, timeout=5) as res:\n            html = res.read().decode(\"utf-8\", errors=\"ignore\")\n        parser = TitleParser()\n        parser.feed(html)\n        title = parser.title.strip()\n        title = re.sub(r\"\\s*&#91;|\\-\u2013]\\s*.*$\", \"\", title).strip()\n        return title or url\n    except Exception:\n        return url\n\n\ndef fetch_titles(urls):\n    titles = {}\n    for i, url in enumerate(urls):\n        titles&#91;url] = fetch_title(url)\n        if i &lt; len(urls) - 1:\n            time.sleep(0.5)\n    return titles\n\n\ndef get_credentials():\n    creds = None\n    if os.path.exists(TOKEN_FILE):\n        creds = Credentials.from_authorized_user_file(TOKEN_FILE, SCOPES)\n    if not creds or not creds.valid:\n        if creds and creds.expired and creds.refresh_token:\n            creds.refresh(Request())\n        else:\n            flow = InstalledAppFlow.from_client_secrets_file(CREDENTIALS_FILE, SCOPES)\n            creds = flow.run_local_server(port=0)\n        with open(TOKEN_FILE, \"w\") as f:\n            f.write(creds.to_json())\n    return creds\n\n\ndef fetch_page_data(service, days=28):\n    end_date = datetime.now(timezone.utc).date()\n    start_date = end_date - timedelta(days=days)\n    response = service.searchanalytics().query(\n        siteUrl=SITE_URL,\n        body={\n            \"startDate\": str(start_date),\n            \"endDate\": str(end_date),\n            \"dimensions\": &#91;\"page\"],\n            \"rowLimit\": 500,\n        }\n    ).execute()\n    return response.get(\"rows\", &#91;])\n\n\ndef analyze(rows):\n    low_ctr, borderline = &#91;], &#91;]\n    for row in rows:\n        url = row&#91;\"keys\"]&#91;0]\n        clicks = row.get(\"clicks\", 0)\n        impressions = row.get(\"impressions\", 0)\n        ctr = row.get(\"ctr\", 0) * 100\n        position = row.get(\"position\", 0)\n\n        if impressions &gt;= 50 and ctr &lt; 3.0:\n            low_ctr.append({\"url\": url, \"impressions\": int(impressions), \"clicks\": int(clicks), \"ctr\": round(ctr, 1), \"position\": round(position, 1)})\n        if 11 &lt;= position &lt;= 20 and impressions &gt;= 20:\n            borderline.append({\"url\": url, \"impressions\": int(impressions), \"clicks\": int(clicks), \"ctr\": round(ctr, 1), \"position\": round(position, 1)})\n\n    low_ctr.sort(key=lambda x: x&#91;\"impressions\"], reverse=True)\n    borderline.sort(key=lambda x: x&#91;\"position\"])\n    return low_ctr, borderline\n\n\ndef generate_report(low_ctr, borderline, titles):\n    today = datetime.now(timezone.utc).strftime(\"%Y-%m-%d\")\n    lines = &#91;\n        f\"# Search Console \u5b9a\u70b9\u30c1\u30a7\u30c3\u30af ({today})\", \"\",\n        \"## CTR\u6539\u5584\u5019\u88dc\uff08\u8868\u793a\u591a\u3044\u306e\u306b\u30af\u30ea\u30c3\u30af\u7387\u4f4e\u3044\uff09\",\n        \"\u8868\u793a\u56de\u657050\u4ee5\u4e0a &amp; CTR3%\u672a\u6e80\", \"\",\n        \"| \u8a18\u4e8b\u30bf\u30a4\u30c8\u30eb | \u8868\u793a\u56de\u6570 | \u30af\u30ea\u30c3\u30af | CTR | \u9806\u4f4d |\",\n        \"|------------|---------|--------|-----|------|\",\n    ]\n    for r in low_ctr&#91;:20]:\n        title = titles.get(r&#91;\"url\"], r&#91;\"url\"])\n        lines.append(f\"| &#91;{title}]({r&#91;'url']}) | {r&#91;'impressions']} | {r&#91;'clicks']} | {r&#91;'ctr']}% | {r&#91;'position']} |\")\n\n    lines += &#91;\n        \"\", \"## \u570f\u5916\u30ae\u30ea\u5019\u88dc\uff0811\u301c20\u4f4d \u2192 \u3042\u3068\u4e00\u62bc\u3057\u30671\u30da\u30fc\u30b8\u76ee\uff09\",\n        \"\u8868\u793a\u56de\u657020\u4ee5\u4e0a &amp; \u63b2\u8f09\u9806\u4f4d11\u301c20\u4f4d\", \"\",\n        \"| \u8a18\u4e8b\u30bf\u30a4\u30c8\u30eb | \u8868\u793a\u56de\u6570 | \u30af\u30ea\u30c3\u30af | CTR | \u9806\u4f4d |\",\n        \"|------------|---------|--------|-----|------|\",\n    ]\n    for r in borderline&#91;:20]:\n        title = titles.get(r&#91;\"url\"], r&#91;\"url\"])\n        lines.append(f\"| &#91;{title}]({r&#91;'url']}) | {r&#91;'impressions']} | {r&#91;'clicks']} | {r&#91;'ctr']}% | {r&#91;'position']} |\")\n\n    return \"\\n\".join(lines)\n\n\ndef main():\n    creds = get_credentials()\n    service = build(\"searchconsole\", \"v1\", credentials=creds)\n\n    print(\"Search Console\u304b\u3089\u30c7\u30fc\u30bf\u53d6\u5f97\u4e2d...\")\n    rows = fetch_page_data(service)\n    print(f\"{len(rows)}\u4ef6\u53d6\u5f97\u5b8c\u4e86\")\n\n    low_ctr, borderline = analyze(rows)\n\n    all_urls = list({r&#91;\"url\"] for r in low_ctr + borderline})\n    print(f\"\u8a18\u4e8b\u30bf\u30a4\u30c8\u30eb\u53d6\u5f97\u4e2d\uff08{len(all_urls)}\u4ef6\uff09...\")\n    titles = fetch_titles(all_urls)\n\n    report = generate_report(low_ctr, borderline, titles)\n\n    os.makedirs(REPORT_DIR, exist_ok=True)\n    today = datetime.now(timezone.utc).strftime(\"%Y-%m-%d\")\n    report_path = os.path.join(REPORT_DIR, f\"{today}_search_console_report.md\")\n    with open(report_path, \"w\", encoding=\"utf-8\") as f:\n        f.write(report)\n\n    print(f\"\u30ec\u30dd\u30fc\u30c8\u51fa\u529b: {report_path}\")\n    print(f\"CTR\u6539\u5584\u5019\u88dc: {len(low_ctr)}\u4ef6 \/ \u570f\u5916\u30ae\u30ea\u5019\u88dc: {len(borderline)}\u4ef6\")\n\n\nif __name__ == \"__main__\":\n    main()<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b9f\u884c\u3059\u308b<\/h3>\n\n\n\n<p>\u30b3\u30de\u30f3\u30c91\u884c\u3067\u52d5\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-verse\">python3 scripts\/search_console_report.py<\/pre>\n\n\n\n<p>\u521d\u56de\u306f\u30d6\u30e9\u30a6\u30b6\u304c\u958b\u3044\u3066Google\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u8a8d\u8a3c\u304c\u6c42\u3081\u3089\u308c\u307e\u3059\u3002\u8a31\u53ef\u3059\u308b\u3068 <code>token.json<\/code> \u304c\u751f\u6210\u3055\u308c\u30012\u56de\u76ee\u4ee5\u964d\u306f\u8a8d\u8a3c\u4e0d\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u5b9f\u884c\u5f8c\u3001<code>posts\/report\/2026-04-20_search_console_report.md<\/code> \u306e\u3088\u3046\u306a\u30ec\u30dd\u30fc\u30c8\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-verse\"># Search Console \u5b9a\u70b9\u30c1\u30a7\u30c3\u30af (2026-04-20)<br><br>## CTR\u6539\u5584\u5019\u88dc\uff08\u8868\u793a\u591a\u3044\u306e\u306b\u30af\u30ea\u30c3\u30af\u7387\u4f4e\u3044\uff09<br>\u8868\u793a\u56de\u657050\u4ee5\u4e0a &amp; CTR3%\u672a\u6e80<br><br>| \u8a18\u4e8b\u30bf\u30a4\u30c8\u30eb | \u8868\u793a\u56de\u6570 | \u30af\u30ea\u30c3\u30af | CTR | \u9806\u4f4d |<br>|------------|---------|--------|-----|------|<br>| [\u8a18\u4e8b\u30bf\u30a4\u30c8\u30ebA](https:\/\/...) | 187 | 1 | 0.5% | 7.7 |<br>| [\u8a18\u4e8b\u30bf\u30a4\u30c8\u30ebB](https:\/\/...) | 82 | 1 | 1.2% | 18.0 |<br><br>## \u570f\u5916\u30ae\u30ea\u5019\u88dc\uff0811\u301c20\u4f4d \u2192 \u3042\u3068\u4e00\u62bc\u3057\u30671\u30da\u30fc\u30b8\u76ee\uff09<br>...<\/pre>\n\n\n\n<p>\u8a8d\u8a3c\u30d5\u30a1\u30a4\u30eb\u306fGitHub\u306b\u4e0a\u3052\u306a\u3044\u3088\u3046 <code>.gitignore<\/code> \u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">token.json<br>client_secret*.json<\/pre>\n\n\n\n\u4eca\u65e5\u3084\u308b\u3053\u3068\n<!-- \u4eca\u65e5\u3084\u308b\u3053\u3068\u30ab\u30fc\u30c9\uff1aHTML_BLOCK_ONE -->\n<div style=\"border:1px solid #e5e7eb;border-radius:12px;padding:16px;margin:24px 0;background:#fafafa;\">\n  <div style=\"font-weight:700;margin-bottom:6px;\">\u307e\u305a\u306f\uff11\u3064\u3084\u3063\u3066\u307f\u308b<\/div>\n  <div style=\"line-height:1.7;\">\u30fb\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u52d5\u304b\u3057\u3066\u3001\u51fa\u3066\u304d\u305fCTR\u6539\u5584\u5019\u88dc\u306e\u4e2d\u304b\u30891\u672c\u3060\u3051\u30bf\u30a4\u30c8\u30eb\u3092\u5909\u3048\u3066\u307f\u308b<\/div>\n<\/div>\n\n\n\n\u53c2\u8003\n<!-- \u5916\u90e8\u30ea\u30f3\u30af\uff1aHTML_BLOCK_OUTLINK -->\n<div style=\"border:1px solid #e5e7eb;border-radius:12px;padding:16px;margin:24px 0;background:#fafafa;\">\n  <div style=\"font-weight:700;margin-bottom:6px;\">\u5916\u90e8\u30ea\u30f3\u30af<\/div>\n  <div style=\"margin-bottom:10px;line-height:1.7;\">Search Console API\u306e\u8a73\u7d30\u306a\u4ed5\u69d8\u306f\u3053\u3061\u3089\u304b\u3089\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/div>\n  <a href=\"https:\/\/developers.google.com\/webmaster-tools\/search-console-api-original\/v3\/searchanalytics\/query\" target=\"_blank\" rel=\"noopener noreferrer\" style=\"display:inline-block;padding:10px 14px;border-radius:10px;border:1px solid #111;text-decoration:none;\">Google Search Console API\u3067\u8aad\u3080 \u2192<\/a>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u81ea\u52d5\u5316\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u3084\u308a\u305f\u3044\u3053\u3068<\/h3>\n\n\n\n<p>\u6539\u5584\u5019\u88dc\u304c\u51fa\u3066\u304f\u308c\u3070\u3001\u6b21\u306e\u30b9\u30c6\u30c3\u30d7\u306f\u300c\u30bf\u30a4\u30c8\u30eb\u3092\u76f4\u3059 \u2192 \u6570\u5b57\u306e\u5909\u5316\u3092\u5f85\u3064\u300d\u3060\u3051\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u306e\u8a18\u9332\u3092GitHub\u3067\u7ba1\u7406\u3057\u3066\u304a\u304f\u3068\u3001\u3069\u306e\u8a18\u4e8b\u3092\u3044\u3064\u6539\u5584\u3057\u305f\u304b\u304c\u5c65\u6b74\u3068\u3057\u3066\u6b8b\u308a\u307e\u3059\u3002\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u51fa\u3057\u305f\u30ec\u30dd\u30fc\u30c8\u3092commit\u3059\u308b\u3060\u3051\u306a\u306e\u3067\u3001\u624b\u9593\u306f\u307b\u3068\u3093\u3069\u304b\u304b\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5224\u65ad\u3092\u6e1b\u3089\u305b\u3070\u52d5\u3051\u308b<\/h3>\n\n\n\n<p>Search Console\u304c\u7d9a\u304b\u306a\u304b\u3063\u305f\u306e\u306f\u3001\u610f\u8b58\u306e\u554f\u984c\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u300c\u898b\u308b\u524d\u306b\u5224\u65ad\u304c\u5fc5\u8981\u300d\u306a\u69cb\u9020\u306b\u306a\u3063\u3066\u3044\u305f\u3053\u3068\u304c\u539f\u56e0\u3067\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u6539\u5584\u5019\u88dc\u3092\u81ea\u52d5\u62bd\u51fa\u3059\u308b\u5f62\u306b\u3059\u308b\u3068\u3001\u3042\u3068\u306f\u305d\u306e\u30ea\u30b9\u30c8\u306e\u8a18\u4e8b\u30921\u672c\u305a\u3064\u76f4\u3059\u3060\u3051\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u5224\u65ad\u3092\u6e1b\u3089\u3057\u3066\u3001\u884c\u52d5\u3060\u3051\u6b8b\u3059\u3002\u3053\u306e\u69cb\u9020\u304c\u5b9a\u70b9\u30c1\u30a7\u30c3\u30af\u3092\u7d9a\u3051\u308b\u30b3\u30c4\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u203b\u3053\u306e\u8a18\u4e8b\u306b\u306f\u30a2\u30d5\u30a3\u30ea\u30a8\u30a4\u30c8\u30ea\u30f3\u30af\u3092\u542b\u307f\u307e\u3059\u3002 \u7d50\u8ad6\u304b\u3089\u8a00\u3044\u307e\u3059\u3002 Search Console\u306f\u300c\u898b\u3088\u3046\u3068\u3057\u306a\u3044\u3068\u898b\u306a\u3044\u300d\u30c4\u30fc\u30eb\u3067\u3059\u3002 \u90311\u56de\u624b\u52d5\u3067\u78ba\u8a8d\u3057\u3088\u3046\u3068\u3057\u3066\u3082\u3001\u5b9f\u969b\u306b\u306f\u307b\u3068\u3093\u3069\u7d9a\u304d\u307e\u305b\u3093\u3002 \u3063\u3066\u3053\u3068\u3067\u3001Python\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u6539\u5584\u2026<\/p>\n","protected":false},"author":1,"featured_media":1997,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[468],"tags":[1117,1054,689,18,193],"class_list":["post-1976","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-468","tag-googlesearchconsole","tag-python","tag-seo","tag-18","tag-193"],"_links":{"self":[{"href":"https:\/\/syuji-engineer.com\/index.php?rest_route=\/wp\/v2\/posts\/1976","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/syuji-engineer.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/syuji-engineer.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/syuji-engineer.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/syuji-engineer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1976"}],"version-history":[{"count":4,"href":"https:\/\/syuji-engineer.com\/index.php?rest_route=\/wp\/v2\/posts\/1976\/revisions"}],"predecessor-version":[{"id":1998,"href":"https:\/\/syuji-engineer.com\/index.php?rest_route=\/wp\/v2\/posts\/1976\/revisions\/1998"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/syuji-engineer.com\/index.php?rest_route=\/wp\/v2\/media\/1997"}],"wp:attachment":[{"href":"https:\/\/syuji-engineer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1976"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/syuji-engineer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1976"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/syuji-engineer.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}