カテゴリーを見る

Google Search ConsoleをGoogle Sheetsに接続する方法 - SQLでSEOデータを照会する

Google Search Console と Google スプレッドシートを接続する

データ取得元 サーチコンソール の中へ グーグル シート

Search Consoleアカウントから最新のデータをGoogleスプレッドシートに取り込み、いつでも更新できます。CSVファイルのアップロードも、Apps Scriptも、コピー&ペーストも不要です。初回は約10分で完了し、無料プランで利用できます。

約10分 コーディングは不要です 認証情報はあなたと共にあります どのブラウザでも、どのデバイスでも
行き詰まったら、遠慮なく質問してください。 開く サポート クエリ ストリーム(右上メニュー → サポート)からメッセージを送信してください。担当者が目を通しますので、「この画面で何を求めているのか分かりません」というご質問は、全く問題ありません。

最終的に手に入るもの

Google Search Console のロゴGoogle スプレッドシートに、Search Console アカウントに対する SQL クエリのリアルタイム結果を表示し、データが変更されるたびに最新の行を取得するボタンを追加します。例:

Google Search Console は、API を介してデータを保持します。通常、データを Google スプレッドシートに取り込むには、新しい数値が必要になるたびに Search Console ダッシュボードから CSV ファイルをエクスポートする必要があります。Query Streams を使用すれば、この手間を省くことができます。エージェントと呼ばれる小さなヘルパープログラムがデータのある場所でクエリを実行し、Google スプレッドシートのアドオンが必要な行を取得します。暗号化されたリンクを介して送信されるのは結果のみで、Google スプレッドシートはあらゆる場所、あらゆるデバイスのあらゆるブラウザで使用できます。

エージェントが走る場所インターネットに接続された常時稼働のコンピュータまたはサーバー検索コンソールアカウント鍵はここに置いておくクエリストリームエージェント資格情報を保持クエリストリーム暗号化されたリンクインターネット経由 · 結果のみあなたがどこにいてもあらゆるブラウザ:ノートパソコン、タブレット、スマートフォン、Chromebookグーグル シート行はシート状で届きます
エージェントはあなたのデータと共に存在します。スプレッドシートはGoogleのクラウドに保存されます。どこからでも開くことができ、行データが表示されます。

必要なもの

クエリストリームアカウント

このガイドは無料プランで十分です。登録はこちらから my.querystreams.com.

常時稼働しているコンピュータ上のエージェント

バックグラウンドで動作し、Googleスプレッドシートから要求があった際にSearch Consoleを呼び出す小さなプログラムです。必要なのはインターネット接続だけです。

Search Consoleへのログイン

Search Consoleに一度サインインして、読み取りアクセスを許可してください。クエリ ストリームにパスワードを入力する必要はありません。

どのコンピュータにエージェントがインストールされますか? 常に稼働していて、既にSearch Consoleアカウントにアクセスできるマシンであればどれでも構いません。 Google スプレッドシートはどこにでも配置できますブラウザ上で動作します。

