Topics API מאפשר לפרסם על סמך תחומי עניין בלי להשתמש בקובצי Cookie של צד שלישי.
How the Topics API works
The Topics API can be used to observe and provide access to topics that appear to be of interest to the user, based on their activity. The Topics API can then give API callers (such as ad tech platforms) access to a user's topics of interest, but without revealing additional information about the user's activity.
Key concepts
- A topic is a human-readable topic of interest for the current user and is part of the Topics taxonomy.
- A caller is an entity, such as an app, a third-party SDK, a website, or service, that makes a request to the Topics API to observe or access a user's interests.
- A topic is observed by a caller, if the caller made a Topics API request from a web page or app associated with this topic during the past three epochs.
- An epoch is a period of topic computation, which defaults to one week.
- A taxonomy is a hierarchical list of categories, which includes, for example, such categories as
/Arts & Entertainment/Music & Audio/Soul & R&B
and/Business & Industrial/Business Services/Corporate Events
. - Topics are derived using a classifier model that maps user activity to zero or more topics.
Topics API flow core steps
The Topics API lifecycle has three main steps:
- Observe user activity, such as when they visit the web page
https://cats.example/tabby/index.html
or download the appcats
. - Derive topics from user activity, for example
/Pets & Animals/Pets/Cats
. - Access topics previously observed for the user, for example as a signal to select relevant advertising (such as a cat food promotion).
Observe topics
Callers can only access topics of interest that they've observed. A caller observes a topic when they make a Topics API request from a context associated with this topic. To illustrate this concept, consider the following simplified example.
- Suppose there are two Topics API callers: A and B.
- There are two contexts:
- Greenhouse, for example an app named Greenhouse or a website greenhouse.example, associated with the topic
Home & Garden
. - Tennis exercises, for example an app named Tennis Exercises or a website tennis.example, associated with the topic
Sports/Tennis
.
- Greenhouse, for example an app named Greenhouse or a website greenhouse.example, associated with the topic
- Both caller A and B are present in the context of Greenhouse.
- Only the caller B is present in the context of Tennis exercises.
- Assume that no topics were observed for the user before epoch 1, for the sake of simplification.
- The user visits the Greenhouse app, and callers A and B make a Topics API call to record the user visit to the page or app (see the implementation guide suggested in Next steps to find out how to call the Topics API). This record (a hostname or app data) is later used to derive topics of interest. The Topics API will later mark the topic
Home & Garden
as observed by both callers A and B. - The user visits the Tennis exercises app. Only the caller B sends a Topics API request. The Topics API will later mark the topic
Sports/Tennis
as observed by the caller B. - By the end of the epoch, the Topics API refreshes the user's top topics and determines the callers that observed these topics based on user activity.
- Later, when the caller B makes another Topics API call, it can get either
Home & Garden
orSports/Tennis
topic (or, with a 5% chance, a random topic) for this user in the response array. - Caller A can only access the topic
Home & Garden
, as it has never observed the topicSports/Tennis
. This means that a third-party will only learn about a user's topic of interest within the specific context (app or website) where it is present.

Derive topics
Topics derives topics of interest from user activity. The topics are selected from a predefined open-source taxonomy. Once per epoch, Topics refreshes the user's top five topics and the callers that observed them during the epoch. The Topics classifier model derives topics from user activity: hostname for a web page visit, app information on Android.
Caller accesses user's topics of interest
The API returns only topics that have been observed by the caller within the most recent three epochs. A maximum of three topics may be returned to a caller,one topic for each of the three recent epochs (if the caller observed topics for that epoch). The returned topics can be used by the caller to supplement any contextual information and can be combined to help find a more relevant ad for the user.
Epochs
The Topics API must ensure that the topics of interest it provides are kept up to date. The topics are inferred for a user based on their activity during a period of time known as an epoch, one week by default. Each user has their own epochs (epochs are "per user") and the initial start time is randomized.
Once each epoch, the Topics API computes the user's top five topics and determines which callers observed those topics using on-device information. The topic selected for each epoch is randomly selected from the user's top five topics for that time period. To further enhance privacy and ensure that all topics may be represented, there is a 5% chance the topic is randomly selected from all possible topics in the taxonomy of interests.
נושאים באינטרנט – איך זה עובד בפועל
באינטרנט, המערכת מסיקה את הנושאים משמות המארחים של הדפים שבהם המשתמש מבקר. לדוגמה, הנושא שהמערכת מסיקה לאתר dogs.example יכול להיות /חיות מחמד ובעלי חיים/חיות מחמד/כלבים.
בתרשים הבא מוצגת דוגמה פשוטה שממחישה איך Topics API יכול לעזור לפלטפורמת טכנולוגיית פרסום לבחור מודעה מתאימה. בדוגמה הזו, נניח שכבר יש בדפדפן של המשתמש מודל למיפוי שמות המארחים של אתרים לנושאים.

