Before you can query Street View Insights data, you must first [sign
up](https://docs.google.com/forms/d/e/1FAIpQLSetyVSIJc2U4C8rn7Z2olWhK9MEbD_YPadqHuPO3SE-yL21yg/viewform)
to get access to the Street View Insights product. Once your account has been
onboarded, you will be able to **subscribe** to the Street View Insights dataset.

## Prerequisites

To access the Street View Insights data, you must:

1. [Sign up](https://docs.google.com/forms/d/e/1FAIpQLSetyVSIJc2U4C8rn7Z2olWhK9MEbD_YPadqHuPO3SE-yL21yg/viewform)
   to request access to Street View Insights.

2. Have a [Google Cloud](https://cloud.google.com/) account.

   If you don't have an account, click the **Get Started** button that links to
   an interactive setup experience in the Cloud console for new
   users:

   [Get Started](https://console.cloud.google.com/google/maps-apis/start?utm_source=Docs_GS_Button&ref=https://developers.google.com/maps/&utm_content=Docs_Central)
3. Enable the BigQuery API. For instructions on enabling BigQuery and for a
   tutorial on using BigQuery, see [Query a public dataset with the Google Cloud console](https://cloud.google.com/bigquery/docs/quickstarts/query-public-dataset-console).

4. Enable [Vertex AI](https://console.cloud.google.com/vertex-ai/studio/multimodal).

5. Ensure that your account has the [Analytics Hub Subscription Owner](https://cloud.google.com/bigquery/docs/analytics-hub-grant-roles#ah-subscription-owner-role)
   (`roles/analyticshub.subscriptionOwner`) role to perform subscriber tasks.

6. Ensure that your account has the [BigQuery User](https://cloud.google.com/bigquery/docs/access-control#bigquery.user)
   (`roles/bigquery.user`) role to create datasets.

## Subscribe to the Street View Insights dataset

Data listings are available for consumption in either the US or EU
[multi-regions](https://docs.cloud.google.com/bigquery/docs/locations#multi-regions).
For more details, learn how to [view and subscribe to datasets using
BigQuery](https://docs.cloud.google.com/bigquery/docs/analytics-hub-view-subscribe-listings#subscribe-listings)

To subscribe to the Street View Insights dataset:

1. Go to BigQuery Analytics Hub in the Cloud Console.

2. Find the "Street View Insights" dataset and open it.

3. Open a listing. For example for an EU listing:

   ![Subscribe to the EU listing.](https://developers.google.com/static/maps/documentation/street-view-insights/images/subscribe.png)
4. Select the **Subscribe** button in the dialog.

5. Confirm or edit the **Project** , **Linked dataset name** , **Primary
   region** , and **Replica regions** in the dialog. You can choose to use the
   default listing name or you can optionally set the name to use your own
   naming convention.

6. Select **Save**.

7. When complete, the table subscription appears in the BigQuery **Explorer**
   panel in the Google Cloud console. In your SQL queries, use the table name
   shown below to access the data.

### Grant access to the linked dataset

Subscribing to a listing creates a read-only linked dataset in your Google
Cloud project. By default, other principals---such as team members, Google
groups, or service accounts---don't have access to this linked dataset. Grant
access explicitly, even for principals or groups you provided during
onboarding.

To let other principals view and query the linked dataset, complete the
following steps:

1. In the BigQuery **Explorer** pane, expand your project, click **Datasets**,
   and select the linked dataset.

2. Click **Sharing \> Permissions** , and
   then click **Add principal**.

3. In the **New principals** field, enter the email addresses of the users,
   Google groups, or service accounts that need access.

4. In the **Select a role** list, select **BigQuery Data Viewer** , which
   grants the `roles/bigquery.dataViewer` role.

5. Click **Save**.

Principals who run SQL queries also need permission to create BigQuery jobs in
their query project, such as the `roles/bigquery.jobUser` or
`roles/bigquery.user` role. For more information, see
[Control access to resources with IAM](https://cloud.google.com/bigquery/docs/control-access-to-resources-iam#grant_access_to_a_dataset).

## Access your GCS buckets

| Bucket Name | Bucket Purpose | Notes |
|---|---|---|
| ``` geoai_published_CUSTOMERID__LOCATION ``` | Image files published with each snapshot. | Available to all customers |
| ``` geoai_ephemeral_CUSTOMERID__LOCATION ``` | Ephemeral data for use by the customer for storing intermediate imagery assets. | Only available to customers who have specified a customer area of interest during onboarding. |

Replace the following:

- `CUSTOMERID` with the customer ID provided in your onboarding email.
  - For example: `00000012-3333-4445-8999-aabbccddeeff`.
- `LOCATION`: the lowercase Google Cloud location selected during your onboarding.
  - For example: `us`, `eu` or `jp`.

> [!NOTE]
> **Note:** Files stored in these buckets have a retention time to live (TTL) of 35 days.

## What's next

- [Review samples](https://developers.google.com/maps/documentation/street-view-insights/samples).
- [Review the table schemas](https://developers.google.com/maps/documentation/street-view-insights/reference.md.txt).