Extract a whole page as code
extract_pageUse after list_site_pages, or when the user wants one complete page (not a single section) as code. Returns every section of the page top to bottom as code in the requested framework, plus pagePreviewUrl: the whole page assembled, with a Download HTML button. Flat credits per page (see usage.creditsSpent), whatever its length; a page already extracted in the last 24 hours is free. Paid plans only: on a free plan this returns an error explaining why - relay it and point the user to extract_code for single sections. Call it once per page the user picked, one at a time, and tell them how many are left as you go. If complete is false, call again with the same url: the done sections come from cache and the page is not charged again. Build on each section's code the same way as extract_code's (never regenerate it), and give the user pagePreviewUrl for every page.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The page URL, e.g. linear.app/pricing - one of the pages from list_site_pages | |
| theme | No | Which colour scheme to extract (default light) | |
| framework | No | The code to generate for every section (default tailwind) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| usage | No | Credit usage for the authed key (spent, remaining, monthly limit). | |
| failed | No | Sections that could not be extracted, with the reason | |
| complete | No | False when the page had more sections than fit in one call - call again with the same url (free) to finish | |
| sections | No | Every section, top to bottom | |
| framework | No | ||
| sectionCount | No | ||
| pagePreviewUrl | No | The whole page assembled in order, with a Download HTML button. Give it to the user | |
| truncation_note | No | Present when the result was trimmed to fit chat context - says what was dropped and how to get more (limit / full_output arguments, or the REST API). |