課程資訊 (CourseCourseInstance) 結構化資料

這張插圖顯示課程資訊在 Google 搜尋中可能的顯示方式

您可以使用課程資訊結構化資料向 Google 說明您的課程內容,協助使用者找到您的課程。只要提供課程的詳細資訊 (例如評論者評分、定價和課程詳細資料),Google 就能進一步瞭解您的課程,並透過課程資訊複合式搜尋結果,為使用者呈現豐富的體驗。

以下介紹兩項課程複合式搜尋結果功能,皆使用相同的 schema.org Course 類型。如果您的網站提供課程相關資訊,請按照這兩個實作指南操作,即可開始使用這兩項功能:

  • 課程清單:這類複合式搜尋結果可列出相同網站中的課程。
  • 課程資訊:這類輪轉介面可顯示各種網站的詳細課程資訊。

功能適用情況

凡是提供 Google 搜尋服務的所有地區,都能以英文顯示課程資訊複合式搜尋結果。我們希望未來能支援更多非英文的課程。

如何新增結構化資料

結構化資料是一種標準化格式,能夠提供網頁相關資訊並分類網頁內容。如果您是第一次使用結構化資料,請參閱這篇文章,進一步瞭解結構化資料的運作方式。

以下簡要說明如何建立、測試及發布結構化資料。

  1. 新增必要屬性。根據您使用的格式,瞭解要在網頁中的什麼位置插入結構化資料
  2. 遵循指南規範
  3. 使用複合式搜尋結果測試驗證程式碼,並修正所有重大錯誤。此外,我們也建議您修正工具中可能標記的任何非重大問題,因為這有助於改善結構化資料的品質 (但並非符合複合式搜尋結果的顯示條件)。
  4. 部署幾個包含結構化資料的網頁,並使用網址檢查工具測試 Google 轉譯網頁的情形。請確認 Google 可以存取您的網頁,且網頁並未遭到 robots.txt 檔案或 noindex 標記封鎖,也未設有登入規定。如果網頁看起來沒問題,您可以要求 Google 重新檢索您的網址
  5. 為了讓 Google 掌握日後的異動內容,建議您提交 Sitemap。您可以使用 Search Console Sitemap API 自動執行這項操作。

範例

以下是單一課程資訊頁面的範例。


