# Apna Job Detail Scraper (`codingfrontend/apna-co-jobs-scraper`) Actor

Extract public Apna.co job-detail and job-search postings with salary, organization, location, requirements, and JobPosting JSON-LD evidence.

- **URL**: https://apify.com/codingfrontend/apna-co-jobs-scraper.md
- **Developed by:** [Coding Frontned](https://apify.com/codingfrontend) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

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 examples already wired to this Actor's own input schema, see the [API](#api) section below.

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`).

# README

Apna Job Detail Scraper

CSV inventory row: 4476. The implementation is aligned with the public Apna.co job-search and job-detail source represented by [soft_alexist/apna-jobs-details-scraper](https://apify.com/soft_alexist/apna-jobs-details-scraper).

### What does Apna Job Detail Scraper do?

This Actor extracts publicly visible job postings from Apna.co. It accepts official search URLs or an individual public job URL, reads the server-rendered job feed and public JobPosting JSON-LD, and emits one source-backed dataset item per unique job. Search cards provide the job ID, title, company, location, salary range, tags, and public URL. When `includeDetails` is enabled, the Actor follows each public job URL and can add the description, employment type, date posted, expiry, experience, education, skills, department, work mode, and direct-apply metadata exposed by the page.

### Why use Apna Job Detail Scraper?

- It uses direct, serialized HTTPS requests and works with Apna’s current SSR/Next.js feed without browser automation.
- It validates that requests and redirects remain on the official `apna.co` domain.
- It preserves card data when a detail page is unavailable and marks the fallback truthfully instead of inventing fields.
- It supports opt-in numbered pagination while keeping the original one-page default.
- It writes source-backed job rows and exact five-field diagnostics (`recordType`, `url`, `error`, `errorCode`, and `scrapedAt`) for challenges, denials, empty pages, invalid URLs, and transient failures.
- It excludes email addresses and sensitive contact/secret keys from extracted payloads. It never logs in, submits applications, or bypasses access controls.

### How to use Apna Job Detail Scraper

Provide `startUrls` with values such as `https://apna.co/jobs` or a public URL copied from an Apna job card. If `startUrls` is empty, `query` builds an official search URL. The normal Apify workflow is:

```bash
apify validate-schema
apify run --input-file .actor/input.json
```

The Actor writes records to the default dataset and writes its aggregate run information to the `OUTPUT_SUMMARY` key-value-store record.

### Input

`startUrls` is an array of official Apna search/detail URLs and retains the original string-list contract. `query` is an optional search phrase. `maxJobs` keeps its original meaning: the maximum unique candidates parsed from each search page. `includeDetails` defaults to `true`; set it to `false` for a fast card-only crawl. `timeoutSecs` and `requestDelayMs` control direct requests. `maxPages` defaults to `1` and can be increased to follow Apna’s `?page=N` pagination. `maxRetries` covers only transient transport/5xx failures. `maxResponseBytes` bounds HTML responses. `userAgent` is an optional transparent override. `fixtureFile` is a development-only flat HTML or JSON file under `test/fixtures` or `.actor/fixtures` and disables network access for local testing.

### Output

Each dataset item is either a source-backed Apna job record or a five-field `diagnostic` with exactly `recordType`, `url`, `error`, `errorCode`, and `scrapedAt`. Job rows contain public job, employer, salary, location, detail, and official-source URL fields; runtime, transport, inventory, record-wrapper, extraction-method, and local instrumentation fields stay in `OUTPUT_SUMMARY` or are omitted.

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

Example job item:

```json
{
  "source": "Apna.co public job posting",
  "jobId": "756953653",
  "jobTitle": "Inventory Executive( bangalore)",
  "organizationName": "2Coms Consulting Pvt Ltd.",
  "location": "All areas in Bengaluru/Bangalore Region",
  "minSalary": 300000,
  "maxSalary": 420000,
  "currency": "INR",
  "jobUrl": "https://apna.co/job/hoskote/inventory-executive-bangalore-756953653",
  "sourceUrl": "https://apna.co/jobs",
  "sourcePageUrl": "https://apna.co/jobs",
  "searchUrl": "https://apna.co/jobs",
  "sourceDomain": "apna.co"
}
```

### Data table

| Field | Description |
| --- | --- |
| `jobId`, `jobTitle`, `jobUrl` | Stable public job identity |
| `organizationName`, `organizationLogo` | Public employer identity |
| `location` | Public Apna location text or structured address |
| `salary`, `minSalary`, `maxSalary`, `currency` | Public INR salary information |
| `description`, `skills`, `experience`, `experienceText`, `education`, `shift` | Detail-page fields when exposed |
| `industry`, `category`, `companyAddress`, `genderRequirement` | Public role, employer, and requirement details |
| `earningPotential`, `tags`, `highlights`, `isWfh` | Public compensation and job badges |
| `detailStatus`, `detailErrorCode` | Whether optional public detail enrichment was fetched or failed |
| `sourceUrl`, `sourcePageUrl`, `searchUrl` | Official public source URLs |
| `sourceDomain`, `source` | Source attribution |

### Pricing / Cost estimation

Apify platform compute and storage charges depend on the selected machine size, run duration, and dataset volume. This Actor makes no paid third-party requests and does not require a proxy. A card-only run generally uses one request per search page; enabling details adds at most one request per unique card. `OUTPUT_SUMMARY.fallbackMode` is `no_fallback` when all requested details were fetched, or `public_search_card_fallback_for_detail` when a usable search-card record is retained after a detail failure.

### Tips or Advanced options

Use `includeDetails: false` for discovery, then rerun selected public detail URLs with details enabled. Increase `maxPages` gradually and add a small `requestDelayMs` for larger public crawls. Keep `maxRetries` low when diagnosing a source issue. A `diagnostic` is a useful signal that the source changed or denied access; it is not a job record.

### FAQ, disclaimers, and support

The Actor only collects data visible on public Apna pages. It does not collect candidate profiles, private contact details, login-gated application data, or applicant authentication information. Search results and salaries can change after a run, and Apna may restrict automated access. Respect Apna’s terms, robots directives, applicable privacy law, and your permitted use of the data. For support, include the run ID, input URL, diagnostic code, and `OUTPUT_SUMMARY` values; never include credentials or private tokens.

# Actor input Schema

## `query` (type: `string`):

Optional query used to build an Apna jobs URL when startUrls is empty.

## `startUrls` (type: `array`):

Official public Apna search or job-detail URLs.

## `maxJobs` (type: `integer`):

Maximum unique job candidates parsed from each search page.

## `includeDetails` (type: `boolean`):

Follow public job URLs and merge detail fields such as description, salary, requirements, and expiry.

## `timeoutSecs` (type: `integer`):

Per-page direct public request timeout.

## `requestDelayMs` (type: `integer`):

Optional fixed delay between serialized direct requests.

## `maxPages` (type: `integer`):

Maximum numbered Apna search pages to inspect for each search URL.

## `maxRetries` (type: `integer`):

Retries for transient timeouts, transport failures, and HTTP 5xx responses.

## `maxResponseBytes` (type: `integer`):

Fail closed when an HTML response is larger than this bound.

## `userAgent` (type: `string`):

Optional transparent user-agent override for public HTTPS requests.

## `fixtureFile` (type: `string`):

Development-only flat HTML or JSON fixture under test/fixtures or .actor/fixtures; when set, no network request is made.

## Actor input object example

```json
{
  "startUrls": [
    "https://apna.co/jobs"
  ],
  "maxJobs": 5,
  "includeDetails": true,
  "timeoutSecs": 30,
  "requestDelayMs": 0,
  "maxPages": 1,
  "maxRetries": 1,
  "maxResponseBytes": 6000000
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `runSummary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("codingfrontend/apna-co-jobs-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("codingfrontend/apna-co-jobs-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call codingfrontend/apna-co-jobs-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,codingfrontend/apna-co-jobs-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/b3er5wpypaSeXU1Kv/builds/vASEeIuta11NrdT54/openapi.json
