# Text Summarizer API

> Text Summarizer condenses raw text into concise summaries of a specified sentence count. Pass up to 50,000 characters to extract key points into readable summaries, with paid plans adding word counts and summary-length metrics.

**Endpoint:** `POST https://api.apiverve.com/v1/textsummarizer`  
**Category:** Text Processing  
**Cost:** 20 credits per call  
**Canonical page:** https://apiverve.com/marketplace/textsummarizer

## Overview

A text summarization API: send up to 50,000 characters and choose how many sentences the summary should have. Text Summarizer works by analyzing the text provided and generating a concise summary. It is an extractive summarizer: it scores each sentence with TF-IDF and returns the highest-scoring sentences in their original order, so the summary uses only wording from your text.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl -X POST "https://api.apiverve.com/v1/textsummarizer" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"A news article can include accounts of eyewitnesses to the happening event. It can contain photographs, accounts, statistics, graphs, recollections, interviews, polls, debates on the topic, etc. Headlines can be used to focus the reader'\''s attention on a particular (or main) part of the article. The writer can also give facts and detailed information following answers to general questions like who, what, when, where, why and how.","sentences":2}'
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | string | Yes | The text to summarize (up to 50,000 characters). length 0-50000 |
| `sentences` | number | No | The length of the summary (number of sentences). default 3 |

## Response fields

- `originalWords` — number · Total word count in the original text input · (premium)
- `summaryWords` — number · Total word count in the generated summary output · (premium)
- `percentDifference` — number · Summary length as a percentage of the original word count (e.g. 25 means the summary is a quarter of the original length) · (premium)
- `summary` — string · The condensed text summary capturing key points

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "originalWords": 67,
    "summaryWords": 30,
    "percentDifference": 44.78,
    "summary": "Headlines can be used to focus the reader's attention on a particular (or main) part of the article. A news article can include accounts of eyewitnesses to the happening event."
  }
}
```

## Use cases

- **News Reader Briefs** — News reader apps condense long-form reporting into three-sentence briefs so subscribers can scan top stories quickly on mobile screens.
- **Research Paper Previews** — Generate short executive previews for submitted PDF reports before users download the full research file.
- **Support Ticket Triage** — When support tickets arrive with lengthy complaint logs, summarize the core issue to help agents triage priority cases faster.
- **Newsletter Digest Creation** — Content curation platforms convert weekly industry articles into concise snippet summaries for automated email roundups.

## SDKs

- **npm** — `npm install @apiverve/textsummarizer` (https://www.npmjs.com/package/@apiverve/textsummarizer)
- **PyPI** — `pip install apiverve-textsummarizer` (https://pypi.org/project/apiverve-textsummarizer/)
- **NuGet** — `dotnet add package APIVerve.API.TextSummarizer` (https://www.nuget.org/packages/APIVerve.API.TextSummarizer)
- **Source** — https://github.com/apiverve/textsummarizer-api

## More

- Full reference: https://docs.apiverve.com/ref/textsummarizer
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
