.env
file with the name WRITER_API_KEY
.Parameter | Type | Required | Description |
---|---|---|---|
query | string | Yes | The search query to execute |
topic | string | No | The search topic category. Use news for current events and news articles, or general for broader web search. Default: general |
search_depth | string | No | Controls search comprehensiveness. Use basic for fewer but highly relevant results, or advanced for deeper search with more results. Default: basic |
chunks_per_source | integer | No | Only applies when search_depth is advanced . Specifies how many text segments to extract from each source. Limited to 3 chunks maximum |
max_results | integer | No | Limits the number of search results returned. Cannot exceed 20 sources |
time_range | string | No | Filters results to content published within the specified time range. Options: day , week , month , year , d , w , m , y |
days | integer | No | For news topic searches, specifies how many days of news coverage to include |
include_raw_content | string | Boolean | No | Controls how raw content is included. Options: text , markdown , true (same as markdown), false (not included). Default: false |
include_answer | Boolean | No | Whether to include a generated answer to the query in the response. Default: true |
include_domains | array | No | Domains to include in the search |
exclude_domains | array | No | Domains to exclude from the search |
country | string | No | Localizes search results to a specific country. Only applies to general topic searches |
stream | Boolean | No | Enables streaming of search results as they become available. Default: false |
Parameter | Type | Description |
---|---|---|
query | string | The search query that was submitted |
answer | string | Generated answer based on the search results. null if include_answer is false |
sources | array | The search results found |
sources[].url | string | URL of the search result |
sources[].raw_content | string | Raw content from the source URL. null if include_raw_content is false |
news
for current events and general
for broader searchesinclude_domains
and exclude_domains
to focus on reliable sourcesbasic
for quick searches and advanced
for comprehensive researchtime_range
to get current information when neededmax_results
to control response size and processing time