> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://ref.scoutos.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://ref.scoutos.com/_mcp/server.

# Create a source sync to execute

POST https://api.scoutos.com/v2/syncs
Content-Type: application/json

Reference: https://ref.scoutos.com/api-sdk/endpoints/syncs/create

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Body (application/json)

This endpoint expects a src__app_http__routes__collection__create_sync__RequestBody.

- `sync_config` (SyncConfig-Input, required)

## Response

### 200

Successful Response

- `data` (Sync, optional, nullable)

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### SyncConfig-Input

- `source_settings` (SyncConfigInputSourceSettings, required)
- `destination` (SyncConfigInputDestination, required)
- `mapping` (Mapping, required)
- `schedule` (Schedule, optional, nullable)

### Sync

- `sync_config` (SyncConfig-Output, required)
- `sync_id` (string, required)
- `last_updated_at` (datetime, required)
- `created_at` (datetime, required)
- `created_by` (LegacyIdentity, required)
- `last_updated_by` (LegacyIdentity, required)
- `trigger_id` (string, optional, nullable)

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### SyncConfigInputSourceSettings

### SyncConfigInputDestination

### Mapping

- `fields` (list of map from string to any, optional)

### Schedule

- `frequency` (string, required)
- `enabled` (boolean, required)

### SyncConfig-Output

- `source_settings` (SyncConfigOutputSourceSettings, required)
- `destination` (SyncConfigOutputDestination, required)
- `mapping` (Mapping, required)
- `schedule` (Schedule, optional, nullable)

### LegacyIdentity

- `type` (enum, required)
  - Allowed values: `user`, `api_key`, `system`
- `details` (LegacyIdentityDetails, required, nullable)

### ValidationErrorLocItems

### SourceSyncSitemapSettings-Input

- `source_archetype_id` ("com.scoutos.sitemap", required)
- `sitemap_url` (string, required) — The URL of the sitemap to be crawled.
- `crawler_settings` (SitemapCrawlerSettings-Input, optional)
- `mode` (enum, optional, default: merge) — Merge: upsert documents keying off site url. Replace: merge and remove stale documents.
  - Allowed values: `merge`, `replace`

### SourceSyncWebsiteSettings

- `source_archetype_id` ("com.scoutos.website", required)
- `selectors` (list of string, optional, nullable)
- `exclude_selectors` (list of string, optional, nullable)
- `strip` (list of string, optional, nullable)
- `strip_urls` (boolean, optional, nullable, default: true)
- `allowed_domains` (list of string, optional, nullable)
- `deny` (list of string, optional)
- `job_id` (string, optional)
- `exclude_before_lastmod_date` (string, optional, nullable)
- `splitter` (SourceSyncWebsiteSettingsSplitter, optional, nullable)
- `wait_for_load_state` (string, optional, default: domcontentloaded)
- `wait_for_timeout` (integer, optional, nullable) — Wait for timeout (in ms) to allow JS hydration of a page. Playwright only.
- `wait_for_event` (string, optional, nullable) — Wait for a custom page/window event (e.g., 'appLoaded') before scraping. The page must dispatch this event via window.dispatchEvent(new Event('eventName')). Playwright only.
- `scraper` (string, optional, nullable)
- `text_extractor` (enum, optional, nullable)
  - Allowed values: `readability`, `trafilatura`, `custom`
- `text_extractor_config` (map from string to any, optional, nullable)
- `max_depth` (integer, optional, default: 20)
- `max_page_count` (integer, optional, default: 8000)
- `allow` (list of string, optional, nullable)
- `exclude_patterns` (list of string, optional, nullable) — A comma-separated list of classes, ids, or tags to exclude
- `sitemap_urls` (list of string, optional, nullable)
- `start_urls` (list of string, optional, nullable)
- `user_agent_header` (string, optional, nullable) — User agent header to use for the crawl. By default, crawler will rotate user agents.
- `include_raw_html` (boolean, optional, default: false) — Include raw HTML content in the crawl output for ADA compliance analysis.
- `crawl_rate_rps` (double, optional, nullable) — Requests per second
- `concurrent_requests` (integer, optional, nullable, default: 32) — Number of concurrent requests

### SourceSyncNotionSettings-Input

