> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stophy.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Summary, highlights and question

> Get a summary, the passages that match a query, or one answer from a page instead of all its text. Each is a scrape format with its own limits.

Use these three formats when you need less than the full text. They read the page's Markdown after [content filtering](https://docs.stophy.dev/scrape/content-filtering.md), and with `redactPII` they read the redacted text. This request asks for all three:

```bash theme={null}
curl -X POST https://api.stophy.dev/v1/scrape \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://bun.com/docs/runtime/bunfig",
    "formats": [
      "summary",
      { "type": "highlights", "query": "global config file location", "count": 3 },
      { "type": "question", "question": "What is the name of the configuration file?" }
    ]
  }'
```

```json theme={null}
{
  "success": true,
  "data": {
    "summary": "The page documents Bun's optional bunfig.toml file, which configures runtime, testing and package manager behavior. …",
    "highlights": "Set it in the global `.bunfig.toml` (see Global vs. local) or in a file passed with `--config`. …\n\nWhen `XDG_CONFIG_HOME` is set to an absolute path, Bun reads the file there. …",
    "answer": "bunfig.toml"
  }
}
```

| Format | Field in `data` | Send |
| - | - | - |
| `summary` | `summary`, a string | `"summary"` |
| `highlights` | `highlights`, one Markdown string with passages separated by a blank line | `type`, `query` (1 to 10,000 characters, required), `count` (1 to 20, default `5`, best first) |
| `question` | `answer`, one to four sentences | `type`, `question` (1 to 10,000 characters, required) |

* `summary` and `question` read the first 50,000 characters of the Markdown. `summary` of a longer page covers its start.
* `highlights` with no matching text returns `""`. A `highlights` or `question` object without its `query` or `question` returns `400 invalidRequest`.
* When the page does not state an answer, `answer` is left out of `data` and `data.warning` says `The page does not state an answer to the question.` Check that `answer` is there before you use it.
* When no summary can be made, the call returns `503 sourceUnavailable`. Retry after a few seconds.
* Each `question` request answers one question. To ask several, send several requests or use [JSON](https://docs.stophy.dev/scrape/json.md) with one field per question.
* The `query` inside a `highlights` object is not the top-level `query` field, which shortens the Markdown of a long page. `question` takes its text from the format object only.
* A PDF can be summarized.

A fee applies to each of these when it returns something, and not when it comes back empty or fails. See [Pricing](https://docs.stophy.dev/account/pricing.md).

For fields your code reads by name, use [JSON](https://docs.stophy.dev/scrape/json.md). To pull fields from many pages and check each against its page, use [Extract](https://docs.stophy.dev/extract/overview).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.