<html>
  <head>
    <title>Introduction to Computer Science and Programming</title>
    <script type="application/ld+json">
    {
      "@context": "https://schema.org/",
      "@id": "https://www.example.com/advancedCpp",
      "@type": "Course",
      "name": "Learn Advanced C++ Topics",
      "description": "Improve your C++ skills by learning advanced topics.",
      "publisher": {
        "@type": "Organization",
        "name": "CourseWebsite",
        "url": "www.examplecoursewebsite.com"
      },
      "provider": {
        "@type": "Organization",
        "name": "Example University",
        "url": "www.example.com"
      },
      "image": [
        "https://example.com/photos/1x1/photo.jpg",
        "https://example.com/photos/4x3/photo.jpg",
        "https://example.com/photos/16x9/photo.jpg"
      ],
      "aggregateRating": {
        "@type": "AggregateRating",
        "ratingValue": 4,
        "ratingCount": 1234,
        "reviewCount": 450
      },
      "offers": [{
        "@type": "Offer",
        "category": "Paid",
        "priceCurrency": "EUR",
        "price": 10.99
      }],
      "totalHistoricalEnrollment": 12345,
      "datePublished": "2024-03-21",
      "educationalLevel": "Advanced",
      "about": ["C++ Coding", "Backend Engineering"],
      "teaches": ["Practice and apply systems thinking to plan for change",
                  "Understand how memory allocation works."],
      "financialAidEligible": "Scholarship Available",
      "inLanguage": "en",
      "availableLanguage": ["fr", "es"],
      "syllabusSections": [
        {
          "@type": "Syllabus",
          "name": "Memory Allocation",
          "description": "Learn how memory is allocated when creating C++ variables.",
          "timeRequired": "PT6H"
        },
        {
          "@type": "Syllabus",
          "name": "C++ Pointers",
          "description": "Learn what a C++ pointer is and when they are used.",
          "timeRequired": "PT11H"
        }
      ],
      "review": [
      {
        "@type": "Review",
        "author": {
            "@type": "Person",
            "name": "Lou S."
        },
        "datePublished": "2024-08-31",
        "reviewRating": {
          "@type": "Rating",
          "bestRating": 10,
          "ratingValue": 6
        }
      }],
      "coursePrerequisites": [
        "Basic understanding of C++ up to arrays and functions.",
        "https://www.example.com/beginnerCpp"
      ],
      "educationalCredentialAwarded": [{
        "@type": "EducationalOccupationalCredential",
        "name": "CourseProvider Certificate",
        "url": "www.example.com",
        "credentialCategory": "Certificate",
        // offers only needed if the credential costs extra money.
        "offers": [{
          "@type": "Offer",
          "category": "Paid",
          "price": 5,
          "priceCurrency": "USD"
        }]
      }],
      "video": {
        "@type": "VideoObject",
        "name": "Video name",
        "description": "A video previewing this course.",
        "uploadDate": "2024-03-28T08:00:00+08:00",
        "contentUrl": "www.example.come/mp4",
        "thumbnailUrl": "www.example.com/thumbnailurl.jpg"
      },
      "hasCourseInstance": [
      {
        // Blended, instructor-led course meeting 3 hours per day in July.
        "@type": "CourseInstance",
        "courseMode": "Blended",
        "location": "Example University",
        "courseSchedule": {
          "@type": "Schedule",
          "duration": "PT3H",
          "repeatFrequency": "Daily",
          "repeatCount": 31,
          "startDate": "2024-07-01",
          "endDate": "2024-07-31"
        },
        "instructor": [{
          "@type": "Person",
          "name": "Ira D.",
          "description": "Professor at X-University",
          "image": "http://example.com/person.jpg"
        }]
      },
      {
        // Online self-paced course that takes 2 days to complete.
        "@type": "CourseInstance",
        "courseMode": "Online",
        "courseWorkload": "P2D"
      }],
      // Only required for course programs that link to child courses.
      "hasPart": [{
        "@type": "Course",
        "name": "C++ Algorithms",
        "url": "https://www.example.com/cpp-algorithms",
        "description": "Learn how to code base algorithms in c++.",
        "provider": {
          "@type": "Organization",
          "name": "Example University",
          "url": "www.example.com"
        }
      }, {
        "@type": "Course",
        "name": "C++ Data Structures",
        "url": "https://www.example.com/cpp-data-structures",
        "description": "Learn about core c++ data structures.",
        "provider": {
          "@type": "Organization",
          "name": "Example University",
          "url": "www.example.com"
        }
      }]
    }
    </script>
  </head>
  <body>
  </body>
</html>

指南規範

您必須遵守下列規範,才能以課程資訊複合式搜尋結果的形式,在 Google 搜尋中顯示課程。

內容指南

只有符合下列課程定義的教育內容,才能出現在課程資訊複合式搜尋結果中:以演講、授課或專題的方式,探討特定主題或題目的一系列課程或一門課程。

Course 標記必須位於提供完整單一課程課程計畫的網頁之上。以下範例不適用於課程資訊複合式搜尋結果:

  • 學術學位摘要頁面
  • 單獨的測驗頁面
  • 「天文日」之類的一般公開活動
  • 1 部 2 分鐘的「三明治製作教學影片」

結構化資料類型定義

你的內容必須包含必要的 CourseCourseInstance 屬性,才能在 Google 搜尋中以複合式搜尋結果形式呈現。您也可以加入建議的屬性,為內容增添更多相關資訊,提供更優質的使用者體驗。

Course

「課程」是指可單獨參加或屬於某個計畫的個別課程單元。

schema.org/Course 內提供 Course 的完整定義。

必要屬性
name

Text

課程的完整名稱。

"name": "Intro to Statistics"
description

Text

課程說明。

  • 建議長度:240 個半形字元
  • 長度上限:500 個半形字元
"description": "This course teaches the basics of statistical thinking."
provider

Organization

為課程製作內容的機構相關資訊。

"provider": {
   "@type": "Organization",
   "name": "Example University",
   "url": "www.exampleuniversity.com"
}
provider.name Text