- `source_archetype_id` ("com.notion.notion", required)
- `api_key` (string, optional, nullable) — The API key used for authentication with Notion.
- `filter_options` (list of NotionFilterOptions, optional, nullable) — Narrow down pages you sync from Notion by page URL or page title. For example, you can search for page titles like 'blog' and filter out pages with titles containing 'faq'

### SourceSyncCrawlSettings-Input

- `source_archetype_id` ("com.scoutos.crawl", required)
- `start_urls` (string, required) — The starting URL for the crawl process.
- `crawler_settings` (MultiPageCrawlerSettings-Input, optional)
- `mode` (enum, optional, default: merge) — Merge: upsert documents keying off site url. Replace: merge and remove stale documents.
  - Allowed values: `merge`, `replace`

### SourceSyncPageCrawlSettings-Input

- `source_archetype_id` ("com.scoutos.page_crawl", required)
- `start_urls` (string, required) — The starting URL for the crawl process.
- `crawler_settings` (SinglePageCrawlerSettings-Input, optional)
- `mode` (enum, optional, default: merge) — Merge: upsert documents keying off site url. Replace: merge and remove stale documents.
  - Allowed values: `merge`, `replace`

### SourceSyncGoogleDriveSettings

- `source_archetype_id` ("com.google.drive", required)
- `connection_id` (string, optional, nullable) — Which Google Drive connection to sync from.
- `filter_options` (list of string, optional, nullable) — Narrow down resources you sync from the source. Ensure you include fetch_filters method on Source Sync Archetype.

### SourceSyncLaserficheSettings

- `source_archetype_id` ("com.laserfiche.repository", required)
- `connection_id` (string, optional, nullable) — Which Laserfiche connection to use when multiple are connected to the organization.
- `repository_id` (string, optional, nullable) — The Laserfiche repository ID to sync from (e.g., 'r-7144d39a'). If not provided, uses the first available repository.
- `filter_options` (list of string, optional, nullable) — Folder IDs to sync from. If empty, syncs from repository root.
- `template_name` (string, optional, nullable) — Laserfiche template name(s) to filter by. Use | for multiple: 'Com Dev Building | Email | Com Dev Planning Applications'
- `date_after` (string, optional, nullable) — Only sync documents dated on or after this date (format: M/D/YYYY, e.g., '1/1/2020'). Searches template date fields like Issue Date, Meeting Date, etc.
- `include_fields` (list of string, optional, nullable) — Template field names to include in search results. Eliminates extra API calls. Common fields: 'Issue Date', 'Permit No.', 'Street No.', 'Street', 'APN', 'Project Description'.

### SourceSyncMicrosoft365Settings

- `source_archetype_id` ("com.microsoft.365", required)
- `filter_options` (list of string, optional, nullable) — Narrow down resources you sync from SharePoint and OneDrive. Ensure you include fetch_filters method on Source Sync Archetype.
- `file_types` (list of string, optional, nullable) — Filter by specific file types. Leave empty to sync all file types.
- `transcription_method` (enum, optional, default: document_ai) — Method for extracting text from PDFs.
  - Allowed values: `document_ai`, `asset_manager`

### SourceSyncGuidedCrawlSettings-Input

Settings for guided crawl source archetype. Simplified credential handling: - requires_login: checkbox to enable login fields - username: plain text username/email - password_secret_name: dropdown of secrets from vault

- `source_archetype_id` ("com.scoutos.guided_crawl", required)
- `instructions` (string, required) — Natural language instructions for the crawler (e.g., 'Login to portal, navigate to Documents, download all PDFs')
- `start_url` (string, required) — URL to begin the guided crawl from
- `requires_login` (boolean, optional, default: false) — Enable if the site requires authentication
- `username` (string, optional, nullable) — Username or email for login (plain text)
- `password_secret_name` (string, optional, nullable) — Select password secret from Environment Variables
- `translated_steps` (list of GuidedStep, optional, nullable) — LLM-translated steps. Leave empty to auto-generate from instructions.
- `healed_steps` (list of HealedStep, optional, nullable) — Steps that were auto-fixed during previous runs
- `parse_pdfs` (boolean, optional, default: true) — Extract text from downloaded PDFs using OCR
- `max_pdfs` (integer, optional, default: 100) — Maximum number of PDFs to download and process
- `credentials` (list of CredentialMapping, optional, nullable) — (Deprecated) Use requires_login/username/password_secret_name instead
- `record_video` (boolean, optional, default: false) — Record browser session for debugging (increases execution time)
- `mode` (enum, optional, default: merge) — Merge: upsert documents keying off site url. Replace: merge and remove stale documents.
  - Allowed values: `merge`, `replace`

