# PlugShare Scraper: EV Charging Station Data (`getascraper/plugshare-scraper`) Actor

Extract EV charging station data from PlugShare by location: address, GPS, connectors, power, network, PlugScore, hours, cost, and reviews. Built-in rate-limit retry with backoff for reliable runs, plus scheduled monitoring for fleet, route-planning, and site-selection pipelines. No browser needed.

- **URL**: https://apify.com/getascraper/plugshare-scraper.md
- **Developed by:** [GetAScraper](https://apify.com/getascraper) (community)
- **Categories:** Travel, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.31 / 1,000 charging stations

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?

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

## TypeScript Crawlee & CheerioCrawler Actor Template

This template example was built with [Crawlee](https://crawlee.dev/) to scrape data from a website using [Cheerio](https://cheerio.js.org/) wrapped into [CheerioCrawler](https://crawlee.dev/api/cheerio-crawler/class/CheerioCrawler).

### 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
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

This code is a TypeScript script that uses Cheerio to scrape data from a website. It then stores the website titles in a dataset.

- The crawler starts with URLs provided from the input `startUrls` field defined by the input schema. Number of scraped pages is limited by `maxPagesPerCrawl` field from the input schema.
- The crawler uses `requestHandler` for each URL to extract the data from the page with the Cheerio library and to save the title and URL of each page to the dataset. It also logs out each result that is being saved.

### 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

## `searchAreas` (type: `array`):

One or more center points to search around. Each area is a { latitude, longitude, radiusKm, label } object. Add multiple small areas to cover a large region instead of one giant radius (PlugShare's API returns the nearest N stations per request, not a full-region dump).

## `maxItemsPerArea` (type: `integer`):

Maximum number of stations to return per search area (PlugShare's API caps results per request; use more, smaller areas to cover dense regions fully).

## `connectorTypes` (type: `array`):

Only keep stations offering at least one of these connector types (matched against PlugShare's reported connector list, case-insensitive substring match). Leave empty to keep all.

## `fastChargersOnly` (type: `boolean`):

Only keep locations PlugShare flags as DC fast chargers.

## `networkIncludes` (type: `array`):

Only keep stations whose network name contains one of these strings (e.g. "Tesla", "EVgo", "ChargePoint"). Case-insensitive. Leave empty to keep all networks.

## `networkExcludes` (type: `array`):

Drop stations whose network name contains one of these strings. Case-insensitive.

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

Fetch each station's full detail record (hours, cost, phone, description, outlet-level connector/power breakdown). Adds one extra request per station. Turn off for a fast overview pass using only the nearby-search fields.

## `includeReviews` (type: `boolean`):

Include user reviews (rating, comment, connector used, reviewer display name). Off by default: review author display names are user-generated content and treated as personal data. Requires "Fetch full station details" to be on.

## `sinceDate` (type: `string`):

ISO date (e.g. 2026-08-01). Skip stations whose PlugShare updated\_at is older than this date. Useful for scheduled monitoring runs that only care about recent changes. Requires "Fetch full station details" to be on (updated\_at is only present on the detail record).

## `onlyNewOrChanged` (type: `boolean`):

Persist a per-station "last seen" stamp in the Actor's key-value store across runs, and only push a station to the dataset if it's new or its updated\_at (or scrape timestamp, if details are off) changed since the last run. Best used with a scheduled/recurring run on the same Actor + same default key-value store.

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

Pause between PlugShare API requests. Keep a reasonable delay to avoid tripping the API gateway's rate limiting.

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

PlugShare's web shell and API showed no bot-management WAF or IP-quality gating during testing, so datacenter proxy is the default. Switch to residential only if you start seeing API rate-limit or block errors at higher volume.

## Actor input object example

```json
{
  "searchAreas": [
    {
      "latitude": 37.7749,
      "longitude": -122.4194,
      "radiusKm": 25,
      "label": "San Francisco, CA"
    }
  ],
  "maxItemsPerArea": 100,
  "connectorTypes": [],
  "fastChargersOnly": false,
  "networkIncludes": [],
  "networkExcludes": [],
  "includeDetails": true,
  "includeReviews": false,
  "onlyNewOrChanged": false,
  "requestDelayMs": 300,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `stations` (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 = {
    "searchAreas": [
        {
            "latitude": 37.7749,
            "longitude": -122.4194,
            "radiusKm": 25,
            "label": "San Francisco, CA"
        }
    ],
    "connectorTypes": [],
    "networkIncludes": [],
    "networkExcludes": [],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("getascraper/plugshare-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 = {
    "searchAreas": [{
            "latitude": 37.7749,
            "longitude": -122.4194,
            "radiusKm": 25,
            "label": "San Francisco, CA",
        }],
    "connectorTypes": [],
    "networkIncludes": [],
    "networkExcludes": [],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("getascraper/plugshare-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 '{
  "searchAreas": [
    {
      "latitude": 37.7749,
      "longitude": -122.4194,
      "radiusKm": 25,
      "label": "San Francisco, CA"
    }
  ],
  "connectorTypes": [],
  "networkIncludes": [],
  "networkExcludes": [],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call getascraper/plugshare-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,getascraper/plugshare-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/iegpJoOXgbMKB6myS/builds/cjGoughOhfZYfKBz0/openapi.json
