# Snapcraft Store Scraper (`kawsar/snapcraft-store-scraper`) Actor

Search Linux snap packages on Snapcraft by keyword, name, or category. Extract package summaries, publishers, and licenses, then export clean structured datasets in JSON, CSV, or Excel formats

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

## Pricing

from $0.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

## Snapcraft Store Scraper: Linux Snap Packages Search

Easily discover and extract Linux snap package details from the Snap Store. Search by keyword, look up specific apps by name, or extract entire categories, then export clean structured datasets in JSON, CSV, or Excel formats.

This tool credits the Snap Store and operates independently without speaking for Canonical.

### Use Cases

- **Package Search**: Quickly locate software across the Snap Store using targeted search terms like `python`, `vlc`, or development utilities.
- **Detailed App Audits**: Pull structured summaries, publishers, and licensing information for specific applications.
- **Category Browsing**: Gather complete listings for software sections such as games, productivity, or developer tools.
- **Fleet & Repository Catalogs**: Maintain standardized application inventories across Linux deployments.
- **Automated Monitoring**: Regularly check application updates while automatically deduplicating identical package records.

### Data Extracted

The scraper provides structured outputs depending on your search mode:

- **Search Results**: Retrieves matching packages with titles, summaries, publisher details, licenses, media assets, and categories.
- **App Details**: Extracts expanded package profiles including license types, publisher verification statuses, and project summaries.
- **Category Listings**: Captures software applications belonging to specific store categories.

Rows are deduplicated by package ID within each run. If a request encounters an issue (such as a missing package name), the actor saves an error record with context details instead of failing the run.

### Input Options

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `searchQueries` | array | `["python"]` | Keywords to search for, one per line. |
| `snapNames` | array | `[]` | Specific snap package names for direct lookup. |
| `category` | string | `""` | App store category (e.g., `games`, `development`). |
| `maxItems` | integer | `100` | Maximum number of rows to save (1–1000). |
| `requestDelaySecs` | number | `0.5` | Delay between request cycles in seconds. |
| `timeoutSecs` | integer | `300` | Overall run execution timeout in seconds. |
| `requestTimeoutSecs` | integer | `30` | Timeout per network request. |
| `proxyConfiguration` | object | `{ "useApifyProxy": false }` | Optional proxy setup if needed. |

#### Example Input

```json
{
  "searchQueries": ["python"],
  "snapNames": ["vlc"],
  "category": "games",
  "maxItems": 100,
  "requestDelaySecs": 0.5,
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": { "useApifyProxy": false }
}

```

### Output Structure

Successful extractions include the following structured fields:

| Field | Type | Description |
| --- | --- | --- |
| `name` | string | Package name. |
| `snap` | object | Details including title, summary, publisher info, media links, license, and categories. |
| `snap-id` | string | Unique package identifier used to filter duplicates. |
| `scraped_at` | string | UTC timestamp of the extraction. |
| `mode` | string | Execution mode (`search`, `info`, or `category`). |

#### Example Output

```json
{
  "name": "vlc",
  "snap": {
    "title": "VLC",
    "summary": "The ultimate media player",
    "license": "GPL-2.0+",
    "publisher": {
      "display-name": "VideoLAN",
      "username": "videolan",
      "validation": "verified"
    }
  },
  "snap-id": "RT9mcUhVsRYrDLG8qnvGiy26NKvv6Qkd",
  "scraped_at": "2026-10-12T00:00:00+00:00",
  "mode": "search"
}

```

### How It Works

1. **Initialization**: Reads your input parameters and sets up the request sequence while applying rate-friendly headers.
2. **Execution**: Processes search queries, app lookup requests, and category selections in order.
3. **Data Handling**: Cleans raw responses, removes duplicate package IDs, and batches output records smoothly.
4. **Resilience**: Retries transient errors automatically with exponential backoff and logs invalid inputs clearly without stopping the entire task.

### Limits and Best Practices

To ensure reliable runs:

- `maxItems` defaults to 100 and can be adjusted up to 1000 per run.
- A built-in delay (`requestDelaySecs`, default 0.5s) keeps requests polite and steady.
- Scheduled runs allow you to keep package catalogs updated over time.

### FAQ

**Can I export data as CSV or Excel?**
Yes. You can download the dataset from the Apify platform in JSON, CSV, Excel, XML, or HTML table formats.

**What happens if a requested snap name does not exist?**
The scraper logs an informative error row containing the attempted input and error details without crashing the rest of your run.

**How fresh is the scraped data?**
Data is retrieved in real-time during the run. The `scraped_at` timestamp reflects the precise moment each item was collected.

### Trademark Notice

Snapcraft and related names, logos, and marks belong to their respective owners. Reference to them is solely for data identification purposes and does not imply endorsement, affiliation, or partnership.

### Disclaimer

This Actor is an independent web scraping tool created by kawsar and is not affiliated with or officially associated with Snapcraft or its parent entities. Users are responsible for ensuring their usage complies with relevant terms, rate guidelines, and licensing conditions.

### Is Web Scraping Legal?

This Actor collects publicly available information without bypassing access barriers. While collecting public data is generally legal, consider the following best practices:

- **Personal Data**: When handling personal details, comply with applicable privacy regulations such as GDPR or CCPA.
- **Copyright**: Respect copyrighted material such as extended text descriptions or graphics.
- **Terms of Service**: Always observe source terms, reasonable request frequencies, and usage limits.
- **Legal Advice**: This overview provides general information and does not constitute legal counsel.

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

# Actor input Schema

## `searchQueries` (type: `array`):

Keywords for snap search. Each keyword calls GET https://api.snapcraft.io/v2/snaps/find?q={query}\&fields=title,summary,publisher,media,license,categories. One query per line. Default python.

## `snapNames` (type: `array`):

Exact snap names for package info. Each name calls GET https://api.snapcraft.io/v2/snaps/info/{name}?fields=title,summary,publisher,license. Example: vlc. Leave empty to skip info mode.

## `category` (type: `string`):

Optional Snap Store category or section. When set, calls GET https://api.snapcraft.io/v2/snaps/find?category={category}\&fields=title,publisher. Examples: games, development. Leave blank to skip category mode.

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

Maximum snap rows to save this run. Error rows do not count. Minimum 1, hard cap 1000.

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

Seconds to wait between Snap Store requests. Minimum 0.5. Requests run one at a time.

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

Stop the run after this many seconds and keep rows already collected. Default 300. Maximum 3600.

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

How long to wait for one Snap Store response before treating that call as failed. Default 30 seconds.

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

Optional proxy for Snap Store requests. Leave useApifyProxy off. The public Snap Store API does not need a proxy.

## Actor input object example

```json
{
  "searchQueries": [
    "python"
  ],
  "snapNames": [],
  "category": "games",
  "maxItems": 100,
  "requestDelaySecs": 0.5,
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Snap name, snap id, mode, source URL, and scrape time.

## `errors` (type: `string`):

Failed requests with the input URL, HTTP status, and message.

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

Every row from the run, without a table view applied.

# 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 = {
    "searchQueries": [
        "python"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("kawsar/snapcraft-store-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 = {
    "searchQueries": ["python"],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("kawsar/snapcraft-store-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 '{
  "searchQueries": [
    "python"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call kawsar/snapcraft-store-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kawsar/snapcraft-store-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/N9B4yPh0FcRFUs8Gw/builds/3CSe1TPex1BUjXbc9/openapi.json