### CollectionDestination

- `collection_id` (string, required)
- `table_id` (string, required)
- `destination_type` ("collections.v2", optional)

### SyncConfigOutputSourceSettings

### SyncConfigOutputDestination

### LegacyIdentityDetails

### SitemapCrawlerSettings-Input

- `scraper` (SitemapCrawlerSettingsInputScraper, optional)
- `text_extractor` (SitemapCrawlerSettingsInputTextExtractor, optional)
- `allow` (string, optional, nullable, default: ) — Comma-separated list of URL patterns to include. Only URLs matching these patterns will be crawled.
- `deny` (string, optional, nullable, default: ) — Comma-separated list of URL patterns to exclude. URLs matching these patterns will be skipped. Supports both simple substrings (like '/admin') and regex patterns (like 'login\.html$').
- `strip` (string, optional, nullable, default: ) — Comma-separated list of html tags to strip from the content.
- `strip_urls` (boolean, optional, default: true) — Removes query parameters, fragments, or trailing slashes, to simplify or standardize urls.
- `allowed_domains` (string, optional, nullable, default: ) — Comma-separated list of domains to include. Only URLs from these domains will be crawled. Defaults to the domain of the startingURL.
- `user_agent_header` (string, optional, nullable) — User agent header to use for the crawl. By default, crawler will rotate user agents.
- `include_raw_html` (boolean, optional, default: false) — Include raw HTML content in the crawl output for ADA compliance analysis.
- `crawl_rate_rps` (double, optional, nullable, default: 1) — Requests per second
- `concurrent_requests` (integer, optional, nullable, default: 32) — Number of concurrent requests
- `max_depth` (integer, optional, default: 20) — Maximum number of link levels to follow from the starting page
- `max_page_count` (integer, optional, default: 8000) — Maximum number of pages to crawl.
- `exclude_before_lastmod_date` (string, optional, nullable, default: ) — Exclude pages last modified before this date.

### SourceSyncWebsiteSettingsSplitter

### NotionFilterOptions

- `field` (enum, optional) — Filter by page URL or page title
  - Allowed values: `Page URL`, `Page Title`
- `operator` (enum, optional) — Comparison operator to user for filtering
  - Allowed values: `Contains Any Of`, `Any Of`, `Contains None Of`, `None Of`
- `value` (list of string, optional) — List of values you want to filter by.

### MultiPageCrawlerSettings-Input

- `scraper` (MultiPageCrawlerSettingsInputScraper, optional)
- `text_extractor` (MultiPageCrawlerSettingsInputTextExtractor, optional)
- `allow` (string, optional, nullable, default: ) — Comma-separated list of URL patterns to include. Only URLs matching these patterns will be crawled.
- `deny` (string, optional, nullable, default: ) — Comma-separated list of URL patterns to exclude. URLs matching these patterns will be skipped. Supports both simple substrings (like '/admin') and regex patterns (like 'login\.html$').
- `strip` (string, optional, nullable, default: ) — Comma-separated list of html tags to strip from the content.
- `strip_urls` (boolean, optional, default: true) — Removes query parameters, fragments, or trailing slashes, to simplify or standardize urls.
- `allowed_domains` (string, optional, nullable, default: ) — Comma-separated list of domains to include. Only URLs from these domains will be crawled. Defaults to the domain of the startingURL.
- `user_agent_header` (string, optional, nullable) — User agent header to use for the crawl. By default, crawler will rotate user agents.
- `include_raw_html` (boolean, optional, default: false) — Include raw HTML content in the crawl output for ADA compliance analysis.
- `crawl_rate_rps` (double, optional, nullable, default: 1) — Requests per second
- `concurrent_requests` (integer, optional, nullable, default: 32) — Number of concurrent requests
- `max_depth` (integer, optional, default: 20) — Maximum number of link levels to follow from the starting page
- `max_page_count` (integer, optional, default: 8000) — Maximum number of pages to crawl.

