# Changelog of Jobs Scrapper (`ai-scraper-labs/jobs-scrapper`) Actor

- **URL**: https://apify.com/ai-scraper-labs/jobs-scrapper/changelog.md
- **Full Actor documentation**: https://apify.com/ai-scraper-labs/jobs-scrapper.md

## Changelog

### Version 1.11 - Worldwide Job Search Support (December 17, 2024)

#### Major Enhancements

**Worldwide Location Support**

- Added intelligent fallback system to search jobs globally when specific locations return no results
- Location input now supports:
  - Specific locations: `"bangalore"`, `"mumbai"`, `"delhi"`
  - All locations: `"all"`, `"worldwide"`, or leave empty
  - Automatic fallback: If a specific location returns 0 jobs, automatically tries searching all locations

#### Technical Changes

**Search Strategy**

- Implemented `searchAttempts` array to track multiple search URL variations
- Added fallback logic in Phase 1 crawler:
  - First attempts location-specific search
  - If no results on first page, automatically tries broader search without location filter
- Enhanced logging to show which search variation is being executed

**Input Schema Updates**

- Updated location field description to clarify worldwide support
- Changed default location from empty to `"all"` for better user experience
- Added note about AmbitionBox being primarily India-focused

**URL Building**

- Support for both location-specific URLs: `jobs/{role}-jobs-in-{location}-prfloc`
- Support for worldwide URLs: `jobs/{role}-jobs-prf`
- Automatic construction of role slug for URLs

#### User Benefits

1. **No Configuration Needed**: Users can simply set location to `"all"` to get worldwide results
2. **Intelligent Fallback**: If searching for a location with no jobs, automatically expands search
3. **Better Visibility**: Enhanced logging shows which search variation is active
4. **Preserved Functionality**: All existing features (Naukri integration, company info, benefits) work unchanged

#### Usage Examples

```json
// Search all locations worldwide
{
  "role": "software engineer",
  "location": "all",
  "maxJobs": 50
}

// Search specific location with automatic fallback
{
  "role": "data scientist",
  "location": "bangalore",
  "maxJobs": 30
}

// Worldwide search (alternative)
{
  "role": "python developer",
  "location": "worldwide",
  "maxJobs": 100
}
```

#### Previous Versions

### Version 1.10 - Debugging Enhancements

- Added comprehensive debugging for **NUXT** data structure
- Improved error messages when no jobs found

### Version 1.9 - Request Queue Fix

- Changed from `addRequests()` + `run()` to `run(detailRequests)` pattern
- Ensures all jobs are processed through Phase 2

### Version 1.8 - Dynamic Content Extraction

- Fixed `about_this_role` extraction using page.evaluate()
- Fixed `company_info` extraction using page.evaluate()
- Replaced cheerio with DOM queries for dynamic content

### Version 1.7 - Request Limit Fix

- Added `maxRequestsPerCrawl: totalJobs` to Phase 2 crawler
- Ensures all extracted jobs are processed (not just 10)

### Version 1.6 - Logic Bug Fix

- Fixed inverted conditional logic in Naukri URL extraction
- Moved Naukri extraction from `else` to `if (naukriUrl)` block

### Version 1.5 - Naukri URL Extraction

- Changed from query param extraction to path-based extraction
- Pattern: `-(naukri|monster|indeed)_(\d+)-jdp`

### Version 1.3 - Company Slug Regex

- Fixed company name extraction from job URLs
- New pattern: `/\/jobs\/[^/]+-in-([^/]+)-(?:naukri_|monster_|indeed_)[\d]+-jdp/`
