submit
Submit web forms by automatically extracting hidden fields and CSRF tokens, then merging user-provided data for secure POST submissions. Use for login forms, search interfaces, and API interactions behind HTML pages.
Instructions
Submit a web form with smart field extraction.
Fetches a page, parses all forms, extracts hidden fields and CSRF tokens, merges user-provided fields, and submits via POST.
Use for: login forms, search forms, API interactions behind HTML pages.
Returns: Response body (markdown-converted) after form submission.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cookies | No | ||
| csrf_selector | No | ||
| fields | Yes | ||
| session | No | Named session for cookie persistence. When set, the form page fetch and the POST submission both use the session's cookie jar, preserving authentication state. See `fetch` `session` for full documentation. | |
| url | Yes |
Implementation Reference
- python/src/nab_loader/core.py:132-138 (handler)The `_safe_fetch` method is a handler for fetching a URL without raising exceptions, used internally by `fetch_batch`. Note: No tool named 'submit' exists in the codebase; the term 'submit' appears as a method call on a ThreadPoolExecutor in `core.py`.
def _safe_fetch(self, url: str) -> NabResult: """Fetch a URL, returning an error result instead of raising.""" try: return self.fetch(url) except (NabFetchError, NabNotFoundError): return NabResult(url=url, markdown="", status=0, size=0, time_ms=0.0)