הדפדפן קובע את המקור של מבצע הקריאה על סמך ההקשר של הקוד שמפעיל את Topics API. בפועל, המשמעות היא שמשתמשי Topics קוראים ל-API ב-iframe מהמקור שלהם, או שהם כוללים נושאים באחזור למקור שלהם.
לדוגמה, אפשר להטמיע פלטפורמה לספקים (SSP) בכמה אתרים של בעלי תוכן דיגיטלי. לאחר מכן, פלטפורמת ה-SSP יכולה לשלוח קריאה ל-Topics API בתוך iframe מהמקור שלה, וכך לבחון נושאים שמשויכים למשתמש באתרים האלה. לאחר מכן, אפשר לשתף את הנושאים האלה עם פלטפורמה למפרסמים (DSP) כדי לעזור לה לבחור מודעה רלוונטית למשתמש.
איך ה-API קובע אילו מבצעי קריאה יראו אילו נושאים
גורמים שמפעילים את ה-API מקבלים רק נושאים שהם'ראו' לאחרונה, והנושאים של המשתמש מתעדכנים פעם בכל תקופת זמן לקביעת נושאים: תקופה מסוימת, שמוגדרת לשבוע אחד בהטמעה של Chrome. כלומר, ה-API מספק חלון נע שבו מבצע קריאה מסוים יכול לקבל נושאים שנצפו.
בטבלה הבאה מופיעה דוגמה (קטנה באופן לא מציאותי) להיסטוריית גלישה היפותטית של משתמש במהלך תקופה אחת. בטבלה מוצגים הנושאים שמשויכים לאתרים שבהם המשתמש ביקר, וגורמי הקריאה ל-API שנמצאים בכל אתר (הישויות שמפעילות את document.browsingTopics()
בקוד JavaScript שכלול באתר).
אתר | נושאים | גורמים שמפעילים קריאות ל-API באתר |
---|---|---|
running.example | Running & Walking Athletic Shoes |
adtech1.example adtech2.example |
dogs.example | Dogs |
adtech1.example |
holiday.example | Hotels & Accommodations |
adtech2.example |
sunglasses.example | Sunglasses |
[none] |
בסוף התקופה (שבוע אחד כברירת מחדל), Topics API יוצר את הנושאים המובילים של הדפדפן בשבוע.
- כעת, adtech1.example עומד בדרישות לקבלת הנושאים
Running & Walking
,Athletic Shoes
ו-Dogs
, כי הם זוהו בדומיין running.example וגם בדומיין dogs.example. - הדומיין adtech1.example לא עומד בדרישות לקבלת הנושא
Hotels & Accommodations
למשתמש הזה, כי הוא לא מופיע באף אחד מהאתרים שבהם המשתמש ביקר לאחרונה ושמשויכים לנושא הזה. - הדומיין adtech2.example ראה את הנושאים
Running & Walking
, Athletic Shoes
ו-Hotels & Accommodations
, אבל לא ראה את הנושאDogs
.
המשתמש ביקר באתר sunglasses.example, שכולל את הנושא Sunglasses
, אבל לא היו קריאות ל-Topics API באתר הזה. בשלב הזה, המשמעות היא שה-API לא יחזיר את הנושא Sunglasses
לכל מבצע קריאה.
בשבוע השני, המשתמש מבקר באתר אחר:
אתר | נושאים | גורמים שמפעילים קריאות ל-API באתר |
---|---|---|
cameras.example | Camera & Photo Equipment |
adtech2.example |
בנוסף, קוד מ-adtech2.example מתווסף אל sunglasses.example
:
אתר | נושאים | גורמים שמפעילים קריאות ל-API באתר |
---|---|---|
sunglasses.example | Sunglasses |
adtech2.example |
בנוסף לנושאים Running & Walking
, Athletic Shoes
ו-Hotels & Accommodations
משבוע 1, המשמעות היא ש-adtech2.example יוכל עכשיו לקבל את הנושאים Camera & Photo Equipment
ו-Sunglasses
– אבל רק החל מהעידן הבא, שבוע 3. כך צדדים שלישיים לא יכולים ללמוד יותר על ההיסטוריה של המשתמש (במקרה הזה, עניין באופנה) מאשר הם יכולים ללמוד באמצעות קובצי cookie.
אחרי שבועיים נוספים, יכול להיות שהנושאים Running & Walking
, Athletic Shoes
ו-Hotels & Accommodations
יוצאו מרשימת הנושאים שעומדים בדרישות של adtech2.example אם המשתמש לא יבקר באתרים שכוללים את הנושאים האלה וגם את הקוד מ-adtech2.example.

