summaryrefslogtreecommitdiff
path: root/content/docs/configuration/output.md
diff options
context:
space:
mode:
authorPhilipp Tanlak <philipp.tanlak@gmail.com>2025-11-24 20:54:57 +0100
committerPhilipp Tanlak <philipp.tanlak@gmail.com>2025-11-24 20:57:48 +0100
commitb1e2c8fd5cb5dfa46bc440a12eafaf56cd844b1c (patch)
tree49d360fd6cbc6a2754efe93524ac47ff0fbe0f7d /content/docs/configuration/output.md
Docs
Diffstat (limited to 'content/docs/configuration/output.md')
-rw-r--r--content/docs/configuration/output.md47
1 files changed, 47 insertions, 0 deletions
diff --git a/content/docs/configuration/output.md b/content/docs/configuration/output.md
new file mode 100644
index 0000000..2470865
--- /dev/null
+++ b/content/docs/configuration/output.md
@@ -0,0 +1,47 @@
+---
+title: 'Output File and Format'
+weight: 10
+---
+
+The output file and format are specified in the configuration object of your scraping script. They determine where the scraped data will be saved and in what format.
+
+## Output File
+
+The output file is the file where the scraped data will be saved. If not specified, the data will be printed to the standard output (stdout).
+
+```javascript {filename="Configuration"}
+export const config = {
+ output: {
+ // Specify the output file.
+ file: "results.json",
+ },
+};
+```
+
+In the above example, the scraped data will be saved in a file named `results.json`.
+
+## Output Format
+
+The output format is the format in which the scraped data will be saved. The options are `json` and `ndjson`.
+
+```javascript {filename="Configuration"}
+export const config = {
+ output: {
+ // Specify the output format.
+ format: "json",
+ },
+};
+```
+
+In the above example, the scraped data will be saved in JSON format.
+
+```javascript {filename="Configuration"}
+export const config = {
+ output: {
+ // Specify the output format.
+ format: "ndjson",
+ },
+};
+```
+
+In this example, the scraped data will be saved in newline-delimited JSON (NDJSON) format. Each line in the output file will be a separate JSON object.