# Gab Public Posts & Profiles (`bovi/gab-scraper`) Actor

Collect public Gab profile records and posts from usernames, profile URLs, or direct post URLs. Optionally include public ancestors, replies, and quoted posts for a direct post, subject to the result limit. No login required.

- **URL**: https://apify.com/bovi/gab-scraper.md
- **Developed by:** [Vitalii Bondarev](https://apify.com/bovi) (community)
- **Categories:** Social media, Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 gab public posts & profiles

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

## Gab Scraper for Public Posts and Profiles

Scrape public Gab profile records and posts from gab.com usernames, profile URLs, or direct post URLs, with no Gab login.

- Download a direct post by URL and, with thread context on, the public ancestors, replies, and quotes returned for that post.
- Every row carries `source_type` and `source_url`.
- Collect a public profile record with identity, public counts, verification label, and avatar, plus the recent posts shown on that profile page.
- Set `maxResults` from 1 to 10000 to cap the profile and post records written in the run.

### What you get

A field is omitted when the source does not provide the value.

| Field | Type | Record | Description |
| --- | --- | --- | --- |
| record_type | string | Profile or post | `profile` or `post`. |
| id | string | Profile or post | Profile: account id from the avatar URL, otherwise the username. Post: Gab status id. |
| source_type | string | Profile or post | `profile`, `direct_post`, `thread_ancestor`, `thread_reply`, or `thread_quote`. |
| source_url | string | Profile or post | Profile URL or direct post URL that produced the row. Thread rows keep that same target URL. |
| account_id | string | Profile | Account id parsed from the public avatar URL. |
| username | string | Profile | Gab username. |
| display_name | string | Profile | Public display name. |
| profile_url | string | Profile | Canonical `https://gab.com/{username}` profile URL. |
| created_at | ISO 8601 string | Profile | Profile creation time when the page JSON-LD includes `dateCreated`. |
| followers_count | integer | Profile | Public follower count from the profile page. |
| following_count | integer | Profile | Public following count from the profile stats text. |
| statuses_count | integer | Profile | Public post count from the profile page. |
| is_verified | boolean | Profile | Present and true only when the page text labels the account as a verified account. Not set to false when that label is absent. |
| avatar_url | string | Profile | Public avatar image URL. |
| author_username | string | Post | Username of the post author. |
| author_display_name | string | Post | Public display name of the post author when available. |
| content | string | Post | Post text from the public page or status data. |
| timestamp | ISO 8601 string | Post | Publication time. |
| likes | integer | Post | Public favorite count. |
| reposts | integer | Post | Public reblog count. |
| replies | integer | Post | Public reply count. |
| media_urls | array of strings | Post | Public media attachment URLs from the status data. Omitted when there are none. |
| post_url | string | Post | Canonical direct post URL. |

### Sample output

```json
{
  "record_type": "post",
  "id": "105766535527525161",
  "source_type": "profile",
  "source_url": "https://gab.com/support",
  "author_username": "support",
  "author_display_name": "Gab Support",
  "content": "Just a friendly reminder! Please ensure you have your password saved and secured for future sign in. Thank you!",
  "timestamp": "2021-02-21T01:00:55.486Z",
  "post_url": "https://gab.com/support/posts/105766535527525161",
  "likes": 514,
  "reposts": 130,
  "replies": 412
}
```

### Pricing

Billing is pay per event.

You pay only for the events listed below. This Actor does not use the Pay per event + usage option, so the platform usage of your runs (compute, proxy traffic and storage) is not billed to you separately.

| Event | When it is charged | Free-plan price |
| --- | --- | --- |
| Actor Start (`apify-actor-start`) | When the Actor starts. The number of events depends on memory: one event per GB, with a minimum of one event. | $0.00005 per event |
| Gab Public Posts & Profiles (`apify-default-dataset-item`) | One dataset result. | $0.001 per result |

Gab Public Posts & Profiles: 1,000 × $0.001 = $1 on Free; 10,000 × $0.001 = $10 on Free. Actor Start: 1,000 × $0.00005 = $0.05 on Free; 10,000 × $0.00005 = $0.5 on Free.

The Apify Free plan includes $5 of monthly platform usage credit. The $5 credit covers 4999 dataset results after one Actor Start event (4999 × $0.001 on Free = $4.999, plus $0.00005 = $4.99905). Extra Actor Start events are charged when memory is above 1 GB, so that memory spends more of the credit before results. The 4999 figure is credit arithmetic, not the Actor's `maxResults` cap.

### How to use

1. Open the Actor in the Apify Console with your own Apify account.
2. Enter Gab usernames, profile URLs, or direct post URLs in `targets`.
3. Set `maxResults` from 1 to 10000.
4. Turn on `includeThreadContext` for public ancestors, replies, and quotes on a direct post.
5. Leave `proxyConfiguration` on its schema default, or set `useApifyProxy` to false to run without a proxy.
6. Start the run, then open the dataset.
7. Repeat the run through Apify Schedules, using a daily schedule as a starting point.

```json
{
  "targets": ["https://gab.com/support"],
  "maxResults": 50,
  "includeThreadContext": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

Export the dataset as JSON or CSV, or read it through the Apify dataset API.

### Input parameters

| Parameter | What it does | Default |
| --- | --- | --- |
| targets | Required. Usernames, @username values, `https://gab.com/{username}` profile URLs, or https://gab.com/{username}/posts/{id} post URLs. A username may use letters, digits, underscores, dots, and hyphens. `www.gab.com` is accepted and stored as https://gab.com/.... A single string is treated as one target. | `["https://gab.com/support"]` |
| maxResults | Maximum profile and post records written in the run. The schema accepts 1 through 10000. A decimal is truncated (3.7 becomes 3). A value that cannot be converted to an integer, such as text or `null`, is replaced by 50. A value of 0 or below writes nothing. | `50` |
| includeThreadContext | For a direct post, also save public ancestors, replies, and quotes until `maxResults`. Profile targets do not use this flag. | `false` |
| proxyConfiguration | Apify proxy object for the run. If the input has no proxy object, or `useApifyProxy` is not true, the actor runs without a proxy. | `{"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]}` |
| disableUsageStats | Set to `true` to turn off the run summary described in Usage statistics. | `false` |

Each request gets a new proxy session.

### Limits and edge cases

Each gab.com request uses a 40 second timeout. On failure the actor logs a warning and continues with the fallback or the next target. It does not retry the failed request.

Rows are written one at a time as they are produced. A run that is aborted, times out or fails keeps every row already written and stops writing new ones. On a profile target the post rows come first and the profile row last, so an interrupted profile run can hold posts without the profile row.

| Condition | What you see | What to do |
| --- | --- | --- |
| `maxResults` is 0 or negative | The run returns without writing records. | Set an integer from 1 to 10000. |
| `maxResults` is a decimal or numeric string | It is converted by truncation (3.7 becomes 3, `"10"` becomes 10). A value below 1 after conversion, such as 0.5, writes nothing. | Pass a whole number from 1 to 10000. |
| `maxResults` cannot be converted to an integer, such as text or `null` | The actor uses 50. | Pass a whole number from 1 to 10000. |
| `targets` is missing or `[]` | The log says 0 public Gab records were collected. | Add a username or URL. |
| `targets` is not a list or a string | A warning says targets must be a list, and nothing is written. | Send a list of strings. |
| The target is empty, uses another host, embeds a URL username or password, or is not a profile or direct post | Skipped with a warning. Later targets still run. | Use a username or a public `gab.com` profile or post URL. |
| The profile request fails, or the page has no parsed profile | A warning names the fetch failure or says no public profile records were found. | Check that the profile page is public, then run again. |
| A post listed on a profile cannot be loaded from status data | The profile-page post is still saved, without likes, reposts, replies, or `media_urls` that come only from status data. | Submit that post as a direct URL. |
| A direct post status request fails | The public post page is requested and saved when that parse succeeds. | If the log says no public post data was found, check that the post is public. |
| `includeThreadContext` is true but the context request fails or is not an object | The direct post is already saved. Ancestors, replies, and quotes are not added. | Run that direct post URL again. |
| `includeThreadContext` is false, or the target is a profile | No ancestor, reply, or quote rows are requested. | Turn the flag on and pass a direct post URL. |
| The same `record_type` and `id` was already saved | The later copy is not written and nothing is logged. | Remove overlapping targets to avoid spending results on repeats. |
| Written records reach `maxResults` | Further posts, the profile row, later targets, and thread items are not written. Page posts are written before the profile row, so a low cap can omit the profile. | Raise `maxResults`. |
| The target is a profile | Only posts under a heading that starts with "recent posts from", plus one profile record. Not the full history. | Pass a direct post URL for another known status. |

### FAQ

#### How much does it cost to scrape Gab?

See Pricing.

#### Why is the dataset empty?

See Limits and edge cases. The log names the reason. Earlier records stay.

#### Why does a profile not include every post?

See Limits and edge cases.

#### Does thread context work for a profile URL?

No. Only a saved direct post gets ancestor, reply, and quote rows until `maxResults`.

#### Is collecting this public Gab data legal?

The Actor reads public profile pages and public status data on gab.com. It does not sign in, and it does not collect information that requires an account. Whether a particular use is allowed under Gab's terms or applicable law depends on your use case. This page does not provide a legal guarantee.

### Usage statistics

This Actor creates a small, content-free summary at the end of each run, used only to monitor reliability and improve this Actor. No input values, credentials or scraped data are sent.

A copy of the exact record for your run is saved as `USAGE_STATS` in your own Apify key-value store.

To opt out, set `disableUsageStats` to `true` in the input. Nothing is sent then.

[Full list of collected fields](https://api.apify.com/v2/key-value-stores/v9rgHjMKLDGtHf8tD/records/index.html)

# Actor input Schema

## `targets` (type: `array`):

Gab usernames, profile URLs, or direct public post URLs. Examples: support, @support, https://gab.com/support, or https://gab.com/TerrenceKWilliams/posts/105647844879148303.

## `maxResults` (type: `integer`):

Maximum total number of profile and post records returned.

## `includeThreadContext` (type: `boolean`):

For direct post URLs, also collect public ancestors, replies, and quoted posts that Gab exposes.

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

Optional Apify proxy configuration. Disabled by default; the actor works without a proxy.

## Actor input object example

```json
{
  "targets": [
    "https://gab.com/support"
  ],
  "maxResults": 50,
  "includeThreadContext": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Public profile and post records collected from gab.com.

# 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 = {
    "targets": [
        "https://gab.com/support"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("bovi/gab-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 = {
    "targets": ["https://gab.com/support"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("bovi/gab-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 '{
  "targets": [
    "https://gab.com/support"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call bovi/gab-scraper --silent --output-dataset

```

## MCP server setup

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