מודל מסווג
התכונה 'נושאים' משתמשת במודל סיווג שממפה שמות מארח של אתרים לנושא אחד או יותר (ניתוח מידע נוסף, כמו כתובות URL מלאות או תוכן דפים, עשוי לאפשר הצגת מודעות רלוונטיות יותר, אבל גם לפגוע בפרטיות).
טקסונומיה
הנושאים נבחרים מטקסונומיה. הנושאים האלה נבחרו על ידי צוות Chrome, במטרה שהטקסונומיה תהפוך למשאב שמנוהל על ידי שותפים מהימנים בסביבה העסקית. הטקסונומיה צריכה להיות קטנה מספיק כדי שדפדפנים של משתמשים רבים ישויכו לכל נושא. המטרה הסופית היא שהטקסונומיה תגיע מגורם חיצוני, שיכלול משוב ורעיונות מגורמים שונים בתחום.
כדי להימנע מקטגוריות רגישות, הנושאים צריכים להיות גלויים לכולם, להיבחר על ידי אנשים ולהישאר מעודכנים. הטקסונומיה שבה משתמש Chrome נוצרה על ידי אנשים כדי להחריג קטגוריות שנחשבות רגישות, כמו מוצא אתני או נטייה מינית.
סיווג של Topics
הנושאים נבחרים באופן ידני ל-50,000 האתרים המובילים, והרשימה הזו של שמות המארחים והנושאים שמוגדרים כברירת מחדל משמשת לאימון מודל הסיווג. לגבי האתרים המובילים, הגישה לנושאים מתבצעת מרשימת ההחרגות ולא באמצעות מודל הסיווג. אפשר להציג את רשימת ההחרגות באופן מקומי במחשב.

chrome://topics-internals
מפורטים גרסת המודל, הנתיב שלו והנושאים שמשויכים לכל מארח שמופיע ברשימה.ההטמעה של Topics API ב-Chrome מאפשרת להוריד קובץ TensorFlow Lite שמייצג את המודל, כדי שניתן יהיה להשתמש בו באופן מקומי במכשיר של המשתמש.
איך נבחרים חמשת הנושאים המובילים של המשתמש
ה-API מחזיר נושא אחד לכל תקופת זמן לקביעת נושאים, עד שלושה נושאים לכל היותר. אם מוצגים שלושה נושאים, הם כוללים נושאים מהעידן הנוכחי ושני העידנים הקודמים.
- בסוף כל תקופת זמן, הדפדפן אוסף רשימה של דפים שעומדים בקריטריונים הבאים:
- המשתמש ביקר בדף במהלך התקופה.
- הדף כולל קוד שמפעיל את
document.browsingTopics()
. - ממשק ה-API הופעל (לדוגמה, לא נחסם על ידי המשתמש או על ידי כותרת תגובה).
- הדפדפן, במכשיר של המשתמש, משתמש במודל הסיווג שסופק על ידי Topics API כדי למפות את שם המארח של כל דף לרשימה של נושאים.
הדפדפן יוצר רשימה של חמשת הנושאים המובילים.
- כל אחד מ-22 נושאי הבסיס בטקסונומיה מוקצה לקטגוריה של 'תועלת גבוהה' או 'תועלת רגילה' על סמך משוב מסביבת הפרסום. הדפדפן ממיין את הנושאים לפי הקצאת הקטגוריה שלהם. כל נושאי הצאצאים יורשים את הקצאת הקטגוריה של נושא ההורה ברמה הבסיסית. נושאים בקטגוריה 'שימושיות גבוהה' מקבלים עדיפות גבוהה.
- לאחר מכן, הדפדפן ממיין את הנושאים לפי תדירות בכל קטגוריה.
- חמשת הנושאים המובילים מהרשימה הממוינת הזו נבחרים כנושאים המובילים של המשתמש באותה תקופה.
לאחר מכן, ה-method document.browsingTopics()
מחזיר נושא אקראי מתוך חמשת הנושאים המובילים בכל תקופת זמן לקביעת נושאים, עם סיכוי של 5% שכל אחד מהם יבחר באופן אקראי מתוך הטקסונומיה המלאה של הנושאים. ב-Chrome, המשתמשים יכולים גם להסיר נושאים ספציפיים או לנקות את היסטוריית הגלישה כדי לצמצם את מספר הנושאים שמוחזרים על ידי ה-API. המשתמשים יכולים גם לבטל את ההסכמה לשימוש ב-API.
אפשר לראות מידע על נושאים שנצפו במהלך האפוקליפסה הנוכחית בדף chrome://topics-internals
.
Next steps
Setup
Implement Topics
See also
Check out our resources to better understand the Topics API on the Web.
- Check out Topics demos, collab and walkthrough videos.
- See the list of Chrome flags that allow developers to customize the Topics API for testing.
- See how users and developers can control the API.
- Check out the resources for technical explainers and support. Ask questions, engage and share feedback.