接続方法は5つのステップです

  1. アカウントを作成する

    行く my.querystreams.com そしてサインアップします。 無料 これは計画です。試用版ではなく、正式な計画であり、Search Consoleアカウントの接続方法やGoogleスプレッドシートからのクエリ実行方法などを網羅しています。

  2. 常時稼働している任意のコンピューターにエージェントをインストールしてください。

    サインインして開く ダウンロードインターネットに接続された常時稼働のコンピュータまたはサーバーにエージェントをインストールしてください。インストールには1分ほどかかり、その後は自動的に起動します。

    ドライバではなく、なぜ小さなプログラムを使うのか? エージェントは、Windows、Mac、Linux 用の単一のインストール(Windows では約 85 MB、Mac と Linux では 100 MB 強)で、バックグラウンドで静かに動作します。ブラウザと同様に、Query Streams への暗号化されたアウトバウンド接続を 1 回確立するため、ファイアウォールのポートを開放したり、VPN を設定したりする必要はありません。キーはマシン上に保持され、行データは必要に応じてインターネット経由でユーザーのいる場所まで送信されます。ユーザー側で必要なのは、このアドオンだけです。

    ダウンロードページには アクセスキーエージェントに求められたら貼り付け、バッジが読み取るまで待ちます。 クエリ ストリームに接続しましたエージェント本体で行う操作はそれだけです。

    ご希望であれば、完全攻略ガイドもご用意しています。 Windows, マック, Linux.

  3. Search Consoleアカウントを指定してください。

    ブラウザに戻って、 データエージェント (下 データ 上部メニューにあります。エージェントがそこに表示されています。クリックしてください。 コネクタを追加する そして選択する Googleサーチコンソール. Need your Search Console credentials first? Open the walkthrough, then fill in:

    Create your Search Console credentials (about 15 minutes)

    Follow this with Google Search Console open in another tab. Query Streams keeps what you create here so your Agent can use it, and only ever reads from Google Search Console.

    Who can do this
    Search Console: Owner (verified or delegated) of the property, to add the service account as a user. Google Cloud: Owner of the project (you get Owner on any project you create), or the Create Service Accounts, Service Account Key Admin and Service Usage Admin roles on it.
    推奨
    Google Cloud service account JSON key (a .json file of type service_account), with the service account added as a Restricted user on the Search Console property

    始める前に

    • Your site already added and verified in Google Search Console. A brand-new property can take up to a week before Google has any data for it.
    • Owner access to that Search Console property. Only owners can add users. If you are a Full or Restricted user, you can do the Google Cloud part (steps 1 to 12) and ask an owner to do steps 13 to 17.
    • A Google account that can create a Google Cloud project, or an existing project you manage. If your company’s Google Cloud organization was created on or after May 3, 2024, Google blocks key downloads by default, and your Google Cloud administrator may need to allow them (see Common problems).
    • No billing account. Google does not charge for the Search Console API.
    • Already set up Query Streams’ Google Analytics 4 connector with a service account? You can reuse it: enable the Search Console API in the same project (step 4), then go to step 13 with that service account’s email. The same JSON key file goes into both connectors.
    • The Query Streams wizard open in another tab (Data Agents → Add connector → Google Search Console) with your Agent online.

    Steps

    1. Open Manage resources in Google Cloud

      Sign in with your Google account, open the Manage resources page of the Google Cloud console and click Create project.

      Already have a Google Cloud project you want to use, such as the one you made for the Google Analytics 4 connector? Skip to step 3 and pick it there. The first time you open Google Cloud, Google may ask for your country and for you to accept its Terms of Service before it shows the page.

    2. Name and create the project

      In the New project window, type a Project name such as Query Streams Search Console. Leave the parent organization or folder box as Google fills it in. If No organization is offered, that is fine. Click Create.

      Project names are 4 to 30 characters: letters, numbers, spaces, hyphens, single quotes and exclamation points. You don’t need to pick a billing account.

    3. Select the project

      Click the project picker at the top of the page, next to the Google Cloud logo, and click your project’s name. Every Google Cloud step below happens in this project.

      The most common mistake is enabling the API in one project and creating the key in another. Check the project name at the top of the page before each Google Cloud step.

    4. Enable the Google Search Console API

      Open the Google Search Console API page in the API Library. Check that your project’s name shows at the top, then click Enable.

      You can also get there from APIs & Services → Library: search for Google Search Console API. Don’t pick Indexing API or Site Verification API, which Query Streams doesn’t use. If Google shows the API is already enabled, go on to step 5. This one API covers everything Query Streams reads: your property list, sitemaps, Performance data and URL Inspection.

    5. Open the Create service account page

      Open the Create service account page. From inside Google Cloud you can also open the Navigation menu (three lines, top left), choose IAM & Admin → Service Accounts and click + Create service account.

      Reusing the service account from the Google Analytics 4 connector? Don’t create a second one. Do step 4 in its project, then go to step 13 with its email.

    6. Name the service account

      In Service account name, type query-streams-gsc. Google fills in Service account ID from it. The description is optional. Click Create and continue.

      The ID can’t be changed later. It becomes the first part of the service account’s email address.

    7. Skip the project roles

      The next section offers roles on the project. Leave the role box empty and click Continue.

      Don’t give the service account Owner, Editor or Viewer here. Its access to your Search Console data is granted inside Search Console in step 16. A Google Cloud role does nothing in Search Console and only widens what the key can do in Google Cloud.

    8. Finish creating the service account

      Leave the last section (Service account users role and Service account admins role) empty and click Done. You are back on the Service accounts list.

    9. Copy the service account email

      In the list, find the new account. Its email looks like [email protected]. Copy it and keep it for step 16.

      Copy the whole address, through .iam.gserviceaccount.com. The same address is in the key file from step 12, on the client_email line. Google says a new service account can take a minute or more before it is usable.

    10. Open the Keys tab

      Click the service account’s email address, then click the Keys tab.

    11. Start a new key

      Click Add key, then choose Create new key.

      If a box titled Service account key creation is disabled appears, your organization blocks key downloads. See Common problems.

    12. Download the JSON key

      Choose JSON as the Key type and click Create. Your browser downloads a .json file, usually into your Downloads folder.

      This download happens once: you can’t download the same file again. If you lose it, create a new key and delete the old one. Don’t choose P12. Keep the file private. Don’t email it or put it in a shared folder, because anyone who has it can read this Search Console data. Query Streams stores it for your Agent and only ever reads with it.

    13. Open Search Console and pick the property

      Open Google Search Console, signed in as an owner of the site. In the property drop-down at the top left, pick the property you want Query Streams to read.

      If the site is listed twice, once as a bare name (example.com) and once as an address (https://www.example.com/), the bare name is the Domain property. It covers every subdomain and both http and https, so it is usually the one to pick.

    14. Open Users and permissions

      In the left menu, scroll down and click Settings. Then click Users and permissions.

      Only property owners see Users and permissions. If it isn’t there, you are a Full or Restricted user: send the email from step 9 to an owner of the property and ask them to do steps 13 to 17.

    15. Click Add user

      Click Add user at the top right of the Users and permissions page. The Add user box opens.

    16. Enter the service account email and choose Restricted

      Paste the service account email from step 9 into Email address. Open the Permission list and choose Restricted.

      Restricted is enough: Google lets Restricted users view every report, including Performance, and use URL Inspection. Full also works. Either way the Agent asks Google only for read-only access, so it can’t submit sitemaps, remove URLs or change settings.

    17. Add the service account

      Click Add. The service account now shows in the property’s user list with Restricted permission.

      If Search Console won’t accept the address (for example, it says the email doesn’t match a Google Account or wasn’t found), see Common problems. Google has had a known problem with newly created service accounts since April 2026.

    18. Note how the property is written

      Look at the property’s name in the property drop-down. A bare name like example.com is a Domain property: you will enter it as sc-domain:example.com. A full address like https://www.example.com/ is a URL-prefix property: you will enter it exactly as shown, with the same http or https, the same www or no www, and the slash at the end.

      Easier still: the Detect button in the Query Streams wizard lists the exact values for you. Typing https://example.com/ when the property is https://www.example.com/, or leaving off the last slash, points at a property the service account can’t read.

    Permissions to grant

    ResourceアクセスUsed for
    Search Console user permission (Settings → Users and permissions)Restricted (Full also works)Every gsc table: search_analytics (Performance data: clicks, impressions, CTR and position by date, query, page, country and device), sites and sitemaps, all on by default, plus url_inspection (off by default, run on demand). Google lets Restricted users view all reports and use URL Inspection.
    Google Cloud API: Google Search Console APIEnabledTest connection, the Detect button and every gsc table. Without it Google answers 403 to every call.
    OAuth scope https://www.googleapis.com/auth/webmasters.readonlyRequested by the Agent (nothing for you to set)Every gsc table, Test connection and Detect. Google describes this scope as read-only access, so the Agent can’t submit sitemaps, remove URLs or change any setting.
    Google Cloud project role for the service accountなしNo table needs one. Search Console access comes only from the user permission above.
    Search Console Owner (the person doing the setup, not the service account)Owner (verified or delegated)No table. Only owners can add users to a property.

    Paste into Query Streams

    サービスアカウントのJSONキー
    The whole .json file from step 12. Click Upload from this computer under the box and pick the file (or From a file on the agent… if the file is on the Agent computer). Or open the file in Notepad (TextEdit on a Mac), select all, copy, and paste it from the first { to the last }. When you edit the connector later, leave this box blank to keep the stored key, or put a whole new file in to replace it.
    サイトプロパティURL
    Click Detect next to the box once the key is in (your Agent must be online). The box becomes a list of every property the service account can see, such as sc-domain:example.com — siteRestrictedUser. Pick yours. Or type it as worked out in step 18: sc-domain:example.com for a Domain property, or the full address with the final slash, such as https://www.example.com/, for a URL-prefix property.

    Common problems

    Test connection fails with Invalid key type. Expected ‘service_account’.

    Why: The file is not a service account key. Usually it is an OAuth client file (named like client_secret_….json) or an API key from APIs & Services → Credentials.

    Fix: Create a JSON key on the service account (steps 10 to 12) and use that file. A service account key contains the line “type”: “service_account”.

    Test connection fails with Invalid JSON format, or with Missing or empty ‘private_key’ field in service account key.

    Why: Only part of the file was copied, or the text was changed while copying.

    Fix: Click Upload from this computer and pick the .json file instead of copying. Or open the file again in Notepad (TextEdit on a Mac), press Ctrl+A (Cmd+A on a Mac), copy, and paste with nothing before or after it.

    Test connection fails with Service account ‘…’ has no Search Console properties, or Detect says Nothing detected.

    Why: Search Console has not added the service account to any property yet. Steps 13 to 17 were skipped, done on a different site, or Search Console refused the email.

    Fix: Add the exact email from step 9 as a user on the property (steps 13 to 17). Check that it now shows in Users and permissions, then click Test again.

    Test connection fails with Service account ‘…’ lacks access. Add it to Search Console property., even though the service account is listed in Users and permissions. Detect may show Google’s own message: Google Search Console API has not been used in project … before or it is disabled.

    Why: The Google Search Console API is not enabled in the Google Cloud project the key belongs to (the project_id line in the key file). Google refuses those calls with 403, which the test reports as missing access.

    Fix: Select that project in Google Cloud, enable Google Search Console API (step 4), wait a few minutes, and click Test again.

    Test connection says Connected, but gsc.search_analytics stays empty and the Agent log shows Search Analytics API error: Forbidden.

    Why: Site Property URL doesn’t exactly match a property the service account was added to: sc-domain: versus https://, www versus no www, http versus https, or a missing final slash. The test only checks that the service account can see at least one property. The sync reads the one you typed.

    Fix: In Data Agents, open the connector and click Edit. Click Detect next to Site Property URL, pick the property from the list, click Test connection, then Save changes.

    Search Console won’t add the service account. It says the email doesn’t match a Google Account, or Failed to add user: email not found.

    Why: A known Google problem: since late April 2026, Search Console and Google Analytics sometimes don’t recognise newly created service accounts for a while. Developers have reported it into September 2026. A typo or a space in the address gives the same message.

    Fix: Paste the address again with no spaces. If it is still refused, wait a few hours and try again. A service account created earlier usually works: if you have one (for example, from the Google Analytics 4 connector), add its email instead and use its key file.

    Google Cloud shows Service account key creation is disabled when you click Create new key.

    Why: Your organization enforces the policy iam.disableServiceAccountKeyCreation. Google turns it on by default for organizations created on or after May 3, 2024.

    Fix: Ask your Google Cloud administrator (someone with the Organization Policy Administrator role) to exempt this project from the policy. Google documents a tag-based exemption for a single project. Then repeat steps 11 and 12.

    A connector that used to work stops syncing, and Test connection fails with Connection error: … invalid_grant … Invalid JWT Signature.

    Why: The key was deleted, disabled or expired in Google Cloud.

    Fix: Create a new key (steps 10 to 12). In Data Agents, open the connector, click Edit, put the new file into Service Account JSON Key, click Test connection, then Save changes. Delete the old key in Google Cloud.

    Test connection fails with an error that mentions invalid_grant and Invalid JWT: Token must be a short-lived token.

    Why: The Agent computer’s clock is several minutes off. Google rejects sign-ins from a computer whose time is wrong.

    Fix: Turn on automatic (internet) time on the Agent computer, then click Test again.

    Clicks and impressions in gsc.search_analytics add up to less than the Search Console Performance chart.

    Why: Google leaves rare (anonymized) queries out of every row-by-row answer, while the chart totals still count them. Google also returns at most 50,000 rows per day per search type for each property. A URL-prefix property also covers less of the site than the Domain property.

    Fix: Nothing is broken. Compare row sums with Search Console’s table rather than the chart total, and pick the Domain property if you want the whole site.

    The newest two or three days are missing from gsc.search_analytics.

    Why: Google’s data is typically ready 2 to 3 days after the fact. The Agent reads only Google’s final data, up to three days before today.

    Fix: Nothing to change. Those days arrive on later syncs. Each sync also re-reads the last five days, so late changes are picked up.

    You want Query Streams to stop reading this property.

    Why: Deleting the connector does not remove Google’s access. The service account stays a user and the key stays valid.

    Fix: In Search Console → Settings → Users and permissions, open the menu next to the service account and click Remove access. In Google Cloud, open the service account’s Keys tab and delete the key. Then delete the connector in Data Agents.

    Limits to know

    • History: Search Console keeps the last 16 months. The Agent’s first sync reads all 16 months; older days are not available from Google.
    • Freshness: Google’s data is typically ready after 2 to 3 days. The Agent reads final data only, up to three days before today, and re-reads the last five days on each sync.
    • Rows: Google returns at most 50,000 rows per day, per search type, per property, sorted by clicks. Rare (anonymized) queries never appear as rows, so row sums are lower than Search Console’s chart totals.
    • Search types: web, image, video, news and discover, each in the search_type column. Discover rows have no query or device. News rows have no query.
    • Quota: Search Analytics allows 1,200 queries per minute per property and per user, and 40,000 per minute (30,000,000 per day) per Google Cloud project, plus a load limit counted per 10 minutes and per day. Queries grouped by page and query over long date ranges cost the most load, so a very large site’s first sync can hit quota exceeded. The Agent paces itself to 60 requests per minute.
    • URL Inspection: 2,000 inspections per day and 600 per minute per property. That is why the url_inspection table is off by default and runs only on demand.
    • New properties: Google can take up to a week to produce any data for a newly added site.
    • Keys: up to 10 keys per service account. Keys never expire by default, unless your organization sets a maximum lifetime.
    • Users: a property can have at most 100 users who are not owners.
    • Cost: Google does not charge for the Search Console API.

    Steps verified 8 October 2026. Sources: developers.google.com/webmaster-tools/v1/how-tos/authorizing, developers.google.com/webmaster-tools/v1/prereqs, developers.google.com/webmaster-tools/v1/sites, developers.google.com/webmaster-tools/v1/searchanalytics/…, developers.google.com/webmaster-tools/v1/how-tos/all-your…, developers.google.com/webmaster-tools/limits, developers.google.com/webmaster-tools/pricing, developers.google.com/search/blog/2022/10/performance-dat…, developers.google.com/search/blog/2018/06/new-url-inspect…, developers.google.com/identity/protocols/oauth2/service-a…, docs.cloud.google.com/resource-manager/docs/creating-mana…, docs.cloud.google.com/resource-manager/docs/access-contro…, docs.cloud.google.com/iam/docs/service-accounts-create, docs.cloud.google.com/iam/docs/keys-create-delete, docs.cloud.google.com/iam/docs/troubleshoot-org-policies, support.google.com/googleapi/answer/6158841?hl=en, support.google.com/webmasters/answer/7687615?hl=en, support.google.com/webmasters/answer/34592?hl=en, support.google.com/webmasters/answer/96568?hl=en, support.google.com/analytics/answer/10737381?hl=en, docs.airbyte.com/integrations/sources/google-search-console, help.imaginaire.co.uk/books/seo-tool/page/grant-access-to…, victorious.com/blog/google-search-console-add-user, seotesting.com/google-search-console/domain-vs-url-prefix, discuss.google.dev/t/problem-with-new-service-accounts/36…, piunikaweb.com/2026/05/01/google-service-account-email-no…, sanj.dev/post/google-analytics-search-console-service-acc…, dev.to/morinaga/what-i-learned-debugging-gsc-url-inspecti….

    接続名
    後で必ず思い出すような名前、例えば「販売データベース」など。
    サービスアカウントのJSONキー
    Search Console プロパティにユーザーとして追加された Google サービス アカウントのキー ファイルの内容を貼り付けてください。
    サイトプロパティURL
    Search Consoleに表示されているとおりに、サイト名を正確に入力してください。例:sc-domain:example.com または https://example.com/。

    クリック 接続テスト読むと 接続済み、 クリック セーブ接続は数秒以内に担当エージェントに到達します。

    テストは失敗しましたか? Usually a missing permission, or a credential from the wrong Search Console account. The walkthrough above lists the common problems and their fixes.

  4. Googleスプレッドシートにクエリストリームを追加する

    Google スプレッドシートを開き、 拡張機能 → アドオン → アドオンを入手、 検索する クエリストリーム、そしてクリック インストールまたは、直接インストールしてください。 Google Workspace Marketplace のクエリ ストリームGoogleはアドオンの許可を求めますが、これは正常な動作です。

    その後は、開くすべての Google スプレッドシートに表示されます。右側のサイド パネルにクエリ ストリーム アイコンが表示され、 拡張機能別途ログインする必要はありません。既にお使いのGoogleアカウントを認識するため、そのメールアドレスはQuery Streamsアカウントに登録されているものと同じである必要があります。

  5. 最初のテーブルを運び入れる

    シートの右側のサイドパネルにあるクエリ ストリーム アイコンをクリックします (または、以下で見つけます) 拡張機能)。 選ぶ クエリストリーマー そして、先ほど繋がった接続を選択してください。

    実行したいクエリを入力してください。これは、いくつかの列を抽出します。 gsc.search_analytics テーブル:

    例:SQL
    SELECT date, query, clicks, impressions FROM gsc.search_analytics ORDER BY clicks DESC LIMIT 100;

    下 目的地一覧表 行を配置するタブを選択し、次にクリックします。 クエリーの実行データは1~2秒でそのタブに表示されます。データが変更された場合はいつでも「クエリの実行」を再度クリックすると、タブが即座に更新されます。

    SQLを知らない? クエリは、クエリストリームポータルで作成してください。 クエリビルダー テーブルと列が表示されるので、ポイント&クリックで操作できます。ビジネスプランでは、Novaに「米国の顧客を表示して」といった簡単な英語で質問すると、SQLクエリが自動的に生成されます。クエリを保存すれば、ポータル内はもちろん、アドオンの「保存済みクエリ」リスト(パーソナルコア以降)からもワンクリックでアクセスできます。

それでおしまい。 データはシート内に保存され、ワンクリックで常に最新の状態に保たれます。お客様が要求した行以外は、ネットワークから外部に送信されることはありません。

良い次の動き

  • クエリを保存します ポータルにインストールすれば、Google スプレッドシートや Excel からワンクリックで再度実行できます。
  • フィルターを追加する 例えば日付範囲などを指定することで、同じクエリで編集せずに「今月」という回答を得ることができます。
  • 結果を共有する 同僚と共有する場合、同僚には行数が表示され、あなたの認証情報は表示されません。

人々が尋ねる質問

Search Consoleアカウントは、私がスプレッドシートを使用するコンピューター上に存在する必要がありますか?

いいえ。Search Consoleアカウントと同じ場所にエージェントが存在するだけで十分です。Googleスプレッドシートはどのデバイスのブラウザでも動作します。同じGoogleアカウントでアドオンを開けば、接続情報が表示されます。

私のデータはクエリストリームにコピーされますか?

いいえ。エージェントはデータが存在する場所でクエリを実行し、返された行のみを送信します。その間に同期や保存は一切行われません。

無料プランで本当にこれがカバーされるのですか?

はい。無料プランは継続して利用できるプランで、期限切れのトライアルではありません。プランに含まれる内容については、 価格ページ.

シートは自動的に更新されますか?

最新の行を取得したい場合は、いつでも「クエリの実行」を再度クリックしてください。ユーザーが何も操作しなくてもスケジュールに基づいてシートが更新されるようにするには、クエリ ストリーム ポータル(ストリーム → 自動化)で自動化を設定します。これはすべてのプランに含まれています。

まだ行き詰まっていますか? 開く サポート クエリ ストリームで、どのステップで何が表示されているかをお知らせください。接続をご案内いたします。
クエリ ストリームは同じデータを接続しますエクセルクロード、カーソル、チャットGPTREST APIさらに

すべてのガイド Search Console

あなたの設定とは少し違いますか?

  • Google検索のクリック数ではなく、サイトへの訪問数、ユーザー数、コンバージョン数を重視しますか?Google Analytics 4は、GA4から直接日々のトラフィックテーブルを提供します → GA4
更新日 10月 8, 2026