Skip to content

Conversation

@firecrawl-spring
Copy link
Contributor

Summary

This PR addresses documentation gaps identified in customer support conversations regarding the v2 scrape endpoint actions parameter.

Changes Made

1. Added Missing Screenshot Action

  • The screenshot action was documented in the OpenAPI spec but completely missing from the Advanced Scraping Guide
  • Now fully documented with all parameters: fullPage, quality, viewport

2. Comprehensive Parameter Documentation

  • Each action now has clear parameter descriptions including:
    • Required vs optional parameters
    • Parameter types and constraints
    • Practical examples (e.g., '#button', '.submit-btn' for selectors)
    • Key codes for the press action (Enter, Tab, Escape)
    • Return value locations for scrape, executeJavascript, and pdf actions

3. Enhanced Code Examples

  • Updated Python, JavaScript, and cURL examples to:
    • Include the screenshot action demonstration
    • Show proper syntax for Python dictionaries (quoted keys)
    • Demonstrate how to access results (e.g., doc.screenshot)
    • Include wait actions between interactions for better reliability

4. Important Notes Section

  • Added best practices:
    • Execution order (sequential)
    • Element waiting patterns
    • Focus requirements before typing
    • Screenshot placement strategy
    • JavaScript return value handling

Problem Solved

Customer support conversation showed confusion about:

  1. What actions are available - now comprehensively listed
  2. What parameters each action accepts - now fully documented
  3. How to use actions effectively - improved with examples and notes

The documentation now matches the OpenAPI specification and provides clear, actionable guidance for developers using the actions parameter.

…nd examples

- Add comprehensive parameter documentation for all 9 action types (wait, click, write, press, scroll, screenshot, scrape, executeJavascript, pdf)
- Add missing screenshot action which was in API spec but not documented in advanced guide
- Include parameter descriptions: required vs optional, types, default values, and examples
- Update code examples to include screenshot action and demonstrate accessing screenshot results
- Add 'Important Notes about Actions' section covering execution order, element waiting, focus requirements, and JavaScript returns
- Clarify that scroll selector is optional and defaults to page-level scrolling
- Document return values for scrape, executeJavascript, and pdf actions

Co-Authored-By: devhims <himanshu@sideguide.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants