> ## Documentation Index
> Fetch the complete documentation index at: https://docs.keyflow.space/llms.txt
> Use this file to discover all available pages before exploring further.

# Scrape Reddit

### **Overview:**

The `Scrape Reddit` block is designed to gather post titles, URLs, and content from Reddit based on a specified search term or query. This block facilitates easy access to the latest discussions and information relevant to user interests.

***

### Inputs & Outputs

| I/O    | Feature                  | Type      | Simple Explanation                                                                                             |
| ------ | ------------------------ | --------- | -------------------------------------------------------------------------------------------------------------- |
| input  | `query`                  | string    | The search term or query you want to match against Reddit posts.                                               |
| input  | `subreddit`              | string    | The name of the specific subreddit where the posts will be searched.                                           |
| input  | `post_limit` (optional)  | number    | Maximum number of posts to fetch, with a default limit of 10 and a maximum of 100.                             |
| input  | `time_period` (optional) | selector  | Allows fetching posts within a defined time frame: options are `hour`, `day`, `week`, `month`, `year`, or all. |
| input  | `sort_by` (optional)     | selector  | Specifies how the fetched posts should be sorted; options include: `hot`, `new`, `top`, or others.             |
| output | `post_titles`            | string\[] | Contains titles of the fetched Reddit posts.                                                                   |
| output | `post_links`             | string\[] | Contains URLs linking directly to each respective post on Reddit.                                              |
| output | `post_content`           | string\[] | Includes the contents of each fetched post for further review and context if needed.                           |

***

### Use Cases

Consider these practical applications that demonstrate how this block can enhance your workflow:

* **Market Research:** When tracking industry-specific trends or discussions, you can quickly aggregate content related to emerging topics recognized across various subreddits.
* **Brand Monitoring:** If you need insight into consumer sentiment regarding a brand or product, this tool allows you to monitor ongoing conversations and mentions effortlessly.
* **Trend Analysis:** Keeping abreast with current hot topics in your area of interest becomes simpler by fetching relevant discussions from multiple angles.
* **Information Gathering:** For personal interest projects or professional research initiatives, collecting comprehensive data about specific subjects is made efficient using targeted searches within communities.

In summary, whenever there’s a need for gathering diverse insights from Reddit about particular topics or queries, the `Scrape Reddit` block serves as an invaluable resource!