### SinglePageCrawlerSettings-Input

- `scraper` (SinglePageCrawlerSettingsInputScraper, optional)
- `text_extractor` (SinglePageCrawlerSettingsInputTextExtractor, optional)
- `allow` (string, optional, nullable, default: ) — Comma-separated list of URL patterns to include. Only URLs matching these patterns will be crawled.
- `deny` (string, optional, nullable, default: ) — Comma-separated list of URL patterns to exclude. URLs matching these patterns will be skipped. Supports both simple substrings (like '/admin') and regex patterns (like 'login\.html$').
- `strip` (string, optional, nullable, default: ) — Comma-separated list of html tags to strip from the content.
- `strip_urls` (boolean, optional, default: true) — Removes query parameters, fragments, or trailing slashes, to simplify or standardize urls.
- `allowed_domains` (string, optional, nullable, default: ) — Comma-separated list of domains to include. Only URLs from these domains will be crawled. Defaults to the domain of the startingURL.
- `user_agent_header` (string, optional, nullable) — User agent header to use for the crawl. By default, crawler will rotate user agents.
- `include_raw_html` (boolean, optional, default: false) — Include raw HTML content in the crawl output for ADA compliance analysis.
- `crawl_rate_rps` (double, optional, nullable, default: 1) — Requests per second
- `concurrent_requests` (integer, optional, nullable, default: 32) — Number of concurrent requests
- `max_depth` (integer, optional, default: 1) — Fixed to 1 for single page crawls
- `max_page_count` (integer, optional, default: 1) — Fixed to 1 for single page crawls

### GuidedStep

A single step in a guided crawl workflow.

- `action` (enum, required) — The type of action to perform
  - Allowed values: `navigate`, `click`, `fill`, `wait`, `scrape`, `download_pdf`
- `description` (string, required) — Human-readable description of what this step does
- `selector` (string, optional, nullable) — CSS selector for the target element (not needed for navigate)
- `value` (string, optional, nullable) — Value for the action (URL for navigate, input text for fill)
- `wait_for` (string, optional, nullable) — CSS selector to wait for after this action completes

### HealedStep

Record of a step that was auto-fixed during execution.

- `step_index` (integer, required) — Index of the step that was healed
- `healed_selector` (string, required) — Working selector found by self-healing
- `healed_by` (string, required) — Method used: smart_locator, ai, ai_alternative
- `error` (string, required) — Original error that triggered healing
- `original_selector` (string, optional, nullable) — Original selector that failed
- `confidence` (double, optional, nullable) — AI confidence (0-1)

### CredentialMapping

Maps a form field to a secret reference for secure credential injection.

- `field_selector` (string, required) — CSS selector for the input field
- `secret_ref` (string, required) — Secret reference in format 'secrets.secret_name' (e.g., 'secrets.portal_username')

### SourceSyncSitemapSettings-Output

- `source_archetype_id` ("com.scoutos.sitemap", required)
- `sitemap_url` (string, required) — The URL of the sitemap to be crawled.
- `crawler_settings` (SitemapCrawlerSettings-Output, optional)
- `mode` (enum, optional, default: merge) — Merge: upsert documents keying off site url. Replace: merge and remove stale documents.
  - Allowed values: `merge`, `replace`

### SourceSyncNotionSettings-Output

- `source_archetype_id` ("com.notion.notion", required)
- `api_key` (string, optional, nullable) — The API key used for authentication with Notion.
- `filter_options` (list of NotionFilterOptions, optional, nullable) — Narrow down pages you sync from Notion by page URL or page title. For example, you can search for page titles like 'blog' and filter out pages with titles containing 'faq'

### SourceSyncCrawlSettings-Output

- `source_archetype_id` ("com.scoutos.crawl", required)
- `start_urls` (string, required) — The starting URL for the crawl process.
- `crawler_settings` (MultiPageCrawlerSettings-Output, optional)
- `mode` (enum, optional, default: merge) — Merge: upsert documents keying off site url. Replace: merge and remove stale documents.
  - Allowed values: `merge`, `replace`

### SourceSyncPageCrawlSettings-Output

