๐Ÿ“

Text Summarization API

Extract key sentences from any text or URL. Extractive summarization using TF-IDF scoring โ€” fast, offline, no third-party NLP API needed.

API Docs $0.002 / request

About this tool

Given a block of text or a URL, this endpoint extracts the most important sentences using TF-IDF frequency scoring with position weighting. The first sentence gets a 1.5ร— boost (often the topic sentence), the last sentence gets 1.2ร— (often a conclusion), and all sentences are filtered for minimum length. Perfect for AI agents that need to digest long articles, reports, or web pages before acting.

Quick Start โ€” Summarize Text

curl -X POST https://api.iteratools.com/summarize \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "text": "Artificial intelligence is transforming the world. Machine learning enables computers to learn from data without being explicitly programmed. Deep learning uses neural networks with many layers to detect patterns. Natural language processing helps computers understand and generate human language. Computer vision allows machines to interpret visual data from the world. These technologies are converging to create systems that can perform tasks once reserved for humans. The economic impact is expected to reach trillions of dollars by 2030.", "sentences": 3 }'

Response

{ "summary": "Artificial intelligence is transforming the world. Machine learning enables computers to learn from data without being explicitly programmed. These technologies are converging to create systems that can perform tasks once reserved for humans.", "sentences": 3, "original_length": 624, "compression_ratio": 0.4551 }

Quick Start โ€” Summarize a URL

curl -X POST https://api.iteratools.com/summarize \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://en.wikipedia.org/wiki/Artificial_intelligence", "sentences": 2 }'

The API fetches the page, strips HTML tags, and returns the top N sentences.

Request Parameters

  • text โ€” Text to summarize (max 50,000 chars). Use either text or url.
  • url โ€” HTTP/HTTPS URL to fetch and summarize (alternative to text).
  • sentences โ€” Number of sentences in the summary (default: 3, max: 10).

Response Fields

  • summary โ€” The extracted sentences joined as a string
  • sentences โ€” Number of sentences returned
  • original_length โ€” Character count of the original text
  • compression_ratio โ€” Summary length / original length (0โ€“1)

How It Works

The algorithm uses extractive summarization โ€” it picks real sentences from the original text rather than generating new ones. Sentences are scored by:

  • Word frequency (TF) โ€” sentences with more high-frequency words score higher
  • Position weighting โ€” first sentence ร—1.5, last sentence ร—1.2
  • Length filter โ€” sentences under 5 words are discarded

Top-N sentences are returned in their original document order, so the summary reads naturally.

Pricing & Limits

$0.002 per request via x402 micropayment on Base (USDC). Max text: 50,000 characters. Max sentences: 10. Rate limit: 60 req/min.

Full Documentation Browse All Tools