# Semrush Paraphrasing & Rewrite

Rewrites a passage with one of the Semrush rewriting tools. The category controls the rewrite mode: improve, simplify, or summarize. Generation is AI-bound and typically takes a few seconds.

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

## 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 |
| --- | --- | --- | --- |
| `tool` | string | Yes | One of: paragraph-rewriter, sentence-rewriter, paraphrase-generator. |
| `category` | string | Yes | Rewrite mode: improve, simplify, or summarize. Required — the upstream rejects rewrites without it. |
| `text` | string | Yes | The input text for the writer (a topic for titles/blogpost, the passage to rewrite or summarize otherwise). |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/semrush/content/rewrite?tool=paragraph-rewriter&category=improve&text=Coffee+is+a+brewed+drink+prepared+from+roasted+coffee+beans."
```

## Example response

```json
{
    "search_parameters": {
        "engine": "semrush_content_rewrite",
        "tool": "paragraph-rewriter",
        "category": "improve"
    },
    "rewritten_text": "Coffee is a rich, aromatic beverage brewed from carefully roasted coffee beans."
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter failed validation. |
| 503 | Semrush Upstream Unavailable | The upstream service is temporarily unavailable. Please retry shortly. |

## 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)