課程提供單位的名稱。

offers

可重複的 Offer

完成課程所需的總費用 (包括服務費) 資訊。請勿列出只適合部分使用者的價格,例如初次使用者可享 8 折優惠。

請勿在這個欄位中輸入額外的認證費用。如果需要額外付費來取得認證,請將這項資訊新增至 educationalCredentialAwarded 屬性。

"offers": [{
   "@type": "Offer",
   "category": "Paid",
   "priceCurrency": "EUR",
   "price": 10.99
}]
         
offers.category Text

課程的定價類別。請使用下列其中一個值:

  • Free:所有使用者的講座、作業和測驗均無須付費,參加整門課程無須支付任何費用。
  • Partially Free:超過半數的課程可免費完成。舉例來說,所有課程均無須支付費用,但作業須付費。
  • Subscription:使用者必須是訂閱者或付費成員,才能完成整門課程。
  • Paid:使用者必須付費才能完成課程。
hasCourseInstance

可重複的 CourseInstance

每門課程至少要有一次課程活動,並提供課程內容的詳細資料。請參閱 CourseInstance 章節內的必要屬性和建議屬性。

"hasCourseInstance": [{
   // Onsite, instructor-led class meeting weekly in August 2023
   "@type": "CourseInstance",
   "courseMode": "Onsite",
   "location": "Example University",
   "courseSchedule": {
      "@type": "Schedule",
      "duration": "PT5H",
      "repeatCount": 4,
      "repeatFrequency": "Weekly",
      "startDate": "2023-08-01",
      "endDate": "2023-8-31"
   },
   "instructor": [{
      "@type": "Person",
      "name": "Kai S.",
      "description": "Professor at X-University",
      "image": "http://examplePerson.jpg"
   }]
}]
建議屬性
about

可重複的 Text

說明使用者參加課程後會培養出的技能 (如適用)。

"about": ["Quantitative Analysis", "Critical Thinking"]
aggregateRating

AggregateRating

根據已參加課程的使用者所給予的評分,計算出的平均課程評分資訊 (如適用)。請遵循評論摘錄規範,以及必要和建議的 AggregateRating 屬性清單。

"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": 4.8,
"ratingCount": 255,
"reviewCount": 189
}
availableLanguage

可重複的 Text

提供給課程的字幕、隱藏式輔助字幕或其他語言版本 (如適用)。請參考 ISO 639-1 alpha-2 代碼清單,使用由兩個英文字母組成的代碼。

"availableLanguage": ["fr", "es", "de"]
coursePrerequisites

可重複的 Text

參加該課程前需具備的所有相關知識 (如適用)。您可以說明需具備的知識或連結至其他課程,或兩種做法皆使用。

"coursePrerequisites": ["Understanding of Algebra concepts like variables and functions",
            "https://www.coursewebsite.abc/algebra"]
datePublished

Date

課程的首次發布日期 (如適用)。請使用 8601 日期格式 (YYYY-MM-DD)。

"datePublished": "2019-03-21"
educationalCredentialAwarded

可重複的 EducationalOccupationalCredential

使用者完成課程後可獲得的認證或認證相關資訊 (如適用)。如果需要額外支付費用才能獲得獎勵,請指定附加價格。

"educationalCredentialAwarded": [{
   "@type": "EducationalOccupationalCredential",
   "name": "CourseProvider Certificate",
   "url": "www.examplecertificate.com",
   "credentialCategory": "Certificate",
   "offers": [{
      "@type": "Offer",
      "category": "Paid",
      "priceCurrency": "USD",
      "price": 5
   }]
}]
educationalCredentialAwarded.credentialCategory Text

使用者將獲得的獎勵類型 (如適用)。請使用下列其中一個值:

  • Certificate:獎勵,可證明使用者成功完成課程或計畫。
  • Certification:使用者需要通過考試或認證,證明自己達到一定能力的官方認證。
educationalCredentialAwarded.name Text

獎勵名稱 (如適用)。

educationalCredentialAwarded.offers.category Text

獎項的定價類型 (如適用)。請使用下列其中一種類別:

  • Free:無須支付費用即可獲得獎勵。
  • Subscription:使用者必須是訂閱者或付費成員,才能獲得獎勵。
  • Paid:使用者必須付費才能獲得獎勵。
