# Drupal Org Modules Scraper (`kawsar/drupal-org-modules-scraper`) Actor

Extract Drupal projects, modules, themes, and distributions into structured datasets. Run quick machine-name lookups or bulk paginated listings, then download clean JSON, CSV, or Excel exports.

- **URL**: https://apify.com/kawsar/drupal-org-modules-scraper.md
- **Developed by:** [Kawsar](https://apify.com/kawsar) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

### Drupal Modules & Projects Scraper

This tool helps you quickly extract project details, modules, themes, and distributions directly into clean structured datasets like JSON, CSV, or Excel spreadsheets.

### Why use this tool?

- **Audit & Inventory**: Easily pull complete lists of installed or existing modules for site audits and migration planning.
- **Quick Lookups**: Fetch specific details for project machine names without manually opening multiple pages.
- **Flexible Exports**: Extract modules, themes, or distributions using identical, structured columns.
- **Spreadsheet Friendly**: Cap your runs and download neatly formatted CSV or Excel files ready for your team.
- **Consistent Tracking**: Unique node IDs remain constant across runs, making incremental updates easy to manage.

### Extracted Data Points

For every item processed, the tool extracts:

- **Node ID (`nid`)**: Unique identifier used to prevent duplicates.
- **Title (`projectTitle`)**: The name of the project or module.
- **Machine Name (`machine_name`)**: System machine name.
- **Project URL (`url`)**: Direct line to the resource.
- **Project Type (`project_type`)**: Indicates full release or sandbox project.
- **Created & Modified Dates (`created`, `changed`)**: Unix timestamps showing project activity.
- **Author ID (`author_id`)**: Profile ID of the maintainer.
- **Security Coverage (`security_advisory_coverage`)**: Indicates covered status where applicable.
- **Summary (`body_summary`)**: Clean, plain-text summary with formatting stripped out.
- **Timestamp (`scraped_at`)**: UTC time of extraction.

In case an issue occurs with a specific item, an error row is logged containing the URL, status code, and error message while the rest of the extraction continues smoothly.

### Input Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `mode` | string | `list` | Choose `list` to browse through projects or `by_machine_name` for direct lookup. |
| `projectType` | string | `project_module` | Filter by type in list mode (`project_module`, theme, or distribution). |
| `machineNames` | array | `["views"]` | List of machine names to retrieve in lookup mode. |
| `sort` | string | `changed` | Sort results by `changed`, `created`, or `title`. |
| `maxItems` | integer | `100` | Maximum number of rows to collect (up to 1000). |
| `requestDelaySecs` | number | `1` | Pause between calls to ensure smooth running. |
| `timeoutSecs` | integer | `300` | Total maximum execution time in seconds. |
| `requestTimeoutSecs` | integer | `30` | Timeout per single request. |
| `userAgent` | string | `kawsarActorResearch/1.0` | Custom User-Agent header string. |
| `proxyConfiguration` | object | `{"useApifyProxy": false}` | Optional network proxy configuration. |

#### Example Configurations

**Standard List Run:**

```json
{
    "mode": "list",
    "projectType": "project_module",
    "sort": "changed",
    "maxItems": 100,
    "requestDelaySecs": 1,
    "timeoutSecs": 300,
    "requestTimeoutSecs": 30,
    "userAgent": "",
    "proxyConfiguration": { "useApifyProxy": false }
}

```

**Direct Lookup Run:**

```json
{
    "mode": "by_machine_name",
    "machineNames": ["views"],
    "maxItems": 10
}

```

### Sample Output

```json
{
    "nid": "38878",
    "projectTitle": "Views (for Drupal 7)",
    "machine_name": "views",
    "url": "[https://www.drupal.org/project/views](https://www.drupal.org/project/views)",
    "project_type": "full",
    "created": "1132950847",
    "changed": "1747763262",
    "author_id": "26979",
    "security_advisory_coverage": "covered",
    "body_summary": "Support from 2025 onwards",
    "scraped_at": "2026-10-12T00:00:00+00:00"
}

```

### FAQ

**How many items can I extract in a single run?**
You can set `maxItems` anywhere up to 1,000 items per execution.

**What happens if a requested machine name doesn't exist?**
If a project machine name is not found, it is logged as an empty result and skipped without breaking the entire run.

**Can I export the collected data directly into Excel or CSV?**
Yes. You can download the dataset directly in JSON, CSV, or Excel formats.

**Are duplicate rows automatically removed?**
Yes. Node IDs stay persistent and duplicates within the same run are automatically deduplicated.

***

#### Trademark Notice

All product names, logos, and brands mentioned belong to their respective owners. Their inclusion in this documentation is solely for identification and description purposes and does not imply endorsement, sponsorship, or affiliation.

#### Disclaimer

This tool is an independent extraction solution and is not officially associated with or endorsed by any third-party platform. All data collected is strictly from publicly available resources. Users are responsible for ensuring their usage complies with relevant terms of service, guidelines, and applicable data rights.

#### Is web scraping legal?

This tool only collects publicly available data without bypassing any access controls. Scraping public data is generally legal, but how you handle and utilize the data is important:

- **Personal Data**: If your extracted dataset contains personal identifiers (such as names or profiles), privacy regulations like GDPR or CCPA may apply. Only handle personal data with a clear, legitimate purpose.
- **Copyright**: Descriptions, documentation, and written content may carry specific licensing terms or copyright protection. Ensure your re-use aligns with applicable guidelines or licenses.
- **Terms & Attribution**: Always respect source terms, rate limits, and credit requirements where applicable.
- **Legal Advice**: This overview is provided for general informational purposes and does not constitute formal legal advice.

To learn more, read Apify's guide: [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

# Actor input Schema

## `mode` (type: `string`):

List recently changed projects, or look up specific machine names such as views.

## `projectType` (type: `string`):

Bundle sent as the type query on list mode. project_module was confirmed. Themes and distributions use the same node.json route.

## `machineNames` (type: `array`):

Project machine names for lookup mode, one per line. views is a confirmed public lookup.

## `sort` (type: `string`):

Sort field for list mode. changed with direction DESC was confirmed. created and title are accepted by this input and sent on the same endpoint.

## `maxItems` (type: `integer`):

Stop after this many project rows. Hard cap is 1000.

## `requestDelaySecs` (type: `number`):

Seconds to wait between Drupal.org requests. Requests stay sequential.

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

Stop the run after this many seconds, even if maxItems is not reached.

## `requestTimeoutSecs` (type: `integer`):

How long to wait for a single Drupal.org HTTP response.

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

Identify the client in the User-Agent header, including a contact address. Drupal.org rejects an empty agent.

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

Optional proxy for Drupal.org requests. Leave useApifyProxy off unless the source blocks your IP.

## Actor input object example

```json
{
  "mode": "list",
  "projectType": "project_module",
  "machineNames": [
    "views"
  ],
  "sort": "changed",
  "maxItems": 100,
  "requestDelaySecs": 1,
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "userAgent": "kawsar@gmail.com",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `datasetUrl` (type: `string`):

No description

## `datasetItemsUrl` (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 = {
    "mode": "list",
    "projectType": "project_module",
    "machineNames": [
        "views"
    ],
    "sort": "changed",
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("kawsar/drupal-org-modules-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 = {
    "mode": "list",
    "projectType": "project_module",
    "machineNames": ["views"],
    "sort": "changed",
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("kawsar/drupal-org-modules-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 '{
  "mode": "list",
  "projectType": "project_module",
  "machineNames": [
    "views"
  ],
  "sort": "changed",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call kawsar/drupal-org-modules-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kawsar/drupal-org-modules-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/vwOeJ0A2uHTqXPvUl/builds/vsTlwXZ43vvVQAdOQ/openapi.json
