# Lista stron crawla

`GET https://api.seoscraper.io/v1/crawls/{crawl_id}/pages`

## Parametry ścieżki

- `crawl_id` string: Identyfikator crawla.

## Parametry zapytania

- `sort` string? (id, url, status, title, depth, words, time, size): Pole, według którego sortować.
- `desc` boolean?: Sortuj malejąco.
- `limit` integer?: Ile stron zwrócić.
- `offset` integer?: Ile stron pominąć.
- `q` string?: Tekst w adresie albo tytule. Z `*` to wzorzec ścieżki, np. `/blog/*`.
- `issue` string | null? (ok, client_error, too_many_requests, server_error, failed, robots_blocked, redirected, noindex, missing_title, long_title, duplicate_title, missing_description, long_description, duplicate_description, missing_h1, multiple_h1, other_canonical, missing_alt, slow): Tylko strony z tym problemem.
- `filter` string[]?: Warunki w postaci `pole:operator:wartość`, np. `path:pattern:/blog/*` albo `words:gte:300`.
- `match` string? (all, any): Czy strona ma spełniać wszystkie warunki, czy dowolny z nich.

## Odpowiedź 200

- `total` integer: Liczba stron, które spełniają warunki.
- `pages` object[]:
  - `id` integer: Numer strony w crawlu.
  - `url` string: Adres strony.
  - `final_url` string | null: Adres po wszystkich przekierowaniach.
  - `status` integer | null: null, gdy strony nie udało się pobrać.
  - `error` string | null: Kod błędu, gdy strony nie udało się pobrać.
  - `depth` integer: Liczba kliknięć od strony startowej.
  - `found_on` string: Strona z pierwszym linkiem do tej strony.
  - `title` string: Treść znacznika title.
  - `meta_description` string: Treść meta description.
  - `canonical` string: Adres kanoniczny.
  - `index` boolean | null: Czy stronę można indeksować.
  - `word_count` integer | null: Liczba słów w treści strony.
  - `duration_ms` integer | null: Czas pobrania w milisekundach.
  - `size_bytes` integer | null: Rozmiar pobranej treści w bajtach.
  - `redirects` integer: Liczba przekierowań.
  - `h1` integer: Liczba nagłówków h1.
  - `links` integer: Liczba linków.
  - `missing_alt` integer: Liczba obrazów bez atrybutu alt.

## Błędy

- 401: unauthorized
- 404: not_found
- 409: crawl_not_ready
- 422: invalid_request, invalid_filter

## Przykład

```bash
curl "https://api.seoscraper.io/v1/crawls/CRAWL_ID/pages?issue=missing_description&sort=words&limit=1" \
  -H "Authorization: Bearer ssk_YOUR_KEY"
```

```json
{
  "total": 50,
  "pages": [
    {
      "id": 2,
      "url": "https://books.toscrape.com/catalogue/page-2.html",
      "final_url": "https://books.toscrape.com/catalogue/page-2.html",
      "status": 200,
      "error": null,
      "depth": 1,
      "found_on": "https://books.toscrape.com/",
      "title": "All products | Books to Scrape - Sandbox",
      "meta_description": "",
      "canonical": "",
      "index": true,
      "word_count": 315,
      "duration_ms": 198,
      "size_bytes": 51011,
      "redirects": 0,
      "h1": 1,
      "links": 94,
      "missing_alt": 0
    }
  ]
}
```
