{ "success": true, "data": { "markdown": "# Example Domain\n\nThis domain is for use in illustrative examples...", "metadata": { "title": "Example Domain", "sourceURL": "https://example.com" } }}
Scrape a page, then keep working with it using the browser session API.
{:ok, scrape} = Firecrawl.scrape_and_extract_from_url( url: "https://www.amazon.com", formats: ["markdown"])scrape_id = get_in(scrape.body, ["data", "metadata", "scrapeId"])# Use the REST API for interact (prompt-based)headers = [ {"Authorization", "Bearer #{Application.get_env(:firecrawl, :api_key)}"}, {"Content-Type", "application/json"}]{:ok, _} = Req.post( "https://api.firecrawl.dev/v2/scrape/#{scrape_id}/interact", json: %{prompt: "Search for iPhone 16 Pro Max"}, headers: headers){:ok, response} = Req.post( "https://api.firecrawl.dev/v2/scrape/#{scrape_id}/interact", json: %{prompt: "Click on the first result and tell me the price"}, headers: headers)IO.inspect(response.body)# Stop the sessionReq.delete( "https://api.firecrawl.dev/v2/scrape/#{scrape_id}/interact", headers: headers)