# She Code Africa chapters scraper (`julia_k/sca2026`) Actor

Scrapes every She Code Africa community chapter and its link.

- **URL**: https://apify.com/julia\_k/sca2026.md
- **Developed by:** [Julia K](https://apify.com/julia_k) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 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.

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

## She Code Africa chapters scraper

Scrapes every [She Code Africa](https://shecodeafrica.org) community chapter - the name, where it is, and the link to its own page - and saves them to a dataset.

Built from the TypeScript [Crawlee](https://crawlee.dev/) + [CheerioCrawler](https://crawlee.dev/api/cheerio-crawler/class/CheerioCrawler) Actor template, then customized.

### Quick Start

Once you've installed the dependencies, start the Actor:

```bash
apify run
```

Once your Actor is ready, you can push it to the Apify Console:

```bash
apify login # first, you need to log in if you haven't already done so

apify push
```

### Project Structure

```text
.actor/
├── actor.json # Actor config: name, version, env vars, runtime settings
├── dataset_schema.json # Structure and representation of data produced by an Actor
├── input_schema.json # Input validation & Console form definition
└── output_schema.json # Specifies where an Actor stores its output
src/
├── main.ts # Actor entry point and orchestrator
└── routes.ts # Handles each API page and saves chapters to the dataset
storage/ # Local storage (mirrors Cloud during development)
├── datasets/ # Output items (JSON objects)
├── key_value_stores/ # Files, config, INPUT
└── request_queues/ # Pending crawl requests
Dockerfile # Container image definition
```

For more information, see the [Actor definition](https://docs.apify.com/platform/actors/development/actor-definition) documentation.

### How it works

The She Code Africa website is a React app, so the HTML the server sends back is an empty
`<div id="root">` - there is nothing in it for Cheerio to read. The page fills itself from a
public JSON API, so this Actor scrapes that API directly. It is faster than rendering a browser,
and the data arrives already structured.

- The crawler starts at page 1 of the chapters API, taken from the `startUrls` input field.
- The response says how many pages exist, so `src/routes.ts` queues the remaining pages with
  `addRequests()` after handling the first one.
- Each chapter is saved to the dataset with its name, category, city, country, link, description,
  and image.
- `resultsLimit` caps how many chapters get saved. Leave it empty to save all of them. If the
  limit is filled by page 1, the remaining pages are never fetched at all.

At the time of writing that is 46 chapters across 9 countries, fetched in 5 requests.

> **Note:** She Code Africa is a non-profit running on a small server, so `maxConcurrency` is set
> to 5 in `src/main.ts`. Please keep it low.

### Input

| Field | Type | What it does |
| --- | --- | --- |
| `startUrls` | array | Where to start. Defaults to page 1 of the chapters API. |
| `maxRequestsPerCrawl` | integer | Cap on pages fetched. There are about 5, so 20 is plenty. |
| `resultsLimit` | integer | Cap on chapters saved. Empty means all of them (about 46). |

### Example output

```json
{
    "name": "SCA UNN",
    "category": "Campus",
    "city": "Enugu",
    "country": "Nigeria",
    "link": "https://linktr.ee/scaunn",
    "description": "An SCA Chapter in the University of Nigeria Nsukka, Enugu",
    "image": "https://ik.imagekit.io/gcrrtxwk5/SCA_WEBSITE_V3/PRODUCTION/CHAPTERS/50.png"
}
```

### What's included

- **[Apify SDK](https://docs.apify.com/sdk/js)** - toolkit for building [Actors](https://apify.com/actors)
- **[Crawlee](https://crawlee.dev/)** - web scraping and browser automation library
- **[Input schema](https://docs.apify.com/platform/actors/development/input-schema)** - define and easily validate a schema for your Actor's input
- **[Dataset](https://docs.apify.com/sdk/python/docs/concepts/storages#working-with-datasets)** - store structured data where each object stored has the same attributes
- **[Cheerio](https://cheerio.js.org/)** - a fast, flexible & elegant library for parsing and manipulating HTML and XML
- **[Proxy configuration](https://docs.apify.com/platform/proxy)** - rotate IP addresses to prevent blocking

### Resources

- [Quick Start](https://docs.apify.com/platform/actors/development/quick-start) guide for building your first Actor
- [Video tutorial](https://www.youtube.com/watch?v=yTRHomGg9uQ) on building a scraper using CheerioCrawler
- [Written tutorial](https://docs.apify.com/academy/web-scraping-for-beginners/challenge) on building a scraper using CheerioCrawler
- [Web scraping with Cheerio in 2023](https://blog.apify.com/web-scraping-with-cheerio/)
- How to [scrape a dynamic page](https://blog.apify.com/what-is-a-dynamic-page/) using Cheerio
- [Integration with Zapier](https://apify.com/integrations), Make, Google Drive and others
- [Video guide on getting data using Apify API](https://www.youtube.com/watch?v=ViYYDHSBAKM)

### Creating Actors with templates

[How to create Apify Actors with web scraping code templates](https://www.youtube.com/watch?v=u-i-Korzf8w)

### Getting started

For complete information [see this article](https://docs.apify.com/platform/actors/development#build-actor-locally). To run the Actor use the following command:

```bash
apify run
```

### Deploy to Apify

#### Connect Git repository to Apify

If you've created a Git repository for the project, you can easily connect to Apify:

1. Go to [Actor creation page](https://console.apify.com/actors/new)
2. Click on **Link Git Repository** button

#### Push project on your local machine to Apify

You can also deploy the project on your local machine to Apify without the need for the Git repository.

1. Log in to Apify. You will need to provide your [Apify API Token](https://console.apify.com/account/integrations) to complete this action.

   ```bash
   apify login
   ```

2. Deploy your Actor. This command will deploy and build the Actor on the Apify Platform. You can find your newly created Actor under [Actors -> My Actors](https://console.apify.com/actors?tab=my).

   ```bash
   apify push
   ```

### Documentation reference

To learn more about Apify and Actors, take a look at the following resources:

- [Apify SDK for JavaScript documentation](https://docs.apify.com/sdk/js)
- [Apify SDK for Python documentation](https://docs.apify.com/sdk/python)
- [Apify Platform documentation](https://docs.apify.com/platform)
- [Join our developer community on Discord](https://discord.com/invite/jyEM2PRvMU)

# Actor input Schema

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

The She Code Africa chapters API. Start on page 1 - the Actor finds the remaining pages itself.

## `maxRequestsPerCrawl` (type: `integer`):

Maximum number of pages the crawler fetches. There are about 5 pages of chapters, so 20 is plenty.

## `resultsLimit` (type: `integer`):

Maximum number of chapters to save. Leave empty to save all of them (about 46).

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://sca-v3-backend-prod-05e311d52a38.herokuapp.com/api/chapters/member-chapters?page=1"
    }
  ],
  "maxRequestsPerCrawl": 20,
  "resultsLimit": 20
}
```

# Actor output Schema

## `results` (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": [
        {
            "url": "https://sca-v3-backend-prod-05e311d52a38.herokuapp.com/api/chapters/member-chapters?page=1"
        }
    ],
    "resultsLimit": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("julia_k/sca2026").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": [{ "url": "https://sca-v3-backend-prod-05e311d52a38.herokuapp.com/api/chapters/member-chapters?page=1" }],
    "resultsLimit": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("julia_k/sca2026").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": [
    {
      "url": "https://sca-v3-backend-prod-05e311d52a38.herokuapp.com/api/chapters/member-chapters?page=1"
    }
  ],
  "resultsLimit": 20
}' |
apify call julia_k/sca2026 --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,julia_k/sca2026"
        }
    }
}
```

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/mLBwNm32l4uWz9Cvq/builds/ZEQtlrgokqHIrf4Sp/openapi.json
