Topics API: Testing and analysis tools

Learn about the tools available in Chrome to view Topics API information, understand how topics are assigned, and debug your implementation.

View Topics API information

The chrome://topics-internals page is available in Chrome on desktop once you enable the Topics API. This displays topics for the current user, topics inferred for hostnames, and technical information about the API implementation. We're iterating and improving the design of the page based on developer feedback. You can shape Topics API by submitting your feedback as a Chromium bug.

View topics observed for your browser

Users can view information about topics observed for their browser during the current and previous epochs by viewing chrome://topics-internals.

The chrome://topics-internals page with Topics State panel selected.
The chrome://topics-internals page Topics State panel shows topic IDs, random and real topic assignments, and taxonomy and model versions.

This screenshot shows that recently visited sites include topics-demo-cats.glitch.me and cats-cats-cats-cats.glitch.me. This causes the Topics API to select Pets and Cats as two of the top topics for the current epoch. The remaining three topics have been chosen at random, since there is not enough browsing history (on sites that observe topics) to provide five topics.

The Observed-by context domains (hashed) column provides the hashed value of a hostname for which a topic was observed.

View topics inferred for hostnames

You can also view the topics inferred by the Topics classifier model for one or more hostnames in chrome://topics-internals.

The chrome://topics-internals page with Classifier panel selected.
The chrome://topics-internals page Classifier panel shows topics selected, hosts visited, and model version and path.

The current implementation of the Topics API infers topics from hostnames only; not from any other part of a URL.

Use hostnames only (without protocol or path) to view inferred topics from the chrome://topics-internals Classifier. chrome://topics-internals will display an error if you attempt to include a "/" in the Host field.

View Topics API information

You can find information about the Topics API implementation and settings, such as the taxonomy version and epoch duration, in chrome://topics-internals. These values reflect default settings for the API or parameters successfully set from the command line. This may be helpful to confirm that command line flags have worked as expected.

In the example, time_period_per_epoch has been set to 15 seconds (the default is seven days).

chrome://topics-internals page with Features and Parameters panel selected.
The chrome://topics-internals Features and Parameters panel shows enabled features, time per epoch, number of epochs to use to calculate topics, taxonomy version, and other settings.

The parameters shown in the screenshot correspond to flags that can be set when running Chrome from the command line. Learn more about how to control Topics API with Chrome flags in the dedicated setup section.

--enable-features=BrowsingTopics,BrowsingTopicsParameters:time_period_per_epoch/15s/max_epoch_introduction_delay/3s,PrivacySandboxAdsAPIsOverride,PrivacySandboxSettings3,OverridePrivacySandboxSettingsLocalTesting

Colab

Run the Colab to learn how to load the TensorFlow Lite model used by Chrome to infer topics from hostnames. You'll find the instructions in the colab description or in the walkthrough video. Note this this colab uses the old taxonomy version.

Use the Topics API on websites with prebid.js

As noted in the release of Prebid 7, the community actively developed an integration with the Topics API using a new module. This module was merged in December 2022. Read Prebid's Topics API module documentation. For more information on the integration, reach out to Prebid.js through whatever standard channel they offer.

Next steps

Learn how users and developers can manage and customize the Topics API to suit user's preferences and needs.
Check out our resources for troubleshooting, technical support, filing bugs and asking questions.

See also

Check out our resources to better understand the Topics API on the Web.