CaptureKit

Read the response

Read the page metadata and links, and the list of fields returned.

In data, metadata holds the title and description of the page and links its internal, external and social links. With include_markdown=true the response also carries the Markdown of the page: the code prints the names of the fields of data so that you can find it.

This code continues the script from Fetch the page content.

data     = result["data"]
metadata = data["metadata"]

print(f"Title         : {metadata.get('title', '')}")
print(f"Description   : {metadata.get('description', '')}")
print(f"Internal links: {len(data['links']['internal'])}")
print(f"Fields of data: {', '.join(sorted(data))}")