# CJ Dropshipping Scraper (`codingfrontend/cj-dropshipping-scraper`) Actor

Extract bounded public CJ Dropshipping Product JSON-LD with minimal source diagnostics.

- **URL**: https://apify.com/codingfrontend/cj-dropshipping-scraper.md
- **Developed by:** [Coding Frontned](https://apify.com/codingfrontend) (community)
- **Features:** Limited permissions
- **Stats:** 1 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

## CJ Dropshipping Scraper

### What does this Actor do?

This Actor reads bounded public CJ Dropshipping pages and extracts product information that the official page exposes through Product JSON-LD, clearly product-shaped embedded JSON, or official product cards and links. It emits source-backed product rows with stable identity and provenance. It uses direct HTTPS by default and supports an optional standard Apify Proxy route. It does not sign in, call private endpoints, submit forms, solve human verification, or bypass access controls.

### Why use it?

Use it to collect a small, reproducible snapshot of publicly visible CJ Dropshipping product metadata for catalog research, supplier comparison, and local parsing checks. Public availability varies by page and time; an access challenge is reported as a typed diagnostic instead of being represented as product data.

### How it works

The Actor requests only approved HTTPS CJ Dropshipping hosts. It follows explicit official next-page links within the page budget, deduplicates products by product ID, canonical product URL, or product name, and never follows product-detail links automatically. Response size, timeout, retry, URL, and page limits are bounded. A local `fixturePath` is available for deterministic validation and is never used as a production source.

### Input

```json
{
  "startUrls": ["https://cjdropshipping.com/products/featured"],
  "maxProducts": 10,
  "maxPages": 3,
  "timeoutSecs": 30,
  "maxRetries": 2,
  "maxResponseBytes": 5000000,
  "fixturePath": ""
}
```

| Field | Type | Default | Description |
| --- | --- | ---: | --- |
| `startUrls` | array of strings | `https://cjdropshipping.com/` | Official public HTTPS start pages; up to 20 URLs. |
| `maxProducts` | integer | `10` | Maximum normal product rows for the complete run; 1–100. |
| `maxPages` | integer | `3` | Maximum pages requested, including starts and explicit next pages; 1–20. |
| `timeoutSecs` | integer | `30` | Per-page timeout in seconds; 5–120. |
| `maxRetries` | integer | `2` | Retries for transient transport or upstream 5xx errors; 0–3. Access challenges are never retried as a bypass. |
| `maxResponseBytes` | integer | `5000000` | Maximum streamed response size per page; 100,000–10,000,000 bytes. |
| `fixturePath` | string | empty | Optional repository-relative `.html`, `.htm`, or `.json` file for deterministic local checks. |
| `proxyConfiguration` | object | disabled | Optional standard Apify Proxy configuration; challenges remain typed diagnostics. |

### Output

Normal dataset rows contain only fields supported by the public page, for example:

```json
{
  "productId": "CJ-EXAMPLE-001",
  "productName": "Example product",
  "price": 12.5,
  "currency": "USD",
  "productUrl": "https://cjdropshipping.com/product/example",
  "sourceUrl": "https://cjdropshipping.com/products/featured",
  "sourceDomain": "cjdropshipping.com",
  "searchUrl": "https://cjdropshipping.com/products/featured",
  "pageNum": 1,
  "scrapedAt": "2026-09-16T00:00:00.000Z"
}
```

Access failures, empty public pages, invalid local inputs, and other source conditions are emitted as minimal typed diagnostic rows with `recordType: "diagnostic"`, `errorCode`, `url`, `sourceUrl`, and `scrapedAt`. The run summary is stored in `OUTPUT`; operational counters and `remoteGates: "NOT_RUN_LOCAL_ONLY"` are stored in `RUN_HEALTH`.

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

### Data fields

| Field group | Fields |
| --- | --- |
| Identity | `productId`, `productName`, `productUrl`, `productGroup`, `variantCount`, `variants` |
| Commercial | `price`, `currency`, `availability`, `offers` |
| Catalog | `brand`, `manufacturer`, `supplier`, `category`, `description`, `properties` |
| Media and ratings | `imageUrl`, `imageUrls`, `aggregateRating` |
| Provenance | `sourceUrl`, `sourceDomain`, `searchUrl`, `pageNum`, `scrapedAt` |

Fields are omitted when the public source does not expose a trustworthy value. A product row is not a promise that inventory, price, availability, or supplier details are current after the run.

### Cost and limits

The Actor uses ordinary public HTTPS requests and does not call a paid CJ Dropshipping API. When enabled, the standard Apify Proxy is used only as a compliant transport route. Apify compute, storage, and any account-level platform charges depend on the plan running the Actor. Limits in the input table bound request count, response size, retries, and emitted product rows.

### Tips

- Start with one official category or product page and a small `maxProducts` value.
- Use `maxPages` only when the page publishes an explicit official next link.
- Keep `maxRetries` low for source stability; access-control responses are recorded and not bypassed.
- Use `fixturePath` with the repository fixture when testing parser or schema changes locally.
- Treat diagnostic rows as operational evidence, not as catalog records.

### FAQ

#### Does this Actor log in or access private supplier data?

No. It reads only public pages and public structured data exposed in the response.

#### Why did I receive a diagnostic instead of products?

The page may have returned an access challenge, an upstream error, an empty response, an unsupported content type, or no parseable public product record. Inspect `errorCode`, `url`, `OUTPUT`, and `RUN_HEALTH`.

#### Does it visit every product detail page?

No. It follows only explicit official pagination. Add individual public product URLs as separate `startUrls` when a detail-page snapshot is needed.

#### Is a local fixture a live-data result?

No. Fixture rows verify parser, schema, provenance, and orchestration behavior only.

### Responsible use and support

Respect CJ Dropshipping’s terms, robots guidance, applicable law, and reasonable request rates. Do not use this Actor to bypass access controls, collect restricted personal data, or misrepresent a diagnostic as product inventory. For support, include the input shape, `OUTPUT`, `RUN_HEALTH`, and the relevant diagnostic code while removing credentials or other sensitive data.

### Local validation

```text
npm run check
node --test test/public-contract.test.js
apify validate-schema
apify run --purge --input-file test/inputs/fixture.json
node validate-datasets.js
```

The fixture input is local-only and uses a repository-relative HTML file. Normal runs fetch only approved public CJ Dropshipping HTTPS URLs; no Cloud qualification is implied by local validation.

# Actor input Schema

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

HTTPS URLs on cjdropshipping.com used as public search or product-page starts. At most 20 pages are requested sequentially.

## `maxProducts` (type: `integer`):

Maximum normal product rows emitted for the complete run.

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

Maximum official public pages requested, including explicit start URLs and clearly marked next-page links.

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

Bounded timeout for each official page request.

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

Bounded retries for transient network or upstream 5xx errors; access-control responses are never retried.

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

Maximum streamed response size per page.

## `fixturePath` (type: `string`):

Optional repository-relative .html, .htm, or .json fixture used only for deterministic local checks.

## `proxyConfiguration` (type: `object`):

Optional standard Apify Proxy route for the public source. Access challenges are reported, not bypassed.

## Actor input object example

```json
{
  "startUrls": [
    "https://cjdropshipping.com/"
  ],
  "maxProducts": 10,
  "maxPages": 3,
  "timeoutSecs": 30,
  "maxRetries": 2,
  "maxResponseBytes": 5000000,
  "fixturePath": "",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

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

No description

## `runHealth` (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 = {
    "startUrls": [
        "https://cjdropshipping.com/"
    ],
    "maxProducts": 10,
    "maxPages": 3,
    "timeoutSecs": 30,
    "maxRetries": 2,
    "maxResponseBytes": 5000000
};

// Run the Actor and wait for it to finish
const run = await client.actor("codingfrontend/cj-dropshipping-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 = {
    "startUrls": ["https://cjdropshipping.com/"],
    "maxProducts": 10,
    "maxPages": 3,
    "timeoutSecs": 30,
    "maxRetries": 2,
    "maxResponseBytes": 5000000,
}

# Run the Actor and wait for it to finish
run = client.actor("codingfrontend/cj-dropshipping-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 '{
  "startUrls": [
    "https://cjdropshipping.com/"
  ],
  "maxProducts": 10,
  "maxPages": 3,
  "timeoutSecs": 30,
  "maxRetries": 2,
  "maxResponseBytes": 5000000
}' |
apify call codingfrontend/cj-dropshipping-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,codingfrontend/cj-dropshipping-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/akeP6DVS2pXCsAAHa/builds/pZOvfrckrLQU7IqqI/openapi.json