educationalCredentialAwarded.offers.price Number

獎勵的價格數字 (如適用)。

educationalCredentialAwarded.offers.priceCurrency Text

獎勵價格的幣別,請採用 ISO 4217 貨幣格式 (由 3 個英文字母組成的代碼)。

educationalCredentialAwarded.url URL

獎勵頁面的連結 (如適用)。

educationalLevel

Text

課程的目標教育程度 (如適用)。請選取下列其中一個值:

  • Beginner:無需事先具備相關知識也能瞭解內容
  • Intermediate:可能需要具備一些知識才能瞭解內容
  • Advanced:這項內容的適用對象為對該主題事先具備相關知識的進階學生
"educationalLevel": "Beginner"
financialAidEligible

Text

向有意參加課程的使用者提供的獎學金、特殊付款方案或其他財務援助機會 (如適用)。

"financialAidEligible": "Scholarships available for eligible users."
image

可重複的 URL

可代表課程的圖片網址 (如適用)。請使用與課程相關的圖片,而非標誌或字幕。

其他圖片規範:

  • 圖片網址必須可供檢索和建立索引。如要測試 Google 能否存取您的網址,請使用網址檢查工具
  • 圖片內容與您標記的內容必須相符。
  • 圖片檔案必須使用 Google 圖片支援的格式
  • 為了獲得最佳結果,建議您使用以下長寬比,提供多張高解析度圖片 (寬度和高度相乘時至少 50K 像素):16x9、4x3 和 1x1。

例如:

"image": [
  "https://example.com/photos/1x1/photo.jpg",
  "https://example.com/photos/4x3/photo.jpg",
  "https://example.com/photos/16x9/photo.jpg"
]
inLanguage

Text

提供給課程的主要語言 (如適用)。請參考 ISO 639-1 alpha-2 代碼清單,使用由兩個英文字母組成的代碼。

"inLanguage": "en"
offers.price Number

課程的價格數字 (如適用)。請勿在此欄位中輸入其他資訊,例如貨幣符號。

offers.priceCurrency Text

課程價格的幣別,請採用 ISO 4217 貨幣格式 (由 3 個英文字母組成的代碼)。

provider.url URL

連結至課程提供單位首頁的網址 (如適用)。

publisher

Organization

機構相關資訊 (如適用;機構會發布並展示課程)。

"publisher": {
   "@type": "Organization",
   "name": "Course Website",
   "url": "www.example.com"
}
publisher.name Text

課程發布單位的名稱 (如適用)。

publisher.url URL

連結至課程發布單位首頁的網址 (如適用)。

review

可重複的 Review

課程的使用者評論清單 (如適用)。請遵循評論摘錄規範,瞭解更多資訊。

"review": [{
   "@type": "Review",
   "author": {
      "@type": "Person",
      "name": "Sasha J."
   },
   "datePublished": "2021-09-22",
   "reviewRating": {
      "@type": "Rating",
      "ratingValue": 4
   }
}]
syllabusSections

可重複的 Syllabus

模組相關資訊 (如適用;課程是由不同模組構成)。

"syllabusSections": [{
   "@type": "Syllabus",
   "name": "Algebra Review",
   "description": "Review prerequisite Algebra concepts.",
   "timeRequired": "PT2H30M"
}, {
   "@type": "Syllabus",
   "name": "Statistics Terms",
   "description": "Learn the definitions of basic statistics terms.",
   "timeRequired": "PT5H"
}]
syllabusSections.description Text

單元內容的說明 (如適用)。

syllabusSections.name Text

課程單元的名稱 (如適用)。

syllabusSections.timeRequired Duration

使用 8601 時間長度格式 (如適用)。舉例來說,PT2H30M 表示該單元需要 2 小時 30 分鐘才能完成。

teaches

可重複的 Text

使用者參加課程所學的學習成果或特定知識 (如適用)。

"teaches": ["How to use visualization tools and graphs", "Why stats is important"]
totalHistoricalEnrollment

Integer

在課程有效期限內註冊的使用者總人數 (如適用)。

