Skip to main content
Format options control what data types are included in your response. Specify one or more formats to receive HTML, markdown, screenshots, or extracted links alongside your extracted data. Common uses:
  • Full page content: Get raw HTML for custom processing
  • Readable text: Convert pages to clean markdown format
  • Visual records: Capture screenshots for monitoring or archival
  • Link extraction: Get all URLs from the page for further crawling
You can combine multiple formats in a single request. All specified formats will be included in the response.

Parameters

formats
array
default:"[\"html\"]"
Choose which types of content you want in your response. You can request multiple formats at once, and each will be included in the result.Available formats:
  • html - The full HTML source code of the page
    • Best for: Custom parsing, preserving exact page structure, accessing all DOM elements
  • markdown - Clean, readable markdown version of the page
    • Best for: Content analysis, LLM processing, human-readable output
Example:
"formats": ["html", "markdown"]

Usage

Single HTML format

Request one format type - html (default). Best for:
  • Custom HTML parsing
  • Preserving exact page structure
  • Accessing all DOM elements and attributes
  • Archival purposes
from nimble_python import Nimble

nimble = Nimble(api_key="YOUR-API-KEY")

result = nimble.extract({
    "url": "https://www.example.com",
    "formats": ["html"] # default
})

# Access HTML content
html_content = result["data"]["html"]
print(html_content)

Multiple formats

Combine multiple formats to get different data representations:
from nimble_python import Nimble

nimble = Nimble(api_key="YOUR-API-KEY")

result = nimble.extract({
    "url": "https://www.example.com",
    "formats": ["html", "markdown"]
})

print(result)

Markdown format

Convert the page to clean, readable markdown. Best for:
  • Clean text extraction
  • Content analysis
  • LLM processing
  • Human-readable output:
from nimble_python import Nimble

nimble = Nimble(api_key="YOUR-API-KEY")

result = nimble.extract({
    "url": "https://www.example.com/article",
    "formats": ["markdown"]
})

# Access markdown content
markdown_content = result["data"]["markdown"]
print(markdown_content)

Example response

When formats are specified, all requested data is included in the response. The response includes:
  • data.html: Raw HTML if requested
  • data.markdown: Converted markdown if requested
  • data.screenshot: Base64-encoded PNG if requested
  • data.links: Array of extracted URLs if requested
  • data.parsing: Structured data if parsing was used
  • metadata: Execution details and formats included:
{
  "url": "https://www.example.com/",
  "task_id": "b1fa7943-cba5-4ec2-a88c-4d2d6799c794",
  "status": "success",
  "data": {
    "html": "<!DOCTYPE html><html><head>...</head><body>...</body></html>",
    "markdown": "# Article Title\n\nThis is the article content...",
    "screenshot": "iVBORw0KGgoAAAANSUhEUgAAA...",
    "links": [
      "https://www.example.com/about",
      "https://www.example.com/contact",
      "https://www.example.com/products",
      "https://external-site.com"
    ],
    "parsing": {
      "title": "Example Article",
      "author": "John Doe"
    }
  },
  "metadata": {
      "query_time": "2026-02-08T22:00:36.132Z",
      "query_duration": 1877,
      "response_parameters": {
            "input_url": "https://www.example.com/"
      },
      "driver": "vx6"
    },
  "status_code": 200
}

Best practices

Format selection

Choose formats based on your needs:
  • Use html when you need full DOM access
  • Use markdown for clean text and content analysis
  • Use screenshot for visual verification
  • Use links for discovering URLs to crawl
Avoid unnecessary formats:
# ❌ Don't request all formats if you only need one
formats=["html", "markdown"]

# ✅ Request only what you need
formats=["markdown"]

Performance considerations

  • Each format adds processing time
  • Screenshots require rendering and are slower
  • HTML and markdown are faster to generate
  • Request only needed formats for optimal performance