This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The length read-only property of the Summarizer interface returns the relative length of the generated summaries.
An enumerated value specifying the relative length of the generated summaries, the exact nature of which depends on the Summarizer type value.
Possible values are:
shortA "short" summary
type tldr and teaser, the summary should fit into one sentence.type key-points, the summary should be no more than three bullet points.type headline, the summary should be no more than 12 words.mediumA "medium" summary
type tldr and teaser, the summary should fit into one short paragraph.type key-points, the summary should be no more than five bullet points.type headline, the summary should be no more than 17 words.longA "long" summary
type tldr and teaser, the summary should fit into one paragraph.type key-points, the summary should be no more than seven bullet points.type headline, the summary should be no more than 22 words.const summarizer = await Summarizer.create({
length: "medium",
// ...
});
// Logs "medium"
console.log(summarizer.length);
| Specification |
|---|
| Writing Assistance APIs> # dom-summarizer-length> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
length |
138Availability may be subject to geographical restrictions. |
138 | No | 122Availability may be subject to geographical restrictions. |
No | No | No | No | No | No | No | No |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Summarizer/length