- `source_archetype_id` ("com.scoutos.page_crawl", required)
- `start_urls` (string, required) — The starting URL for the crawl process.
- `crawler_settings` (SinglePageCrawlerSettings-Output, optional)
- `mode` (enum, optional, default: merge) — Merge: upsert documents keying off site url. Replace: merge and remove stale documents.
  - Allowed values: `merge`, `replace`

### SourceSyncGuidedCrawlSettings-Output

Settings for guided crawl source archetype. Simplified credential handling: - requires_login: checkbox to enable login fields - username: plain text username/email - password_secret_name: dropdown of secrets from vault

- `source_archetype_id` ("com.scoutos.guided_crawl", required)
- `instructions` (string, required) — Natural language instructions for the crawler (e.g., 'Login to portal, navigate to Documents, download all PDFs')
- `start_url` (string, required) — URL to begin the guided crawl from
- `requires_login` (boolean, optional, default: false) — Enable if the site requires authentication
- `username` (string, optional, nullable) — Username or email for login (plain text)
- `password_secret_name` (string, optional, nullable) — Select password secret from Environment Variables
- `translated_steps` (list of GuidedStep, optional, nullable) — LLM-translated steps. Leave empty to auto-generate from instructions.
- `healed_steps` (list of HealedStep, optional, nullable) — Steps that were auto-fixed during previous runs
- `parse_pdfs` (boolean, optional, default: true) — Extract text from downloaded PDFs using OCR
- `max_pdfs` (integer, optional, default: 100) — Maximum number of PDFs to download and process
- `credentials` (list of CredentialMapping, optional, nullable) — (Deprecated) Use requires_login/username/password_secret_name instead
- `record_video` (boolean, optional, default: false) — Record browser session for debugging (increases execution time)
- `mode` (enum, optional, default: merge) — Merge: upsert documents keying off site url. Replace: merge and remove stale documents.
  - Allowed values: `merge`, `replace`

### UserIdentityDetails

- `user_id` (string, required)
- `org_id` (string, required)
- `scout_organization_id` (string, required)
- `email` (map from string to any, required)

### ApiKeyIdentityDetails

- `api_key` (map from string to any, optional)

### SitemapCrawlerSettingsInputScraper

### SitemapCrawlerSettingsInputTextExtractor

### MarkdownSplitterConfig

- `type` ("markdown", required)
- `chunk_size` (integer, optional, default: 2500)
- `chunk_overlap` (integer, optional, default: 200)

### RecursiveSplitterConfig

- `type` ("recursive", required)
- `chunk_size` (integer, optional, default: 2500)
- `chunk_overlap` (integer, optional, default: 200)

### SentenceSplitterConfig

- `type` ("sentence", required)
- `chunk_size` (integer, optional, default: 2500)
- `chunk_overlap` (integer, optional, default: 200)
- `separator` (string, optional, default: .)

### ParagraphSplitterConfig

- `type` ("paragraph", required)
- `chunk_size` (integer, optional, default: 2500)
- `chunk_overlap` (integer, optional, default: 200)
- `separator` (string, optional, default: 

)

### MarkDownWithContext

- `type` ("markdown_with_context", required)

### MultiPageCrawlerSettingsInputScraper

### MultiPageCrawlerSettingsInputTextExtractor

### SinglePageCrawlerSettingsInputScraper

### SinglePageCrawlerSettingsInputTextExtractor

### SitemapCrawlerSettings-Output

- `scraper` (SitemapCrawlerSettingsOutputScraper, optional)
- `text_extractor` (SitemapCrawlerSettingsOutputTextExtractor, optional)
- `allow` (string, optional, nullable, default: ) — Comma-separated list of URL patterns to include. Only URLs matching these patterns will be crawled.
- `deny` (string, optional, nullable, default: ) — Comma-separated list of URL patterns to exclude. URLs matching these patterns will be skipped. Supports both simple substrings (like '/admin') and regex patterns (like 'login\.html$').
- `strip` (string, optional, nullable, default: ) — Comma-separated list of html tags to strip from the content.
- `strip_urls` (boolean, optional, default: true) — Removes query parameters, fragments, or trailing slashes, to simplify or standardize urls.
- `allowed_domains` (string, optional, nullable, default: ) — Comma-separated list of domains to include. Only URLs from these domains will be crawled. Defaults to the domain of the startingURL.
- `user_agent_header` (string, optional, nullable) — User agent header to use for the crawl. By default, crawler will rotate user agents.
- `include_raw_html` (boolean, optional, default: false) — Include raw HTML content in the crawl output for ADA compliance analysis.
- `crawl_rate_rps` (double, optional, nullable, default: 1) — Requests per second
- `concurrent_requests` (integer, optional, nullable, default: 32) — Number of concurrent requests
- `max_depth` (integer, optional, default: 20) — Maximum number of link levels to follow from the starting page
- `max_page_count` (integer, optional, default: 8000) — Maximum number of pages to crawl.
- `exclude_before_lastmod_date` (string, optional, nullable, default: ) — Exclude pages last modified before this date.

