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"{ "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_idstringwymaganeIdentyfikator crawla.
page_idintegerwymaganemin.: 1maks.: 2147483648Numer strony w crawlu.
Parametry zapytania
include_htmlbooleandomyślnie: falseDołącz do odpowiedzi surowy HTML.
Odpowiedź200
pageobjectTe same dane co na liście stron.
Pola page
idintegerNumer strony w crawlu.
urlstringAdres strony.
final_urlstring | nullAdres po wszystkich przekierowaniach.
statusinteger | nullnull, gdy strony nie udało się pobrać.
errorstring | nullKod błędu, gdy strony nie udało się pobrać.
depthintegerLiczba kliknięć od strony startowej.
found_onstringStrona z pierwszym linkiem do tej strony.
titlestringTreść znacznika title.
meta_descriptionstringTreść meta description.
canonicalstringAdres kanoniczny.
indexboolean | nullCzy stronę można indeksować.
word_countinteger | nullLiczba słów w treści strony.
duration_msinteger | nullCzas pobrania w milisekundach.
size_bytesinteger | nullRozmiar pobranej treści w bajtach.
redirectsintegerLiczba przekierowań.
h1integerLiczba nagłówków h1.
linksintegerLiczba linków.
missing_altintegerLiczba obrazów bez atrybutu alt.
dataobject | nullnull, gdy strony nie udało się pobrać.
Pola data
urlstringAdres z zapytania.
final_urlstringAdres po wszystkich przekierowaniach.
pathstringŚcieżka adresu końcowego.
statusintegerStatus HTTP strony.
content_typestringTyp treści podany przez serwer.
redirectsobject[]Kolejne przekierowania z adresem i statusem.
Pola redirects
urlstringstatusinteger
headersobject[]Nagłówki HTTP strony, nazwy małymi literami.
Pola headers
namestringvaluestring
duration_msintegerCzas pobrania w milisekundach.
size_bytesintegerRozmiar pobranej treści w bajtach.
truncatedbooleanCzy treść została ucięta na limicie 10 MB.
langstringJęzyk z atrybutu lang.
titlestringTreść znacznika title.
meta_descriptionstringTreść meta description.
canonicalstringAdres kanoniczny.
robotsobjectMeta robots i X-Robots-Tag oraz wynikowe index i follow.
Pola robots
metastringTreść meta robots.
x_robots_tagstringWartość nagłówka X-Robots-Tag.
indexbooleanCzy stronę można indeksować.
followbooleanCzy wolno podążać za linkami na stronie.
word_countintegerLiczba słów w treści strony.
headingsobject[]Nagłówki od h1 do h6 w kolejności na stronie.
Pola headings
levelinteger1 dla h1, 6 dla h6.
textstring
linksobject[]Linki: adres, tekst, typ, rel i nofollow.
Pola links
urlstringtextstringtypestringother: mailto, tel i podobne.
internalexternalotherrelstringWartość atrybutu rel.
nofollowboolean
imagesobject[]Obrazy: src, alt, lazy i wymiary.
Pola images
srcstringaltstring | nullnull: brak atrybutu, pusty tekst: pusty alt.
lazybooleanCzy obraz ma loading=lazy.
widthstringheightstring
htmlstring | nullSurowy 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