# Semrush Summary Generator

Summarizes a longer text with the Semrush summary generator, as a paragraph or bullet points. The length penalty (0-1, default 1) controls how aggressively the text is shortened. Generation is AI-bound and typically takes a few seconds.

- **Documentation:** [https://scrappa.co/docs/semrush-api/semrush_content_summarize](https://scrappa.co/docs/semrush-api/semrush_content_summarize)
- **API group:** Semrush API
- **Endpoint:** `POST https://scrappa.co/api/semrush/content/summarize`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | string | Yes | The input text for the writer (a topic for titles/blogpost, the passage to rewrite or summarize otherwise). |
| `length_penalty` | number | No | How aggressively to shorten (0-1, default 1). |
| `format` | string | No | Summary format: paragraph (default) or bullets. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/semrush/content/summarize?text=Coffee+is+a+brewed+drink+prepared+from+roasted+coffee+beans%2C+the+seeds+of+berries+from+certain+Coffea+species...&format=bullets"
```

## Example response

```json
{
    "search_parameters": {
        "engine": "semrush_content_summarize",
        "format": "bullets"
    },
    "summary": "- Coffee is brewed from roasted beans\n- The beans are seeds of Coffea berries"
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter failed validation. |
| 503 | Semrush Upstream Unavailable | Semrush could not be fetched through the configured proxy pool after the full attempt budget. Never charged. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
