# X (Twitter) Space Scraper | $0.00015/Space | Pay-Per-Result (`xquik/x-space-scraper`) Actor

Find X (Twitter) Spaces by keyword, host or hashtag. Read Spaces & broadcasts by URL or ID, from $0.00015 per delivered row on every Apify plan. Get titles, states, times, listeners, hosts & speakers. No X account. World's fastest & cheapest X (Twitter) scraper service. Not affiliated with X Corp.

- **URL**: https://apify.com/xquik/x-space-scraper.md
- **Developed by:** [Xquik](https://apify.com/xquik) (community)
- **Categories:** Social media, Lead generation, Automation
- **Features:** Limited permissions
- **Stats:** 8 total users, 4 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.00015 / spaces

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

**English** ·
[Español](https://github.com/Xquik-dev/x-twitter-scraper/blob/master/apify/x-space-scraper/README.es.md)
·
[Türkçe](https://github.com/Xquik-dev/x-twitter-scraper/blob/master/apify/x-space-scraper/README.tr.md)
·
[简体中文](https://github.com/Xquik-dev/x-twitter-scraper/blob/master/apify/x-space-scraper/README.zh-CN.md)
·
[日本語](https://github.com/Xquik-dev/x-twitter-scraper/blob/master/apify/x-space-scraper/README.ja.md)
·
[한국어](https://github.com/Xquik-dev/x-twitter-scraper/blob/master/apify/x-space-scraper/README.ko.md)
·
[Deutsch](https://github.com/Xquik-dev/x-twitter-scraper/blob/master/apify/x-space-scraper/README.de.md)
·
[Français](https://github.com/Xquik-dev/x-twitter-scraper/blob/master/apify/x-space-scraper/README.fr.md)
·
[Italiano](https://github.com/Xquik-dev/x-twitter-scraper/blob/master/apify/x-space-scraper/README.it.md)

[![Framer connects Xquik MCP to coding agents](https://img.youtube.com/vi/4UOSpoOoC3Y/maxresdefault.jpg)](https://youtu.be/4UOSpoOoC3Y?t=367)\
[Watch how Framer uses Xquik scrapers](https://youtu.be/4UOSpoOoC3Y?t=367)
with Claude Code, Codex, Cursor & more, from 6:07.

Xquik is the world's fastest & cheapest X (Twitter) scraper service with the
most complete X data. Xquik's X (Twitter) Space Scraper finds Spaces by keyword,
host or hashtag & reads Spaces & broadcasts by URL or ID. Most other Apify
Actors charge before filtering or deduplicating. Xquik charges only for
delivered, unique results.

Find Twitter Spaces about any topic, live, scheduled or ended. You need no X
account or X API key. You pay **$0.00015 per delivered Space or broadcast**, &
Apify bills platform usage separately.

> Xquik is an independent third-party service. Not affiliated with X Corp.
> "Twitter" and "X" are trademarks of X Corp.

### Why use X (Twitter) Space Scraper?

- **Spaces on air now.** Set `queryType` to `Live` for live Spaces or `Upcoming`
  for scheduled ones.
- **Replays at no extra cost.** Turn on `includeReplay` to get the recording of
  each ended Space.
- **Live video broadcasts too.** Read X broadcasts by URL or ID in the same run
  as Spaces.
- **Search with X operators.** Find Spaces by topic, host, hashtag, language or
  popularity.
- **Ready-to-use exports.** Keep, rename, flatten or join fields, then export
  JSON, CSV, Excel, XML or RSS.

#### Complete results

- Each answer holds the fullest data X has for it.

#### Accurate rows

- Rows hold public data only.

#### Fresh data

- Reads keep working when X ships changes.

#### Speed

- One slow page doesn't hold up your run.
- Reads finish the moment their rows arrive.
- Stalled Actor calls recover on their own.

#### Fair billing

- Bad input costs nothing & tells you what to fix.
- Actors charge only for delivered, unique, matching rows.
- A restarted run never charges twice.
- Runs stay within your spend cap & still write their diagnostics.
- Small runs end with a tip that cuts cost.

#### Reliability

- A one-off error doesn't fail your run.
- A deadline returns the rows already found, with diagnostics.
- Actors ride out short Xquik outages.
- Actor runs survive restarts without repeats.
- One bad row doesn't sink a batch.
- Stopped runs keep their rows & their report.
- A run that can't start still explains itself.
- Support can see exactly what a request or run returned.

#### Built for agents

- Actors accept input written for other Actors.
- Every run says why it ended & whether to retry.

#### Quality checks

- Every field X shows is served, left out on purpose or proven absent.
- Xquik tests every read live against X.

### What data can X (Twitter) Space Scraper extract?

- Title, state & the scheduled, start & end times of each Space.
- Live listener count, replay plays & the accounts in the Space now.
- The host's public profile, co-hosts, speakers & listeners X lists.
- Replay, clipping & lock settings, plus the post that announces the Space, with
  its text, counts & author.
- Posts the hosts & speakers shared in the Space, with who shared each & when.
- The recording of a Space that is over, as an HLS playlist URL, with
  `includeReplay`.
- Broadcasts by URL or ID, with title, state, times, watch counts & host.

### How to find X Spaces

New to Apify?
[Create a free account](https://console.apify.com/sign-up?fpr=xquik) first. The
free plan needs no credit card & gives $5 to spend each month. At $0.00015 per
Space or broadcast, $5 pays for up to 33,000 of them before platform usage. Then
come back here & press Try for free.

1. Open Xquik's X (Twitter) Space Scraper in Apify Console.
2. Enter words, hashtags or X search operators in `searchTerms`.
3. Or paste Space URLs in `startUrls`, or Space IDs in `spaceIds`.
4. For broadcasts, paste their URLs in `startUrls` or their IDs in
   `broadcastIds`.
5. Set `maxItems` to cap delivered rows, then click Start.
6. Download the dataset as JSON, CSV or Excel, or use the Apify API.

`startUrls` takes each URL as a plain string or as a `{ "url": "..." }` object.

```json
{
  "startUrls": [
    "https://x.com/i/spaces/1OGwblLjnQMKB",
    { "url": "https://x.com/i/broadcasts/1nGeLMWbkpaKX" }
  ]
}
```

### Input

```json
{
  "searchTerms": ["bitcoin", "from:solana"],
  "queryType": "Latest",
  "maxItems": 1000
}
```

A search term finds the Spaces that match it. It takes the operators X search
takes.

| Goal                      | Search term        |
| ------------------------- | ------------------ |
| Spaces about a topic      | `bitcoin`          |
| Spaces an account shares  | `from:solana`      |
| Spaces under a hashtag    | `#AI`              |
| Spaces in 1 language      | `startups lang:es` |
| Popular Spaces on a topic | `nba min_faves:50` |

`queryType` picks the order. `Latest` puts the newest matches first & `Top` the
most engaging.

`Live` lists Spaces on air now & `Upcoming` lists scheduled ones. Both match
words in Space titles & take no operators.

```json
{ "searchTerms": ["bitcoin"], "queryType": "Live" }
```

Read Spaces you already know by URL or ID.

```json
{
  "startUrls": [{ "url": "https://x.com/i/spaces/1OGwblLjnQMKB" }],
  "spaceIds": ["1OGwblLjnQMKB"]
}
```

Turn on `includeReplay` to get the recording of each Space that is over.

```json
{ "spaceIds": ["1OGwblLjnQMKB"], "includeReplay": true }
```

The row then carries `replay` with `url`, an HLS playlist, plus `streamType` &
`status`. A Space that is live, scheduled or without a recording has no
`replay`. The replay costs nothing extra.

Read broadcasts, the live video X hosts at `x.com/i/broadcasts`, by URL or ID.

```json
{
  "startUrls": [{ "url": "https://x.com/i/broadcasts/1nGeLMWbkpaKX" }],
  "broadcastIds": ["1nGeLMWbkpaKX"]
}
```

Small runs that go well skip `run-report` & save Apify usage. Turn on
`alwaysSaveRunRecords` to write it on every run.

### Output

Each row holds 1 Space or broadcast & its search term, URL or ID in
`sourceTarget`. `resultType` is `space` or `broadcast`.

Examples use sample values. Results reflect live data. A Space row looks like
this.

```json
{
  "id": "1SampleSpace1",
  "title": "Sample Space about bitcoin",
  "state": "Ended",
  "startedAt": "2026-03-11T17:00:26.227Z",
  "endedAt": "2026-03-11T17:49:29.190Z",
  "totalLiveListeners": 841,
  "totalReplayWatched": 609,
  "isAvailableForReplay": true,
  "creator": { "username": "sample_host", "name": "Sample Host" },
  "admins": [{ "username": "sample_host", "name": "Sample Host" }],
  "speakers": [{ "username": "sample_speaker", "name": "Sample Speaker" }],
  "listeners": [],
  "sharings": [
    {
      "id": "2106511178339881415",
      "sharedAt": "2026-03-11T17:20:16.658Z",
      "sharedBy": { "username": "sample_speaker", "name": "Sample Speaker" },
      "tweet": { "id": "2105620368836706789", "text": "Sample shared post" }
    }
  ],
  "resultType": "space",
  "sourceTarget": "bitcoin"
}
```

`state` holds 1 of 5 values, as X names them.

| `state`      | The Space                                |
| ------------ | ---------------------------------------- |
| `NotStarted` | Is scheduled & carries `scheduledStart`. |
| `Running`    | Is live now.                             |
| `Ended`      | Is over. Its host ended it.              |
| `TimedOut`   | Is over. X closed it, not its host.      |
| `Canceled`   | Was scheduled & never started.           |

`Ended` & `TimedOut` Spaces carry `endedAt`, & both can keep a recording. X
shows a Space for subscribers or a Community only to its audience, so those
Spaces return no row.

A broadcast row has `resultType: "broadcast"` & looks like this.

```json
{
  "id": "1SampleBcast1",
  "title": "Sample launch broadcast",
  "state": "Ended",
  "startedAt": "2026-09-17T00:54:56.506Z",
  "endedAt": "2026-09-17T01:17:35.036Z",
  "totalWatched": 161758,
  "totalWatching": 21639,
  "width": 3840,
  "height": 2160,
  "creator": { "username": "sample_host", "name": "Sample Host" },
  "resultType": "broadcast",
  "sourceTarget": "1SampleBcast1"
}
```

### Output columns

8 inputs shape each row after the run reads it. They run no code & change no
price.

| Field               | What it does                                                |
| ------------------- | ----------------------------------------------------------- |
| `fields`            | Keep only these fields, in the order & spelling you write   |
| `omitFields`        | Drop these fields & keep the rest                           |
| `renameFields`      | Move a field to a column with a new name                    |
| `flatten`           | Turn each nested object into top-level columns              |
| `fillMissingFields` | Fill a kept field a row lacks with `null`. On by default    |
| `joinFields`        | Turn each of these lists into 1 text value                  |
| `joinSeparator`     | Text between joined items. The default is a comma & a space |
| `constantFields`    | Add a column with the same text on every row                |

- Use a dot for a field inside an object. Case & underscores do not matter.
- Every row keeps its `id`.
- With `fields`, a field a row lacks arrives as `null`. Every row then has the
  same columns.
- A wrong field name stops the run before it reads & charges nothing.
- If names cannot be checked, the run reads on & lists unseen names last.
- The run ignores a map function or jq filter written for another Actor.

### How much does it cost to scrape X Spaces?

Every Apify plan costs $0.00015 per delivered Space or broadcast. Apify bills
your platform usage separately.

For more volume, [pick an Apify plan](https://apify.com/pricing?fpr=xquik) with
more prepaid usage.

- One charge per delivered data row. Diagnostics are free in `diagnostics`.
- No start, search or page fee.
- Deduplication runs before billing.

### Limits & recovery

Interrupted extraction writes a free `partial` diagnostic. Available results
stay intact. Read `availableResults`, `failedTargets`, `retryable` &
`nextAction` before you retry. A successful Actor exit confirms delivery, not
complete extraction.

The run status names every cause of an early stop. `stopCauses` lists each cause
with its own `message`, `retryable` & `nextAction`. The causes are
`target_not_found`, `target_failed`, `pagination_safety_limit` &
`deadline_reached`. A missing target joins the list only when another cause
stopped the run. The run is `retryable` when any cause is.

### Related Xquik Actors

Every Xquik Actor shares the same extraction engine, filter-first billing &
diagnostics. Pick the one that matches the data you need.

- [X (Twitter) Tweet Scraper](https://apify.com/xquik/x-tweet-scraper) scrapes
  tweets from searches, profile timelines, Lists & tweet IDs with 50+ filters &
  flat exports. Use it when you need tweet data without analysis. From $0.00015
  per row.
- [X (Twitter) Profile Scraper](https://apify.com/xquik/x-profile-scraper)
  scrapes profiles plus their posts, replies, media & followers from handles,
  IDs or URLs. Use it when you start from accounts rather than searches. From
  $0.00015 per row.
- [X (Twitter) Reply Scraper](https://apify.com/xquik/x-reply-scraper) scrapes
  replies, comments & whole conversations under posts with 25+ filters. Use it
  when you need the discussion beneath tweets. From $0.00015 per row.
- [X (Twitter) Engagement Scraper](https://apify.com/xquik/x-engagement-scraper)
  scrapes replies, quotes, retweeters & threads for post URLs or IDs in bulk.
  Use it when you measure who engaged with posts. From $0.00015 per row.
- [X (Twitter) Quote Tweets Scraper](https://apify.com/xquik/x-quote-tweets-scraper)
  scrapes the quote tweets of posts with text, media, counts, authors & 11
  filters. Use it when you study who quoted posts & what they said. From
  $0.00015 per tweet.
- [X (Twitter) Follower Scraper](https://apify.com/xquik/x-follower-scraper)
  scrapes followers, following, List members, subscribers & Community members as
  profile rows. Use it when you need audience or member lists. From $0.00015 per
  profile.
- [X (Twitter) User Search Scraper](https://apify.com/xquik/x-user-search-scraper)
  searches users by handle, bio & location with follower, verification, age &
  location filters. Use it when you build account lists from search. From
  $0.00015 per profile.
- [X (Twitter) Account Location Scraper](https://apify.com/xquik/x-account-location-scraper)
  checks where accounts are based with X's "Account based in" label, "connected
  via" & username changes. Use it when you vet where accounts are based. From
  $0.00015 per account.
- [X (Twitter) Email Scraper](https://apify.com/xquik/x-email-scraper) gets the
  emails, phones & links accounts publish on their profiles, from handles,
  followers or user searches. Use it when you need the emails profiles publish.
  From $0.00015 per profile.
- [X (Twitter) List Scraper](https://apify.com/xquik/x-list-scraper) scrapes
  List posts, members & followers from List URLs or IDs. Use it when a curated
  List defines your sources. From $0.00015 per row.
- [X (Twitter) Community Scraper](https://apify.com/xquik/x-community-scraper)
  scrapes Community info, posts, searches, members & moderators. Use it when
  your sources are X Communities. From $0.00015 per row.
- [X (Twitter) Trends Scraper](https://apify.com/xquik/x-trends-scraper) scrapes
  real-time trends by location with rank, volume, query & WOEID. Use it when you
  track what is trending where. From $0.00015 per trend.
- [X (Twitter) Jobs Scraper](https://apify.com/xquik/x-job-scraper) scrapes X
  job listings by keyword, place, workplace, seniority & company, with salaries
  & apply links. Use it when you collect job openings posted on X. From $0.00015
  per job.
- [X (Twitter) Article Scraper](https://apify.com/xquik/x-article-scraper)
  scrapes long-form X Articles as Markdown & text with covers, authors, dates &
  metrics. Use it when you need article bodies, not tweets. From $0.00015 per
  article.
- [X (Twitter) Media Downloader](https://apify.com/xquik/x-media-downloader)
  extracts or stores photos, videos & GIFs from posts or profiles with MP4 &
  metadata options. Use it when you need the media files themselves. From
  $0.00015 per media row.
- [X (Twitter) Brand Monitoring with AI Analysis](https://apify.com/xquik/x-twitter-brand-monitoring)
  tracks brand mentions with AI relevance, sentiment & customer-experience
  answers & compares runs. Use it when you watch a brand over time. From $0.0003
  per analyzed tweet.
- [X (Twitter) Tweet Sentiment Analysis with AI](https://apify.com/xquik/x-tweet-sentiment-analysis)
  labels attitude, intensity & sarcasm probability for every tweet with AI. Use
  it when you need general sentiment on any topic. From $0.0003 per analyzed
  tweet.
- [X (Twitter) Stock & Crypto AI Trading Signals](https://apify.com/xquik/x-twitter-stock-crypto-signals)
  labels bullish, bearish, neutral or mixed stance, content type, conviction &
  asset relevance with AI. Use it when you follow stocks, crypto or trading
  talk. From $0.0003 per analyzed tweet.
- [X (Twitter) News Monitor with AI Analysis](https://apify.com/xquik/x-twitter-news-monitor)
  labels news posts by format, source attribution & topic relevance with AI. Use
  it when you separate reporting from commentary. From $0.0003 per analyzed
  tweet.
- [X (Twitter) Tweet Classifier with AI Analysis](https://apify.com/xquik/x-twitter-tweet-classifier)
  answers your own category, score & yes/no questions for every tweet with AI.
  Use it when the preset analyses do not fit your labels. From $0.0003 per
  analyzed tweet.
- [X (Twitter) Tweet Viral Score Analyzer with AI](https://apify.com/xquik/x-tweet-viral-score-analyzer)
  estimates a Viral Score from 0 to 100 & a verdict for every tweet from 8 AI
  trait answers. Use it when you study why tweets spread or flop. From $0.0003
  per analyzed tweet.
- [X (Twitter) Monitor](https://apify.com/xquik/x-twitter-monitor) catches every
  new tweet, reply, quote, repost & profile change of accounts, usually in under
  a second after X shows it, plus keyword tweets & follows. Use it when you need
  alerts as soon as X shows a tweet. From $0.0045 per monitor-hour.
- [X (Twitter) to Discord Bot](https://apify.com/xquik/x-twitter-to-discord)
  sends every new tweet, reply, quote & repost of accounts to a Discord channel
  through its webhook, with no bot to host. Use it when you want an account's
  tweets in a Discord channel. From $0.0045 per monitor-hour.
- [X (Twitter) Crypto Tracker](https://apify.com/xquik/x-twitter-crypto-tracker)
  tracks the tweets, deleted tweets, profile changes & follows of crypto
  accounts & KOLs, plus cashtag tweets. Use it when you act on what crypto
  accounts post or follow. From $0.0045 per monitor-hour.
- [X (Twitter) Follower Tracker](https://apify.com/xquik/x-twitter-follower-tracker)
  tracks the new & lost followers of an account, & whom it follows or unfollows,
  with each account's full profile. Use it when you read an account's followers
  or follows as a signal. From $0.0045 per monitor-hour.
- [X (Twitter) Post Tracker](https://apify.com/xquik/x-twitter-post-tracker)
  records the views, likes, reposts, replies, quotes & bookmarks of chosen posts
  on each run, with the change since the last run. Use it when you track how
  posts perform over time. From $0.00015 per snapshot.

### FAQ

Answers to common questions, then where to get help.

#### Do I need an X account or an X API key?

No. Xquik's X (Twitter) Space Scraper needs no X account or X API key.

#### Can I find Spaces that are live now?

Yes. Set `queryType` to `Live` & add a search term, such as `bitcoin`. Each row
is a Space on air now. `Upcoming` lists scheduled Spaces, which carry
`scheduledStart`.

#### Is it legal to scrape X Spaces?

Xquik's X (Twitter) Space Scraper requests public X fields. Results can contain
personal data. Confirm a lawful purpose & follow applicable privacy rules. Ask
qualified counsel when uncertain.

#### Why did my run return no results?

Read the run status first. An empty run's status says to check your targets. The
free `diagnostics` output appears when something needs attention. Its
`stopCauses` gives each cause a `nextAction` to follow.

#### Can I use the API, schedules & integrations?

Yes. Use the Apify API or the Xquik REST API. The
[API tab](https://apify.com/xquik/x-space-scraper/api) has Python, JavaScript &
cURL examples. Apify [schedules](https://docs.apify.com/platform/schedules) run
Xquik's X (Twitter) Space Scraper on a cron. Agents use
[Apify MCP](https://docs.apify.com/platform/integrations/mcp). Use `latest`
unless you need an older build.

#### Where do I get help?

Open an issue in the
[Issues tab](https://apify.com/xquik/x-space-scraper/issues) with the run ID.
Free diagnostics in the key-value store explain runs that need attention. A run
that gets no row back says why in its status.

#### Can I get a custom solution?

Yes. Describe what you need in the
[Issues tab](https://apify.com/xquik/x-space-scraper/issues). Xquik also offers
a dashboard, a REST API, an MCP server & webhooks. Find Xquik's website on its
[Apify profile](https://apify.com/xquik).

# Changelog

This Actor's version history is a separate document: https://apify.com/xquik/x-space-scraper/changelog.md

# Actor input Schema

## `searchTerms` (type: `array`):

Words, hashtags or X search operators, such as bitcoin or from:solana. Each Space found is 1 row. Live & Upcoming match title words only.

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

Public Space & broadcast URLs on x.com or twitter.com. Use strings or {"url":"..."} objects. For example, \["https://x.com/i/spaces/1OGwblLjnQMKB", {"url":"https://x.com/i/broadcasts/1nGeLMWbkpaKX"}].

## `spaceIds` (type: `array`):

X Space IDs, as in x.com/i/spaces/<id>.

## `broadcastIds` (type: `array`):

X broadcast IDs, as in x.com/i/broadcasts/<id>. Each broadcast is 1 row with its title, state, times, watch counts & host.

## `includeReplay` (type: `boolean`):

Add the recording of each Space that is over to its row, as an HLS playlist URL. It costs nothing extra but makes the run slower.

## `queryType` (type: `string`):

Latest shows the newest matches first & Top the most engaging. Live lists Spaces on air now & Upcoming lists scheduled ones. Live & Upcoming match title words only.

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

Global delivered-row cap across every search term, URL and ID. The form starts at 1,000. A run can return 100,000 rows & more, so raise it for a full export.

## `maxItemsPerTarget` (type: `integer`):

Optional delivered-Space cap for each search term.

## `dedupeAcrossTargets` (type: `boolean`):

Remove repeated canonical rows before billing.

## `maxConcurrency` (type: `integer`):

How many search terms and Spaces to process at once. The default is the fastest safe setting.

## `fields` (type: `array`):

Keep only these fields in each row. Pick names or type your own. Use a dot for a field inside an object. Columns arrive in the order & spelling you write. Every row keeps its id. Leave empty for every field. The price per row stays the same. A wrong name stops the run before it reads, at no charge. If names cannot be checked, the run reads on & lists unseen names last.

## `omitFields` (type: `array`):

Drop these fields & keep the rest. Every row keeps its id.

## `renameFields` (type: `array`):

Give a field a new column name. The key is the field. The value is the new name. A renamed field becomes a top-level column.

## `flatten` (type: `boolean`):

Turn each nested object into top-level columns. Lists stay lists. Use it for CSV & spreadsheets.

## `fillMissingFields` (type: `boolean`):

With Fields to keep, a field a row lacks arrives as null. Every row then has the same columns. Turn it off to leave such fields out.

## `joinFields` (type: `array`):

Turn each of these lists into 1 text value. Use it for CSV cells.

## `joinSeparator` (type: `string`):

Text between the items of a joined list.

## `constantFields` (type: `array`):

Add a column with the same text on every row. The key is the column name, such as campaign. The value is its text.

## `alwaysSaveRunRecords` (type: `boolean`):

Save run-report on every run. When off, small runs that go well skip it & cost less.

## Actor input object example

```json
{
  "searchTerms": [
    "bitcoin"
  ],
  "startUrls": [
    "https://x.com/i/spaces/1OGwblLjnQMKB",
    {
      "url": "https://x.com/i/broadcasts/1nGeLMWbkpaKX"
    }
  ],
  "spaceIds": [
    "1OGwblLjnQMKB"
  ],
  "broadcastIds": [
    "1nGeLMWbkpaKX"
  ],
  "includeReplay": false,
  "queryType": "Latest",
  "maxItems": 1000,
  "dedupeAcrossTargets": true,
  "maxConcurrency": 100,
  "flatten": false,
  "fillMissingFields": true,
  "joinSeparator": ", ",
  "alwaysSaveRunRecords": false
}
```

# Actor output Schema

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

Unique delivered rows. Filters and deduplication run before billing.

## `diagnostics` (type: `string`):

Free actionable diagnostics, written only when something needs attention. They cover partial, invalid, aborted & recovered runs. An empty run whose filters removed rows writes 1 too. A run that read every target & got no row back writes none. A partial diagnostic lists each stop cause in stopCauses. Real results remain in the dataset.

## `runReport` (type: `string`):

Outcome, completion reason, counts, duration, and privacy-safe anomalies. A run writes it when it hits a problem, is large or has Always save run records on. Small runs that go well skip it & state the outcome in their status.

# 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 = {
    "searchTerms": [
        "bitcoin"
    ],
    "maxItems": 1000
};

// Run the Actor and wait for it to finish
const run = await client.actor("xquik/x-space-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 = {
    "searchTerms": ["bitcoin"],
    "maxItems": 1000,
}

# Run the Actor and wait for it to finish
run = client.actor("xquik/x-space-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 '{
  "searchTerms": [
    "bitcoin"
  ],
  "maxItems": 1000
}' |
apify call xquik/x-space-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,xquik/x-space-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/14UH7xQfmrNd3sj9P/builds/bma5JQOK6MSgIe13d/openapi.json