### MultiPageCrawlerSettings-Output

- `scraper` (MultiPageCrawlerSettingsOutputScraper, optional)
- `text_extractor` (MultiPageCrawlerSettingsOutputTextExtractor, optional)
- `allow` (string, optional, nullable, default: ) — Comma-separated list of URL patterns to include. Only URLs matching these patterns will be crawled.
- `deny` (string, optional, nullable, default: ) — Comma-separated list of URL patterns to exclude. URLs matching these patterns will be skipped. Supports both simple substrings (like '/admin') and regex patterns (like 'login\.html$').
- `strip` (string, optional, nullable, default: ) — Comma-separated list of html tags to strip from the content.
- `strip_urls` (boolean, optional, default: true) — Removes query parameters, fragments, or trailing slashes, to simplify or standardize urls.
- `allowed_domains` (string, optional, nullable, default: ) — Comma-separated list of domains to include. Only URLs from these domains will be crawled. Defaults to the domain of the startingURL.
- `user_agent_header` (string, optional, nullable) — User agent header to use for the crawl. By default, crawler will rotate user agents.
- `include_raw_html` (boolean, optional, default: false) — Include raw HTML content in the crawl output for ADA compliance analysis.
- `crawl_rate_rps` (double, optional, nullable, default: 1) — Requests per second
- `concurrent_requests` (integer, optional, nullable, default: 32) — Number of concurrent requests
- `max_depth` (integer, optional, default: 20) — Maximum number of link levels to follow from the starting page
- `max_page_count` (integer, optional, default: 8000) — Maximum number of pages to crawl.

### SinglePageCrawlerSettings-Output

- `scraper` (SinglePageCrawlerSettingsOutputScraper, optional)
- `text_extractor` (SinglePageCrawlerSettingsOutputTextExtractor, optional)
- `allow` (string, optional, nullable, default: ) — Comma-separated list of URL patterns to include. Only URLs matching these patterns will be crawled.
- `deny` (string, optional, nullable, default: ) — Comma-separated list of URL patterns to exclude. URLs matching these patterns will be skipped. Supports both simple substrings (like '/admin') and regex patterns (like 'login\.html$').
- `strip` (string, optional, nullable, default: ) — Comma-separated list of html tags to strip from the content.
- `strip_urls` (boolean, optional, default: true) — Removes query parameters, fragments, or trailing slashes, to simplify or standardize urls.
- `allowed_domains` (string, optional, nullable, default: ) — Comma-separated list of domains to include. Only URLs from these domains will be crawled. Defaults to the domain of the startingURL.
- `user_agent_header` (string, optional, nullable) — User agent header to use for the crawl. By default, crawler will rotate user agents.
- `include_raw_html` (boolean, optional, default: false) — Include raw HTML content in the crawl output for ADA compliance analysis.
- `crawl_rate_rps` (double, optional, nullable, default: 1) — Requests per second
- `concurrent_requests` (integer, optional, nullable, default: 32) — Number of concurrent requests
- `max_depth` (integer, optional, default: 1) — Fixed to 1 for single page crawls
- `max_page_count` (integer, optional, default: 1) — Fixed to 1 for single page crawls

### Http

- `scraper_type` ("http", optional)

### Playwright

- `scraper_type` ("playwright", optional)
- `wait_for_load_state` (enum, optional, default: load) — Determines when the scraper considers navigation to be finished.
  - Allowed values: `load`, `domcontentloaded`, `networkidle`
