# Find people looking for a room to rent in Madrid groups with AI

**Use case:** 

AI finds the public Facebook rental groups of Madrid, reads their posts from the last 7 days and keeps only the posts of people looking for a room or an apartment: students, doctors, couples. Change the city or the need to find your own leads.

## Input

```json
{
  "url": [
    "https://www.facebook.com/groups/63181993057/"
  ],
  "maxPosts": 30,
  "groupSearchPrompt": "groups for renting rooms and apartments in Madrid, Spain",
  "prompt": "someone looking for a room or an apartment to rent",
  "groupSearchMaxGroups": 10,
  "onlyNewPosts": false,
  "sortingOrder": "newest_posts",
  "includeTopComment": true,
  "fetchAllComments": false,
  "fetchCommentReplies": false,
  "postsNewerThanDays": 2,
  "postsNewerThanHours": 2,
  "postsOlderThan": "2 days",
  "postsNewerThan": "7 days"
}
```

## Output

```json
{
  "thumbnail": {
    "label": "Preview image",
    "format": "image"
  },
  "text": {
    "label": "Post text",
    "format": "text"
  },
  "post_url": {
    "label": "Post URL",
    "format": "link"
  },
  "group_url": {
    "label": "Group URL",
    "format": "link"
  },
  "user_name": {
    "label": "Author",
    "format": "text"
  },
  "user_url": {
    "label": "Author URL",
    "format": "link"
  },
  "creation_time": {
    "label": "Created at",
    "format": "text"
  },
  "creation_timestamp": {
    "label": "Created timestamp",
    "format": "number"
  },
  "photo_count": {
    "label": "Photos",
    "format": "number"
  },
  "reactions_count": {
    "label": "Reactions",
    "format": "number"
  },
  "topReactionsCount": {
    "label": "Reaction types",
    "format": "number"
  },
  "reactionHahaCount": {
    "label": "Haha",
    "format": "number"
  },
  "reactionLikeCount": {
    "label": "Like",
    "format": "number"
  },
  "reactionLoveCount": {
    "label": "Love",
    "format": "number"
  },
  "reactionCareCount": {
    "label": "Care",
    "format": "number"
  },
  "reactionSadCount": {
    "label": "Sad",
    "format": "number"
  },
  "comments_count": {
    "label": "Comments",
    "format": "number"
  },
  "shares_count": {
    "label": "Shares",
    "format": "number"
  },
  "sale_post": {
    "label": "Sale listing",
    "format": "array"
  },
  "media": {
    "label": "Media",
    "format": "array"
  },
  "topComment": {
    "label": "Comments",
    "format": "array"
  },
  "post_id": {
    "label": "Post ID",
    "format": "text"
  },
  "feedback_id": {
    "label": "Feedback ID",
    "format": "text"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Facebook Groups Posts & Comments Scraper 🔥$0.0015 Actor is ready to run with the inputs already set for "Find people looking for a room to rent in Madrid groups with AI". [Sign up or log in](https://console.apify.com/create-task-from-example/chTyFAUc8tYVNUFM2) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Find people looking for a room to rent in Madrid groups with AI" task

The Facebook Groups Posts & Comments Scraper 🔥$0.0015 Actor will start running based on the input automatically. You can also change all the input fields, like facebook group urls, max posts - for each url, and more, to match your specific use case.

### 3. Receive the "Find people looking for a room to rent in Madrid groups with AI" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as preview image, post text, post url, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Find people looking for a room to rent in Madrid groups with AI" task via API](https://apify.com/thedoor/facebook-group-post-scraper.md).

## About this Actor

This example demonstrates how to use [Facebook Groups Posts & Comments Scraper 🔥$0.0015](https://apify.com/thedoor/facebook-group-post-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/thedoor/facebook-group-post-scraper.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/thedoor/facebook-group-post-scraper.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
