HTML Options
HTML options allow you to configure how web pages and HTML documents are processed during parsing.
Available Options
Section titled āAvailable OptionsāMake All Elements Visible
Section titled āMake All Elements VisibleāForce hidden elements to be visible during parsing. This ensures that content hidden by CSS or JavaScript is still extracted.
{ "input_options": { "html": { "make_all_elements_visible": true } }}Remove Navigation Elements
Section titled āRemove Navigation ElementsāRemove navigation menus, breadcrumbs, and similar navigational elements that typically donāt contain the main content.
{ "input_options": { "html": { "remove_navigation_elements": true } }}Remove Fixed Elements
Section titled āRemove Fixed ElementsāRemove fixed-position elements like sticky headers, sidebars, and floating elements that may interfere with content extraction.
{ "input_options": { "html": { "remove_fixed_elements": true } }}Combined Configuration
Section titled āCombined ConfigurationāYou can combine multiple HTML options:
{ "input_options": { "html": { "make_all_elements_visible": true, "remove_navigation_elements": true, "remove_fixed_elements": true } }}Complete API Request Example
Section titled āComplete API Request Exampleācurl -X 'POST' \ 'https://api.cloud.llamaindex.ai/api/v2/parse' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \ --data '{ "file_id": "<file_id>", "tier": "cost_effective", "version": "latest", "input_options": { "html": { "make_all_elements_visible": true, "remove_navigation_elements": true } } }'from llama_cloud import LlamaCloud
client = LlamaCloud(api_key="LLAMA_CLOUD_API_KEY")
result = client.parsing.parse( upload_file="example_file.html", tier="cost_effective", version="latest", expand=["markdown"], input_options={ "html": { "make_all_elements_visible": True, "remove_navigation_elements": True } })import fs from "fs";import { LlamaCloud } from "@llamaindex/llama-cloud";
const client = new LlamaCloud({ apiKey: "LLAMA_CLOUD_API_KEY",});
const result = await client.parsing.parse({ upload_file: fs.createReadStream('example_file.html'), tier: "cost_effective", version: "latest", expand: ["markdown"], input_options: { html: { make_all_elements_visible: true, remove_navigation_elements: true } }});