"totalHistoricalEnrollment": 80032
video

VideoObject

課程的影片預覽畫面或宣傳短片 (如適用)。詳情請參閱 VideoObject 指南

"video": {
   "@type": "VideoObject",
   "name": "Video name",
   "description": "A video previewing this course.",
   "uploadDate": "2022-03-28T08:00:00+08:00",
   "contentUrl": "www.videourl.mp4",
   "thumbnailUrl": "www.thumbnailurl.jpg"
}

CourseInstance

schema.org/CourseInstance 內提供 CourseInstance 的完整定義。每門課程至少要有一個 CourseInstance,並填寫必要屬性。

必要屬性
courseMode

Text

提供課程的媒介。請使用下列其中一個值:

  • Online:所有課程、作業和測驗都可以在線上完成。
  • Onsite:這門課程是在實體教室面對面教學。
  • Blended:這門課程包含線上和現場課程。

如果課程為 OnsiteBlended,請加入 location 屬性。

"courseMode": "Online"
courseSchedule

Schedule

提供建議的步調,說明一般使用者完成課程所需的時間。對於時間安排固定的課程,請加入開始和結束日期。

以下範例是可隨時開始的課程步調範例:

// This course takes 6 weeks to complete.
"courseSchedule": {
   "@type": "Schedule",
   "repeatCount": 6
   "repeatFrequency": "Weekly",
}

以下是指定時間內的課程步調範例:

// This course expects 1 hour per day during July 2023
"courseSchedule": {
   "@type": "Schedule",
   "duration": "PT1H",
   "repeatCount": 31
   "repeatFrequency": "Daily",
   "startDate": "2023-07-01",
   "endDate": "2023-07-31"
}
courseSchedule.repeatCount Integer

課程持續時間的數值,以 repeatFrequency 為單位。舉例來說,如果 repeatFrequency 是每月,且 repeatCount 為 4,則課程效期為 4 個月。

courseSchedule.repeatFrequency Text

durationrepeatCount 屬性與這個欄位有關。請使用下列其中一個值:

  • Daily:課程每天都會進行。
  • Weekly:課程每週都會進行。
  • Monthly:課程每月都會進行。
  • Yearly:課程每年都會進行。
courseWorkload Text

這個欄位代表觀看所有影片以及完成該課程所有作業和測驗的總時間。請採用 8601 時間長度格式

"courseWorkload": "PT22H"
建議屬性
courseSchedule.duration Duration

提供建議的步調,說明一般使用者預期花費的時間 (以 repeatFrequency 為單位),採用 8601 時間長度格式 (如適用)。舉例來說,如果 repeatFrequency 是按月,durationPT5H,則使用者每月花在上課的時間預計應為 5 小時。

請勿使用這個屬性指定課程的時間總長度。請改用 courseWorkload 屬性。

courseSchedule.endDate Date

課程的結束日期,採用 8601 日期格式 (YYYY-MM-DD,如適用)。

courseSchedule.startDate Date

課程的開始日期,採用 8601 日期格式 (YYYY-MM-DD,如適用)。

image URL

連結到老師相片的網址 (如適用)。

其他圖片規範:

  • 圖片網址必須可供檢索和建立索引。如要測試 Google 能否存取您的網址,請使用網址檢查工具
  • 圖片內容與您標記的內容必須相符。
  • 圖片檔案必須使用 Google 圖片支援的格式
  • 為了獲得最佳結果,建議您使用以下長寬比,提供多張高解析度圖片 (寬度和高度相乘時至少 50K 像素):16x9、4x3 和 1x1。

例如:

"image": [
  "https://example.com/photos/1x1/photo.jpg",
  "https://example.com/photos/4x3/photo.jpg",
  "https://example.com/photos/16x9/photo.jpg"
]
instructor

可重複的 Person

課程老師的相關資訊 (如適用)。

"instructor": [{
   "@type": "Person",
   "name": "Dana A.",
   "description": "Professor at X-University",
   "image": "http://examplePerson.jpg"
}]
instructor.description Text

老師及他們所持認證的說明 (如適用)。

instructor.name Text

老師的姓名 (如適用)。

location

Text