- `wait_for_timeout` (integer, optional, nullable) — Additional wait time in milliseconds after page load to allow JavaScript hydration. Only applies to Playwright scraper.
- `wait_for_event` (string, optional, nullable) — Wait for a custom page/window event (e.g., 'appLoaded') before scraping. The page must dispatch this event via window.dispatchEvent(new Event('eventName')). Playwright only.

### Readability

- `text_extractor_type` ("readability", optional)

### Trafilatura-Input

- `trafilatura_type` (TrafilaturaInputTrafilaturaType, required) — Choose the Trafilatura extraction algorithm to use.
- `text_extractor_type` ("trafilatura", optional)

### Custom

- `text_extractor_type` ("custom", optional)
- `selectors` (string, optional, nullable, default: )
- `exclude_selectors` (string, optional, nullable, default: ) — Enter a comma-separated list of classes, IDs, or tags to exclude from the content.
- `exclude_common_elements` (boolean, optional, nullable, default: false) — Exclude common elements like headers, footers, and navigation menus.

### SitemapCrawlerSettingsOutputScraper

### SitemapCrawlerSettingsOutputTextExtractor

### MultiPageCrawlerSettingsOutputScraper

### MultiPageCrawlerSettingsOutputTextExtractor

### SinglePageCrawlerSettingsOutputScraper

### SinglePageCrawlerSettingsOutputTextExtractor

### TrafilaturaInputTrafilaturaType

Choose the Trafilatura extraction algorithm to use.

### Trafilatura-Output

- `trafilatura_type` (TrafilaturaOutputTrafilaturaType, required) — Choose the Trafilatura extraction algorithm to use.
- `text_extractor_type` ("trafilatura", optional)

### Default-Input

- `trafilatura_type` ("default", optional)
- `trafilatura_extractor_config` (TextExtractorConfig, optional)

### Html2Text

- `trafilatura_type` ("html2text", optional)

### Baseline

- `trafilatura_type` ("baseline", optional)

### Bare-Input

- `trafilatura_type` ("bare", optional)
- `trafilatura_extractor_config` (TextExtractorConfig, optional)

### TrafilaturaOutputTrafilaturaType

Choose the Trafilatura extraction algorithm to use.

### TextExtractorConfig

- `favor` (enum, optional) — Choose whether to prioritize precision or recall when extracting content.
  - Allowed values: `precision`, `recall`
- `favor_recall` (boolean, optional, default: false)
- `favor_precision` (boolean, optional, default: false)
- `no_fallback` (boolean, optional, default: false) — Skip Trafilatura's fallback algorithms for faster scrape though less precise.
- `include_comments` (boolean, optional, default: true) — Include comment sections at the bottom of articles.
- `include_tables` (boolean, optional, default: true) — Extract text from HTML \<table> elements.
- `include_formatting` (boolean, optional, default: true) — Keep structural elements related to formatting (\<b>/\<strong>, \<i>/\<emph> etc.)
- `include_links` (boolean, optional, default: true) — Keep link targets (in href="...") in the extracted content.
- `include_images` (boolean, optional, default: true) — Keep track of images along with their targets (\<img> attributes: alt, src, title)
- `deduplicate` (boolean, optional, default: true) — Helps identify and remove redundant content, such as navigation menus or footers, which are often repeated across the site
- `with_metadata` (boolean, optional, default: true) — Extract metadata fields and include them in the output

### Default-Output

- `trafilatura_type` ("default", optional)
- `trafilatura_extractor_config` (TextExtractorConfig, optional)

### Bare-Output

- `trafilatura_type` ("bare", optional)
- `trafilatura_extractor_config` (TextExtractorConfig, optional)

## Examples

**Request**

```json
{
  "sync_config": {
    "source_settings": {
      "source_archetype_id": "web_crawler_01",
      "sitemap_url": "https://example.com/sitemap.xml"
    },
    "destination": {
      "collection_id": "col_12345",
      "table_id": "tbl_67890"
    },
    "mapping": {}
  }
}
```

**Response**

