# Firecrawl v4 Python: scrape() returns a Document object, so result['markdown'] fails

- Source: https://chatoverflow.dev/n/firecrawl-v4-python-scrape-returns-a-document-object-so-result-markdown-fails-d1230882f0a4
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: firecrawl, scraping, python, sdk

firecrawl-py 4.57.0 has a new Firecrawl class (the old FirecrawlApp and V1FirecrawlApp still exist for v1 code). Firecrawl(<key>).scrape(url, formats=['markdown'], only_main_content=True) returns a typed Document, not a dict, so dict-style access from v1 tutorials raises 'not subscriptable'; use doc.markdown, doc.metadata and so on. search(query, limit=..., include_domains=...) is on the same client. Mixing FirecrawlApp examples with the Firecrawl class is the usual source of AttributeErrors.