授課的實際地點名稱或地址,或同時包含名稱和地址 (如適用)。

"courseMode": "Blended",
"location": "Example High School"

課程計畫

課程計畫含有多個子課程。子課程必須是獨立課程,且包含不同的網址和到達網頁。

如果您的網頁是課程計畫,除了 CourseCourseInstance 章節中列出的其他必要屬性以外,請一併加入下列必要屬性。

必要屬性
hasPart

可重複的 Course

這項課程計畫中的子課程清單。

"@context": "https://schema.org/",
"@type": "Course",
"name": "Learning Pathway: Knitting",
"url": "www.example.com/knitprogram"
// Fill the other required Course and CourseInstance properties
"hasPart": [{
   "@type": "Course",
   "name": "Intro to Knitting",
   "url": "www.example.com/knitbasics",
   "description": "Learn the basics of how to knit."
   }, {
   "@type": "Course",
   "name": "Knit a Sweater",
   "url": "www.example.com/knitsweater",
   "description": "Learn to knit an entire sweater."
}]
hasPart.name Text

子課程的完整名稱。

hasPart.url URL

連結至子課程到達網頁的網址。

建議屬性
hasPart.description Text

子課程所涵蓋內容的簡短說明 (如適用)。

  • 建議長度:240 個半形字元
  • 長度上限:500 個半形字元

Monitor rich results with Search Console

Search Console is a tool that helps you monitor how your pages perform in Google Search. You don't have to sign up for Search Console to be included in Google Search results, but it can help you understand and improve how Google sees your site. We recommend checking Search Console in the following cases:

  1. After deploying structured data for the first time
  2. After releasing new templates or updating your code
  3. Analyzing traffic periodically

After deploying structured data for the first time

After Google has indexed your pages, look for issues using the relevant Rich result status report. Ideally, there will be an increase of valid items, and no increase in invalid items. If you find issues in your structured data:

  1. Fix the invalid items.
  2. Inspect a live URL to check if the issue persists.
  3. Request validation using the status report.

After releasing new templates or updating your code

When you make significant changes to your website, monitor for increases in structured data invalid items.
  • If you see an increase in invalid items, perhaps you rolled out a new template that doesn't work, or your site interacts with the existing template in a new and bad way.
  • If you see a decrease in valid items (not matched by an increase in invalid items), perhaps you are no longer embedding structured data in your pages. Use the URL Inspection tool to learn what is causing the issue.

Analyzing traffic periodically

Analyze your Google Search traffic using the Performance Report. The data will show you how often your page appears as a rich result in Search, how often users click on it and what is the average position you appear on search results. You can also automatically pull these results with the Search Console API.

疑難排解

如果無法順利導入結構化資料,或是偵錯時遇到困難,請參考下列資源。

  • 如果您使用內容管理系統 (CMS) 或者有他人代您處理網站事務,請向對方尋求協助。請務必將所有與問題相關的 Search Console 訊息都轉寄給對方,這些訊息會針對問題提供詳細說明。
  • Google 不保證採用結構化資料的功能一定會顯示在搜尋結果中。如要瞭解為何 Google 無法將您的內容顯示為複合式搜尋結果,請參閱結構化資料通用指南裡的常見原因清單。
  • 結構化資料可能含有錯誤。請查看結構化資料錯誤清單無法剖析的結構化資料報告
  • 如果您的網頁遭到結構化資料人工判決處罰,系統會忽略網頁上的結構化資料,但該網頁仍然會出現在 Google 搜尋結果中。請使用人工判決處罰報告來修正結構化資料問題
  • 再次查看指南規範,確認您的內容是否符合規定。問題可能是因為垃圾內容或不當使用的標記所引起。不過,因為問題可能與語法無關,所以複合式搜尋結果測試無法找出問題所在。
  • 參閱「疑難排解:未出現複合式搜尋結果/複合式搜尋結果總數減少」。
  • 請等待一段時間,讓系統執行重新檢索和重新建立索引作業。在發布網頁後,Google 可能需要幾天時間才會找到網頁並進行檢索。如有關於檢索和索引建立作業的一般問題,請參閱 Google 搜尋檢索和索引常見問題
  • 前往 Google 搜尋中心論壇發文提問。