November 1, 2024

•

Eric Ciarla imageEric Ciarla

Launch Week II - Day 5: Introducing New Actions

Launch Week II - Day 5: Introducing New Actions image

Welcome to Day 5 of Firecrawl’s second Launch Week! Today, we’re excited to introduce two powerful new actions that will enhance your web scraping capabilities: Scrape and Wait for Selector.

Introducing the New Actions

Firecrawl allows you to perform various actions on a web page before scraping its content. This is particularly useful for interacting with dynamic content, navigating through pages, or accessing content that requires user interaction.

We’re excited to introduce two powerful new actions:

  1. Scrape: Capture the current page content at any point during your interaction sequence, returning both URL and HTML.
  2. Wait for Selector: Wait for a specific element to appear on the page before proceeding, ensuring more reliable automation.

Here’s how you can incorporate these new actions:

actions = [
    {"type": "scrape"},
    {"type": "wait", "selector": "#my-element"},
]

For more details about the actions parameters, refer to the API Reference.

Why Use These New Actions?

  • Flexibility: Capture content at multiple points in your interaction flow.
  • Reliability: Ensure elements are loaded before proceeding, reducing errors.
  • Efficiency: Automate complex navigation and interactions seamlessly.

What’s Next?

That’s a wrap for Day 5 of Launch Week II! Happy scraping, and stay tuned for more exciting updates from Launch Week II!

Ready to Build?

Start scraping web data for your AI apps today.
No credit card needed.

About the Author

Eric Ciarla image
Eric Ciarla@ericciarla

Eric Ciarla is the Chief Operating Officer (COO) of Firecrawl and leads marketing. He also worked on Mendable.ai and sold it to companies like Snapchat, Coinbase, and MongoDB. Previously worked at Ford and Fracta as a Data Scientist. Eric also co-founded SideGuide, a tool for learning code within VS Code with 50,000 users.

More articles by Eric Ciarla