{"id":"speedworkers_page_preview","name":"SpeedWorkers Page Preview","alias":"SpeedworkersPagePreview","aliases":[],"description_short":"Get the HTML, headers and metadata SpeedWorkers delivers to bots for a URL.","description_long":"\n    Preview what Botify SpeedWorkers delivers to search and AI bots for a URL:\n    the pre-rendered HTML (or markdown) served from the SpeedWorkers cache, the\n    HTTP status code and headers bots receive, and the delivery metadata (where\n    the page was delivered from, why it would not be delivered, last cache and\n    next refresh times, matching cache behavior, quality controls results,\n    inventory sources and page properties).\n\n    The HTML is returned as delivered, without any cleaning. With\n    `save_to_tmp_storage`, the HTML is saved to temporary storage and its URL is\n    returned instead, while the headers and metadata are still returned.\n\n    The project must have SpeedWorkers enabled.\n    ","description_tool_prompt":"\n    Preview what Botify SpeedWorkers delivers to search and AI bots for a URL:\n    the pre-rendered HTML (or markdown) served from the SpeedWorkers cache, the\n    HTTP status code and headers bots receive, and the delivery metadata (where\n    the page was delivered from, why it would not be delivered, last cache and\n    next refresh times, matching cache behavior, quality controls results,\n    inventory sources and page properties).\n\n    The HTML is returned as delivered, without any cleaning. With\n    `save_to_tmp_storage`, the HTML is saved to temporary storage and its URL is\n    returned instead, while the headers and metadata are still returned.\n\n    The project must have SpeedWorkers enabled.\n    ","source":"Botify SpeedWorkers","conversation_examples":[],"tags":["content"],"available_in_chat":true,"available_in_deepthink":true,"available_in_mcp":true,"mcp_audience":"all","config":{"type":"object","properties":{"save_to_tmp_storage":{"default":false,"description":"Save the fetched HTML to Botify temporary storage and return the temporary URL instead of the HTML. Use this to save output tokens. The returned URL can be passed to other HTML-processing tools. Headers and metadata are still returned.","title":"Save To Temporary Storage","type":"boolean"}},"required":[]},"item":{"type":"object","properties":{"url":{"description":"The URL to get the SpeedWorkers preview for.","title":"URL","type":"string"},"device":{"$ref":"#/$defs/SpeedWorkersDevice","default":"desktop","description":"The device variant of the cached page. When `desktop` or `mobile` is not cached, SpeedWorkers falls back to the device-agnostic (`na`) variant.","enumNames":["Desktop","Mobile","Not applicable"],"title":"Device"},"output_format":{"anyOf":[{"$ref":"#/$defs/SpeedWorkersOutputFormat"},{"type":"null"}],"default":null,"description":"Force the delivered format (`html`, `markdown` for markdown embedded in an HTML page, `pure_markdown` for raw markdown). By default, the format the page's cache behavior delivers to bots.","title":"Output Format"}},"required":["url"],"$defs":{"SpeedWorkersDevice":{"enum":["desktop","mobile","na"],"title":"SpeedWorkersDevice","type":"string"},"SpeedWorkersOutputFormat":{"enum":["html","markdown","pure_markdown"],"title":"SpeedWorkersOutputFormat","type":"string"}}},"response":{"$defs":{"SpeedWorkersInput":{"properties":{"stable_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Stable ID of the input","title":"Stable Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Name of the input","title":"Name"},"input_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Type of the input","title":"Input Type"}},"title":"SpeedWorkersInput","type":"object"},"SpeedWorkersPreviewMetadata":{"properties":{"delivered_from":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Where the page was delivered from (cache, fetch, liverender, section, ignoredparams, livefetch, nowhere)","title":"Delivered From"},"not_delivered_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Why the page would not be delivered to bots (e.g. not_cached, quality_controls_failed), `cached` otherwise","title":"Not Delivered Reason"},"redirect_url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Redirect target, when the page redirects","title":"Redirect Url"},"output_format":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Format actually delivered (html, markdown, pure_markdown)","title":"Output Format"},"last_index_time":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the page was last cached","title":"Last Index Time"},"refresh_time":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the page is due for a refresh","title":"Refresh Time"},"original_processing_time_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Time spent fetching and rendering the page, in ms","title":"Original Processing Time Ms"},"beam_processing_time_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Time spent by SpeedWorkers to deliver the page, in ms","title":"Beam Processing Time Ms"},"section":{"anyOf":[{"$ref":"#/$defs/SpeedWorkersSection"},{"type":"null"}],"default":null,"description":"Cache behavior (section) matching the page"},"quality_controls":{"default":[],"description":"Quality controls run on the page","items":{"$ref":"#/$defs/SpeedWorkersQualityControl"},"title":"Quality Controls","type":"array"},"inputs":{"default":[],"description":"Inventory sources the page comes from","items":{"$ref":"#/$defs/SpeedWorkersInput"},"title":"Inputs","type":"array"},"properties":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"Page properties extracted from the HTML","title":"Properties"},"js_error":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"JavaScript error raised during delivery","title":"Js Error"}},"title":"SpeedWorkersPreviewMetadata","type":"object"},"SpeedWorkersQualityControl":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"ID of the quality control","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Name of the quality control","title":"Name"},"status":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Result of the quality control (0 = success, 3 = error)","title":"Status"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Severity of the quality control","title":"Severity"}},"title":"SpeedWorkersQualityControl","type":"object"},"SpeedWorkersSection":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Stable ID of the cache behavior","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Name of the cache behavior","title":"Name"}},"title":"SpeedWorkersSection","type":"object"}},"properties":{"html":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"HTML (or markdown) of the page as delivered to bots by SpeedWorkers. Omitted when `save_to_tmp_storage` is True; see `html_tmp_storage_url` instead.","title":"Html"},"html_tmp_storage_url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Temporary storage URL of the HTML page. Returned instead of `html` when `save_to_tmp_storage` is True. Can be passed to other HTML-processing tools.","title":"Html Tmp Storage Url"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"HTTP status code delivered to bots","title":"Status Code"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"default":null,"description":"HTTP headers delivered to bots","title":"Headers"},"metadata":{"anyOf":[{"$ref":"#/$defs/SpeedWorkersPreviewMetadata"},{"type":"null"}],"default":null,"description":"SpeedWorkers delivery metadata of the page"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Why no HTML was returned, if any","title":"Reason"}},"title":"SpeedWorkersPagePreviewProcessedItem","type":"object"},"has_canvas":false,"open_canvas_automatically":false}