Skip to content

URL Source

Fetch content from websites with

  • optional CSS selector support
  • custom headers
  • environment variable support
  • multiple URLs
yaml
documents:  - description: Documentation Website  outputPath: docs/website-content.md  sources:  - type: url  description: Documentation Website  urls:  - https://example.com/docs  - https://api.${ENV_NAME}.example.com/data  selector: .main-content  headers:  Authorization: Bearer ${API_TOKEN}  Accept-Language: en-US

Parameters

ParameterTypeDefaultDescription
typestringrequiredMust be "url"
descriptionstring""Human-readable description of the source
urlsarrayrequiredURLs to fetch content from (support env variables)
selectorstringnullCSS selector to extract specific content (null for full page)
headersobject{}Custom headers to include in the request (support env variables)
tagsarray[]List of tags for this source

Using variables in configuration

CTX supports various types of variables throughout your configuration files, including environment variables, predefined system variables, and custom configuration variables.

Read more about variables in the documentation.