# Bcboysbasketball Teams Scraper (`getdataforme/bcboysbasketball-teams-scraper`) Actor

This Apify actor scrapes comprehensive team data from BC Boys Basketball, including names, classifications, contacts, and performance records for specified seasons. Ideal for coaches, analysts, and organizations seeking accurate, structured JSON data for analysis....

- **URL**: https://apify.com/getdataforme/bcboysbasketball-teams-scraper.md
- **Developed by:** [GetDataForMe](https://apify.com/getdataforme) (community)
- **Categories:** Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 4.00 out of 5 stars

## Pricing

from $9.00 / 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Bcboysbasketball Teams Scraper

The Bcboysbasketball Teams Scraper is an Apify Actor designed to extract comprehensive team data from the BC Boys Basketball website. It efficiently scrapes details such as team names, classifications, contact information, and performance records for specified seasons, providing structured data for analysis and integration. This tool is ideal for coaches, analysts, and organizations needing accurate, up-to-date basketball team information from British Columbia.

### Features

- **Comprehensive Data Extraction**: Scrapes detailed team information including names, divisions, classifications, addresses, phone numbers, emails, and league/exhibition records.
- **Season-Specific Scraping**: Allows selection of specific seasons to focus data collection on relevant time periods.
- **Reliable and Fast**: Built on Apify's robust CheerioCrawler for efficient web scraping with minimal errors.
- **Structured Output**: Delivers clean JSON data, easily exportable to CSV, Excel, or databases.
- **Customizable Inputs**: Supports multiple start URLs and season parameters for flexible scraping.
- **Error-Resilient**: Includes built-in handling for common scraping issues like timeouts or missing data.
- **Apify Integration**: Seamlessly runs on Apify's cloud platform with monitoring and scheduling capabilities.

### Input Parameters

| Parameter | Type   | Required | Description                                                                 | Example |
|-----------|--------|----------|-----------------------------------------------------------------------------|---------|
| startUrls | array  | Yes      | An array of URLs to start scraping from. Typically points to league team pages. | \[{"url": "https://www.bcboysbasketball.com/leagues/teams.cfm?leagueID=30751\&clientID=2192"}] |
| seasonId  | string | No       | The ID of the season to scrape teams for. Defaults to the latest season.     | "70185" (for 2024-25) |

### Example Usage

To run the Actor, provide input parameters in JSON format. Here's an example:

```json
{
  "startUrls": [
    {
      "url": "https://www.bcboysbasketball.com/leagues/teams.cfm?leagueID=30751&clientID=2192"
    }
  ],
  "seasonId": "70185"
}
```

Example output:

```json
[
  {
    "season": "2024-25",
    "seasonId": "70185",
    "division": "Pool A",
    "teamId": "645920",
    "teamFullName": "EARL MARRIOTT MARINERS",
    "classification": "4A",
    "address": "15751 - 16th Avenue, Surrey, BC, Canada, V4A 1S1",
    "phone": "(604) 531-8354",
    "email": "earlmarriott@surreyschools.ca",
    "personnelUrl": "https://www.bcboysbasketball.com/leagues/personnel.cfm?leagueID=30751&teamID=645920&clientID=2192",
    "officialWebsite": "http://www.surreyschools.ca/earlmarriott",
    "leagueRecord": "0-0-0",
    "exhibitionRecord": "1-2-0"
  }
]
```

### Use Cases

- **Market Research and Analysis**: Gather data on team performances and classifications for sports analytics firms.
- **Competitive Intelligence**: Monitor rival teams' records and contact details for strategic planning.
- **Price Monitoring**: Track exhibition records and league standings for betting or sponsorship opportunities.
- **Content Aggregation**: Compile team directories for websites or apps focused on BC basketball.
- **Academic Research**: Collect historical data on seasons for studies in sports science or sociology.
- **Business Automation**: Automate data extraction for newsletters or reports on youth basketball leagues.

### Installation and Usage

1. Search for "Bcboysbasketball Teams Scraper" in the Apify Store.
2. Click "Try for free" or "Run".
3. Configure input parameters (e.g., start URLs and season ID).
4. Click "Start" to begin extraction.
5. Monitor progress in the log.
6. Export results in your preferred format (JSON, CSV, Excel).

### Output Format

The Actor outputs an array of JSON objects, each representing a scraped team. Key fields include:

- `season` and `seasonId`: The season name and ID.
- `division`: The team's division (e.g., "Pool A").
- `teamId`, `teamFullName`: Unique ID and full name of the team.
- `classification`: Team's classification level (e.g., "4A").
- `address`, `phone`, `email`: Contact details.
- `personnelUrl`, `officialWebsite`: Links to personnel and official sites.
- `leagueRecord`, `exhibitionRecord`: Performance stats in "wins-losses-ties" format.

Data is structured for easy parsing and integration into databases or analysis tools.

### Support

For custom/simplified outputs or bug reports, please contact:

- Email: support@getdataforme.com
- Subject line: "custom support"
- Contact form: https://getdataforme.com/contact/

We're here to help you get the most out of this Actor!

# Actor input Schema

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

URLs to start with.

## `seasonId` (type: `string`):

The season to scrape teams for.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.bcboysbasketball.com/leagues/teams.cfm?leagueID=30751&clientID=2192"
    }
  ],
  "seasonId": "72463"
}
```

# 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://www.bcboysbasketball.com/leagues/teams.cfm?leagueID=30751&clientID=2192"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("getdataforme/bcboysbasketball-teams-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": [{ "url": "https://www.bcboysbasketball.com/leagues/teams.cfm?leagueID=30751&clientID=2192" }] }

# Run the Actor and wait for it to finish
run = client.actor("getdataforme/bcboysbasketball-teams-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": [
    {
      "url": "https://www.bcboysbasketball.com/leagues/teams.cfm?leagueID=30751&clientID=2192"
    }
  ]
}' |
apify call getdataforme/bcboysbasketball-teams-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,getdataforme/bcboysbasketball-teams-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/Udt0C0hJmU3a0f6SN/builds/wqxVJPAHSYLopuchk/openapi.json
