Try Summarize by Segment API here

The Summarize by Segment API extends our advanced summarization engine's capabilities to offer segment-specific summaries. This method is particularly useful for enabling users to read the original text faster and more efficiently. They can skim where possible and pay more attention where needed. Moreover, this is the same engine that drives Wordtune Read, ensuring its outstanding performance.

Summarize by Segment API request

While still easy to integrate, this API gives you a deeper dive into your content with segment-focused summaries:

source: The input text, or URL of a web page to be summarized.

sourceType: The type of the above - either TEXT or URL.

Optional:

focus: Return segment summaries focused on a topic of your choice. Up to 50 characters.

{
   "source": "example long text",
   "sourceType": "TEXT",
   "focus": "something specific" // Optional
}

The response will return segmented summaries, each containing:

  • summary: A brief summary of the segment.
  • segmentText: The raw text of the segment.
  • segmentHtml: The HTML representation of the segment, if applicable.
  • segmentType: Type of the segment.
  • hasSummary: Indicates if the segment can be summarized.
  • highlights: An array of key points that were extracted from the text. Each entry within this array captures theText, itsstartIndex, and endIndex.

A potential response might look like:

{
  "segments": [
    {
      "summary": "Segment-specific summary here...",
      "segmentText": "Raw text of the segment here...",
      "segmentHtml": "<p>HTML representation here...</p>",
      "segmentType": "Type here...",
      "hasSummary": true,
      "highlights": [
        {
          "Text": "Highlighted part of the segment...",
          "startIndex": 0,
          "endIndex": 50
        },
        // ... more highlights
      ]
    },
    // ... more segments
  ]
}