Przejdź do treści
Dokumentacja

Odczytaj jedną stronę crawla

GET/v1/crawls/{crawl_id}/pages/{page_id}

curl "https://api.seoscraper.io/v1/crawls/CRAWL_ID/pages/PAGE_ID" \  -H "Authorization: Bearer ssk_YOUR_KEY"
Odpowiedź 200
{  "page": {    "id": 1,    "url": "https://books.toscrape.com",    "final_url": "https://books.toscrape.com/",    "status": 200,    "error": null,    "depth": 0,    "found_on": "",    "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  },  "data": {    "url": "https://books.toscrape.com",    "final_url": "https://books.toscrape.com/",    "path": "/",    "status": 200,    "content_type": "text/html",    "redirects": [],    "headers": [      {        "name": "content-type",        "value": "text/html"      }    ],    "duration_ms": 826,    "size_bytes": 51294,    "truncated": false,    "lang": "en-us",    "title": "All products | Books to Scrape - Sandbox",    "meta_description": "",    "canonical": "",    "robots": {      "meta": "NOARCHIVE,NOCACHE",      "x_robots_tag": "",      "index": true,      "follow": true    },    "word_count": 309,    "headings": [      {        "level": 1,        "text": "All products"      }    ],    "links": [      {        "url": "https://books.toscrape.com/catalogue/page-2.html",        "text": "next",        "type": "internal",        "rel": "",        "nofollow": false      }    ],    "images": [      {        "src": "https://books.toscrape.com/media/cache/2c/da/2cdad67c44b002e7ead0cc35693c0e8b.jpg",        "alt": "A Light in the Attic",        "lazy": false,        "width": "",        "height": ""      }    ],    "html": null  }}

Parametry ścieżki

  • crawl_idstringwymagane

    Identyfikator crawla.

  • page_idintegerwymaganemin.: 1maks.: 2147483648

    Numer strony w crawlu.

Parametry zapytania

  • include_htmlbooleandomyślnie: false

    Dołącz do odpowiedzi surowy HTML.

Odpowiedź200

  • pageobject

    Te same dane co na liście stron.

    Pola page
    • idinteger

      Numer strony w crawlu.

    • urlstring

      Adres strony.

    • final_urlstring | null

      Adres po wszystkich przekierowaniach.

    • statusinteger | null

      null, gdy strony nie udało się pobrać.

    • errorstring | null

      Kod błędu, gdy strony nie udało się pobrać.

    • depthinteger

      Liczba kliknięć od strony startowej.

    • found_onstring

      Strona z pierwszym linkiem do tej strony.

    • titlestring

      Treść znacznika title.

    • meta_descriptionstring

      Treść meta description.

    • canonicalstring

      Adres kanoniczny.

    • indexboolean | null

      Czy stronę można indeksować.

    • word_countinteger | null

      Liczba słów w treści strony.

    • duration_msinteger | null

      Czas pobrania w milisekundach.

    • size_bytesinteger | null

      Rozmiar pobranej treści w bajtach.

    • redirectsinteger

      Liczba przekierowań.

    • h1integer

      Liczba nagłówków h1.

    • linksinteger

      Liczba linków.

    • missing_altinteger

      Liczba obrazów bez atrybutu alt.

  • dataobject | null

    null, gdy strony nie udało się pobrać.

    Pola data
    • urlstring

      Adres z zapytania.

    • final_urlstring

      Adres po wszystkich przekierowaniach.

    • pathstring

      Ścieżka adresu końcowego.

    • statusinteger

      Status HTTP strony.

    • content_typestring

      Typ treści podany przez serwer.

    • redirectsobject[]

      Kolejne przekierowania z adresem i statusem.

      Pola redirects
      • urlstring

      • statusinteger

    • headersobject[]

      Nagłówki HTTP strony, nazwy małymi literami.

      Pola headers
      • namestring

      • valuestring

    • duration_msinteger

      Czas pobrania w milisekundach.

    • size_bytesinteger

      Rozmiar pobranej treści w bajtach.

    • truncatedboolean

      Czy treść została ucięta na limicie 10 MB.

    • langstring

      Język z atrybutu lang.

    • titlestring

      Treść znacznika title.

    • meta_descriptionstring

      Treść meta description.

    • canonicalstring

      Adres kanoniczny.

    • robotsobject

      Meta robots i X-Robots-Tag oraz wynikowe index i follow.

      Pola robots
      • metastring

        Treść meta robots.

      • x_robots_tagstring

        Wartość nagłówka X-Robots-Tag.

      • indexboolean

        Czy stronę można indeksować.

      • followboolean

        Czy wolno podążać za linkami na stronie.

    • word_countinteger

      Liczba słów w treści strony.

    • headingsobject[]

      Nagłówki od h1 do h6 w kolejności na stronie.

      Pola headings
      • levelinteger

        1 dla h1, 6 dla h6.

      • textstring

    • linksobject[]

      Linki: adres, tekst, typ, rel i nofollow.

      Pola links
      • urlstring

      • textstring

      • typestring

        other: mailto, tel i podobne.

        internalexternalother

      • relstring

        Wartość atrybutu rel.

      • nofollowboolean

    • imagesobject[]

      Obrazy: src, alt, lazy i wymiary.

      Pola images
      • srcstring

      • altstring | null

        null: brak atrybutu, pusty tekst: pusty alt.

      • lazyboolean

        Czy obraz ma loading=lazy.

      • widthstring

      • heightstring

    • htmlstring | null

      Surowy HTML, jeśli poprosisz o include_html. W innym razie null.

Błędy

Każdy błąd ma ten sam format. Zobacz, co oznaczają kody.

401
unauthorized
404
not_found
409
crawl_not_ready
422
invalid_request