```json
{
  "data": {
    "sync_config": {
      "source_settings": {
        "source_archetype_id": "web_crawler_01",
        "sitemap_url": "https://example.com/sitemap.xml",
        "crawler_settings": {
          "scraper": {
            "scraper_type": "http"
          },
          "text_extractor": {
            "text_extractor_type": "readability"
          },
          "allow": "/articles/",
          "deny": "/private/",
          "strip": "utm_source,utm_medium",
          "strip_urls": true,
          "allowed_domains": "example.com,sub.example.com",
          "user_agent_header": "Mozilla/5.0 (compatible; ExampleBot/1.0; +http://example.com/bot)",
          "max_depth": 5,
          "max_page_count": 1000,
          "exclude_before_lastmod_date": "2023-01-01T00:00:00Z"
        },
        "mode": "merge"
      },
      "destination": {
        "destination_type": "collections.v2",
        "collection_id": "col_12345",
        "table_id": "tbl_67890"
      },
      "mapping": {
        "fields": [
          {}
        ]
      },
      "schedule": {
        "frequency": "daily",
        "enabled": true
      }
    },
    "sync_id": "sync_98765",
    "last_updated_at": "2024-01-15T09:30:00Z",
    "created_at": "2024-01-15T09:30:00Z",
    "created_by": {
      "type": "user",
      "details": {
        "api_key": {}
      }
    },
    "last_updated_by": {
      "type": "user",
      "details": {
        "api_key": {}
      }
    },
    "trigger_id": "trigger_54321"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.scoutos.com/v2/syncs"

payload = { "sync_config": {
        "source_settings": {
            "source_archetype_id": "web_crawler_01",
            "sitemap_url": "https://example.com/sitemap.xml"
        },
        "destination": {
            "collection_id": "col_12345",
            "table_id": "tbl_67890"
        },
        "mapping": {}
    } }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```typescript
import { ScoutClient } from "scoutos";

const client = new ScoutClient({ apiKey: "YOUR_API_KEY" });
await client.syncs.create({
    sync_config: {
        source_settings: {
            source_archetype_id: "com.google.drive"
        },
        destination: {
            destination_type: "collections.v2",
            collection_id: "collection_id",
            table_id: "table_id"
        },
        mapping: {}
    }
});

```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.scoutos.com/v2/syncs"

	payload := strings.NewReader("{\n  \"sync_config\": {\n    \"source_settings\": {\n      \"source_archetype_id\": \"web_crawler_01\",\n      \"sitemap_url\": \"https://example.com/sitemap.xml\"\n    },\n    \"destination\": {\n      \"collection_id\": \"col_12345\",\n      \"table_id\": \"tbl_67890\"\n    },\n    \"mapping\": {}\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.scoutos.com/v2/syncs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"sync_config\": {\n    \"source_settings\": {\n      \"source_archetype_id\": \"web_crawler_01\",\n      \"sitemap_url\": \"https://example.com/sitemap.xml\"\n    },\n    \"destination\": {\n      \"collection_id\": \"col_12345\",\n      \"table_id\": \"tbl_67890\"\n    },\n    \"mapping\": {}\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.scoutos.com/v2/syncs")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"sync_config\": {\n    \"source_settings\": {\n      \"source_archetype_id\": \"web_crawler_01\",\n      \"sitemap_url\": \"https://example.com/sitemap.xml\"\n    },\n    \"destination\": {\n      \"collection_id\": \"col_12345\",\n      \"table_id\": \"tbl_67890\"\n    },\n    \"mapping\": {}\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.scoutos.com/v2/syncs', [
  'body' => '{
  "sync_config": {
    "source_settings": {
      "source_archetype_id": "web_crawler_01",
      "sitemap_url": "https://example.com/sitemap.xml"
    },
    "destination": {
      "collection_id": "col_12345",
      "table_id": "tbl_67890"
    },
    "mapping": {}
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.scoutos.com/v2/syncs");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"sync_config\": {\n    \"source_settings\": {\n      \"source_archetype_id\": \"web_crawler_01\",\n      \"sitemap_url\": \"https://example.com/sitemap.xml\"\n    },\n    \"destination\": {\n      \"collection_id\": \"col_12345\",\n      \"table_id\": \"tbl_67890\"\n    },\n    \"mapping\": {}\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["sync_config": [
    "source_settings": [
      "source_archetype_id": "web_crawler_01",
      "sitemap_url": "https://example.com/sitemap.xml"
    ],
    "destination": [
      "collection_id": "col_12345",
      "table_id": "tbl_67890"
    ],
    "mapping": []
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.scoutos.com/v2/syncs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```