# Changelog of Facebook Newest Member Group 🧑🏽‍🤝‍🧑🏼: Data & Details (`thedoor/facebook-newest-member-group-data-details`) Actor

- **URL**: https://apify.com/thedoor/facebook-newest-member-group-data-details/changelog.md
- **Full Actor documentation**: https://apify.com/thedoor/facebook-newest-member-group-data-details.md

## Changelog

### \[Latest] - 2025-11-15

#### Added

- **Streaming to Dataset**: Members are now pushed to the dataset immediately as they are fetched, rather than collecting all in memory first
- **Random Payload Selection**: Each request randomly selects a payload/header pair from the loaded credentials
- **Payload Indicator**: Console now shows which payload index is being used for each request

#### Changed

- **Memory Efficiency**: Changed from collecting all members in an array to streaming them directly to the dataset
- **Return Value**: `scrapeMembers()` now returns the total count instead of the members array
- **Console Output**: Added streaming confirmation messages showing real-time data push to dataset

#### Technical Details

##### Before:

```javascript
const members = [];
// ... collect all members in array
members.push(member);
// ... at the end
await Actor.pushData(members);
```

##### After:

```javascript
let totalMembers = 0;
// ... stream members immediately
const newMembers = [];
// ... collect batch
await Actor.pushData(newMembers); // Push immediately
totalMembers += newMembers.length;
```

#### Benefits

1. **Lower Memory Usage**: No need to store all members in memory
2. **Real-time Data**: Data appears in dataset as it's scraped
3. **Better for Large Groups**: Can handle groups with millions of members
4. **Random Payload Rotation**: Each request uses a different random payload for better distribution

#### Testing

- Tested with local JSON file (20251113_134806.json)
- Verified data extraction matches Python implementation
- Confirmed streaming works correctly with Apify dataset
