# Export HN Comments Flat for CSV & Excel

**Use case:** 

Scrape Hacker News stories with flattened comment arrays and depth fields that export cleanly to CSV or Excel for spreadsheet analysis.

## Input

```json
{
  "mode": "topstories",
  "maxItems": 10,
  "includeComments": true,
  "maxCommentDepth": 3,
  "flattenComments": true,
  "minScore": 0,
  "minComments": 0,
  "domainFilter": [],
  "searchQuery": "",
  "searchTags": [],
  "sortSearchBy": "relevance",
  "username": "",
  "includeUserProfiles": false
}
```

## Output

```json
{
  "id": {
    "label": "ID",
    "format": "number"
  },
  "title": {
    "label": "Title",
    "format": "text"
  },
  "by": {
    "label": "Author",
    "format": "text"
  },
  "score": {
    "label": "Points",
    "format": "number"
  },
  "descendants": {
    "label": "Comment count",
    "format": "number"
  },
  "hnUrl": {
    "label": "HN thread",
    "format": "link"
  },
  "comments": {
    "label": "Comments",
    "format": "array"
  }
}
```

## About this Actor

This example demonstrates how to use [Hacker News Scraper](https://apify.com/constructive_calm/hacker-news-scraper) with a specific input configuration. Visit the [Actor detail page](https://apify.com/constructive_calm/hacker-news-scraper) to learn more, explore other use cases, and run it yourself.