files/en-us/web/api/summarizer/length/index.md
{{APIRef("Summarizer API")}}{{SeeCompatTable}}{{securecontext_header}}
The length read-only property of the {{domxref("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 {{domxref("Summarizer.type", "type")}} value.
Possible values are:
short
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.medium
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.long
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);
{{Specifications}}
{{Compat}}