# Stock Opinion Extractor: Tickers and Stance From Your Posts (`o19750120/stock-opinion-extractor-own-posts`) Actor

Bring your own posts (an X archive tweets.js or a pasted list) and get the tickers each post names, a rule-based bullish, bearish or unclear stance with the evidence sentence, and a per-ticker summary across authors. No model, no scraping.

- **URL**: https://apify.com/o19750120/stock-opinion-extractor-own-posts.md
- **Developed by:** [Oliver Liu](https://apify.com/o19750120) (community)
- **Categories:** Business, Social media
- **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 rows delivered

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

## Stock Opinion Extractor: Tickers and Stance From Your Posts

**Bring your own posts, get a structured table of stock opinions.** Paste the `tweets.js` file from the archive X lets you download for your own account, or a list of posts with text and date. For every post, the Actor finds the tickers it names, reads a **bullish, bearish or unclear** stance from explicit wording next to each ticker, tags the kinds of argument used (risk, news, flow, disclosure, thesis) and keeps the evidence sentence. Then it adds **one summary row per ticker**: how many mentions lean each way, which authors are bullish or bearish, whether several authors agree or are divided, and how often an author flipped. Ask for **author timelines** and you also get one row per author and ticker: that author's first call, every dated change of direction, and their latest explicit call. Add daily closes you already have and each of those calls gets a **track record**: entry price and the return 5, 20 and 60 closes later.

**It only processes the data you supply.** It does not scrape X or any other site, does not call any AI model, does not look anything up, and sends nothing outside the run. Everything is rule-based and runs inside your own Apify run, so it is fast, cheap and repeatable: the same posts always give the same rows.

**Who it's for:** people who post about stocks and want a dated list of every call they made, newsletter or research teams whose authors agree to share their posts, and developers who need a deterministic **ticker extractor** and **stock sentiment** first pass before their own model. **Price:** US$0.001 per row. The prefilled input (one post) returns 2 rows, one summary and one mention, for US$0.002 in a few seconds. Not investment advice.

Also searched as **cashtag extractor**, **stock mention extraction**, **X (Twitter) archive analysis**, **bullish or bearish classifier** and **trading journal from tweets**.

![Real rows from a run: per-ticker summary across three authors](https://twmarket.ayskilllab.com/shots/listing-p07-summary.png)

*Real rows from a run on eight sample posts we wrote for this demo (they are not anyone's real posts). Not investment advice.*

### Sample output

The five ticker summary rows from the same demo run. The run also returns 10 mention rows, one per post and ticker, with the evidence sentence.

| Ticker | Mentions | Bullish | Bearish | Unclear | Authors | Consensus | Agreement % |
|---|---:|---:|---:|---:|---:|---|---:|
| NVDA | 3 | 2 | 1 | 0 | 3 | divided | 66.7 |
| AMD | 2 | 0 | 1 | 1 | 2 | not_enough_evidence | 50 |
| INTC | 2 | 0 | 1 | 1 | 2 | not_enough_evidence | 50 |
| TSM | 2 | 2 | 0 | 0 | 2 | bullish_consensus | 100 |
| TSLA | 1 | 0 | 0 | 1 | 1 | single_author | 100 |

`divided` means at least one author leans each way. A label only counts what the posts say; it says nothing about whether the stock went up.

### What one run returns

| `kind` | One row is | What you read it for |
|---|---|---|
| `ticker` | One ticker across all your posts | Mentions by stance, authors by their latest stance, consensus label, agreement, stance changes, first and last date |
| `author` | One author's calls on one ticker | Mentions by stance, latest explicit call and its date, number of flips, and a dated timeline of each change of direction with the post it came from |
| `mention` | One ticker in one post | Stance, why, argument types, the evidence sentence, author, date and link |

By default (`output`: `both`) you get ticker summaries first, sorted by number of mentions, then mentions in date order. `authors` returns only the author rows, sorted by author; `all` returns ticker summaries, then author rows, then mentions. `tickers` or `mentions` returns only that kind.

### How to use it

1. Click **Try for free** and open the **Input** tab.
2. Either paste your archive's `data/tweets.js` into **X archive tweets.js** (and your handle, to get x.com links), or fill **Posts** with a list like the one below. You can give both.
3. Optional: list symbols you write without a `$` in **Symbols without a $**, and give your own **Themes for tickers**.
4. Set **Maximum results** and click **Start**. Download JSON, CSV or Excel, or read the dataset through the Apify API.

```json
{
  "posts": [
    { "text": "Still bullish on $NVDA because data-center guidance keeps rising.", "date": "2026-10-28", "author": "analyst_a", "url": "https://example.com/post/1" },
    { "text": "Turning bearish on $NVDA here, valuation risk is too high into earnings.", "date": "2026-10-30", "author": "analyst_c" }
  ],
  "plainTickers": ["TSLA"],
  "themes": { "NVDA": "AI chips" },
  "output": "both",
  "maxResults": 100
}
```

### Coverage

| Input | Read | Not read |
|---|---|---|
| X archive `tweets.js` (one or several parts) | Your own posts, with date and id | Reposts (`RT @...`): they are someone else's words |
| Pasted posts | `text`, `date`, `author`, `url`, `id` | Images, links' contents, replies you did not include |
| Tickers | `$CASHTAGS` of 1 to 5 capitals; symbols you list, written exactly as listed | Company names, nicknames, tickers that are not in the text |
| Stance words | English and Traditional Chinese direction words | Sarcasm, emojis, price targets without a direction word |

Up to 20,000 posts a run.

![Real rows from the same run: one row per post and ticker, with the evidence](https://twmarket.ayskilllab.com/shots/listing-p07-mentions.png)

### Output example: a ticker summary

A real row from the demo run, unedited.

```json
{
  "kind": "ticker",
  "ticker": "NVDA",
  "theme": "AI chips",
  "mentions": 3,
  "bullish": 2,
  "bearish": 1,
  "unclear": 0,
  "authors": 3,
  "bullish_authors": ["analyst_a", "analyst_b"],
  "bearish_authors": ["analyst_c"],
  "unclear_authors": [],
  "consensus": "divided",
  "agreement_percent": 66.7,
  "latest_stance": "bearish",
  "stance_changes": 0,
  "first_date": "2026-10-28T00:00:00.000Z",
  "last_date": "2026-10-30T00:00:00.000Z"
}
```

### Output example: an author timeline

A real row from the same demo posts with `output` set to `authors`, unedited. In the demo each author names a ticker once, so the timeline has one step; an author who goes bullish, then bearish, then bullish again gets three dated steps and `stance_changes` of 2.

```json
{
  "kind": "author",
  "author": "analyst_b",
  "ticker": "NVDA",
  "theme": "AI chips",
  "mentions": 1,
  "bullish": 1,
  "bearish": 0,
  "unclear": 0,
  "latest_stance": "bullish",
  "latest_call": "bullish",
  "latest_call_date": "2026-10-29T00:00:00.000Z",
  "stance_changes": 0,
  "stance_timeline": [{ "date": "2026-10-29T00:00:00.000Z", "stance": "bullish", "post_id": "b1", "url": "" }],
  "first_date": "2026-10-29T00:00:00.000Z",
  "last_date": "2026-10-29T00:00:00.000Z"
}
```

`latest_stance` is the newest mention, which may be `unclear`; `latest_call` skips unclear mentions and gives the newest explicit bullish or bearish call, or empty if the author never took a side.

#### Track record from closes you supply

Give `closes`, daily closing prices per ticker that you already have (from your broker, a data vendor or a spreadsheet), and every step of `stance_timeline` is scored:

```json
{ "closes": { "NVDA": { "2026-10-28": 181.2, "2026-10-29": 184.0, "2026-10-30": 182.5 } } }
```

- **Entry** (`entry_date`, `entry_close`) is the first close on a day after the post's UTC date, never the post's own day, so a call cannot see the close of the day it was made. No close within 7 days after the post means no score.
- **Returns** `return_5d_percent`, `return_20d_percent` and `return_60d_percent` are measured 5, 20 and 60 closes after the entry, adjusted for direction: a bearish call is right when the price falls. Too few closes gives `null`, never an estimate.
- Each author row adds `scored_calls_20d`, `right_calls_20d` and `median_return_20d_percent`.

The Actor never fetches a price. The numbers are only as good as the closes you give: use adjusted closes if splits fall inside your dates. Overlapping holding periods and no trading costs make this a record of calls, not a tradable performance figure.

### Output example: a mention

```json
{
  "kind": "mention",
  "ticker": "NVDA",
  "stance": "bearish",
  "stance_reason": "Explicit bearish wording: bearish",
  "theme": "AI chips",
  "argument_types": ["risk", "news"],
  "evidence": "Turning bearish on $NVDA here, valuation risk is too high into earnings.",
  "post_id": "c1",
  "author": "analyst_c",
  "date": "2026-10-30T00:00:00.000Z",
  "url": ""
}
```

### Fields

| Field | What it is | Example |
|---|---|---|
| `kind` | `ticker` for a summary, `mention` for one ticker in one post. | `mention` |
| `ticker` | The symbol as written in the post, without the `$`. | `NVDA` |
| `theme` | Your own label from `themes`, or empty. Never guessed. | `AI chips` |
| `stance` | bullish, bearish or unclear. | `bearish` |
| `stance_reason` | The direction words found, or why it is unclear. | `Explicit bearish wording: bearish` |
| `argument_types` | Kinds of argument in the post: risk, news, flow, disclosure, thesis. | `["risk", "news"]` |
| `evidence` | The sentences that name the ticker, at most 500 characters. | `Turning bearish on $NVDA here...` |
| `post_id` | The id from your input or archive. | `c1` |
| `author` | The author you gave, your handle for archive posts, or `unnamed`. | `analyst_c` |
| `date` | Publication time in UTC, or empty if you gave none. | `2026-10-30T00:00:00.000Z` |
| `url` | The post's link, if you gave one or your handle. | `https://x.com/you/status/1` |
| `mentions` | Posts naming the ticker. | `3` |
| `bullish` | Mentions read as bullish. Also `bearish` and `unclear`. | `2` |
| `authors` | Authors who named the ticker. | `3` |
| `bullish_authors` | Authors whose latest mention is bullish. Also `bearish_authors` and `unclear_authors`. | `["analyst_a"]` |
| `consensus` | `divided`, `bullish_consensus`, `bearish_consensus`, `single_author` or `not_enough_evidence`. | `divided` |
| `agreement_percent` | Share of authors in the largest stance group, by latest mention. | `66.7` |
| `latest_stance` | Stance of the newest mention. | `bearish` |
| `stance_changes` | Times an author went from bullish to bearish or back, unclear skipped. | `0` |
| `first_date` | Date of the first mention. | `2026-10-28T00:00:00.000Z` |
| `last_date` | Date of the newest mention. | `2026-10-30T00:00:00.000Z` |
| `latest_call` | Author rows: the newest explicit bullish or bearish call, or empty. | `bullish` |
| `latest_call_date` | Author rows: when that call was made. | `2026-10-29T00:00:00.000Z` |
| `stance_timeline` | Author rows: the first call and each change of direction, oldest first, with date, stance, post id and link; with `closes`, also entry and 5, 20 and 60-close returns. | `[{"stance": "bullish", ...}]` |
| `scored_calls_20d` | Author rows with `closes`: calls that have a 20-close return. | integer |
| `right_calls_20d` | Author rows with `closes`: of those, calls whose direction-adjusted return is above zero. | integer |
| `median_return_20d_percent` | Author rows with `closes`: median direction-adjusted 20-close return. | number |

A consensus needs **two or more authors on the same side and nobody on the other**; one bullish and one bearish author make it `divided`. Each author counts once, with their latest stance.

### Use cases

- **Your own track record:** turn years of your posts into a table of every stock call you made, with dates, and score each call against closes you supply.
- **A research group or newsletter team:** paste posts the authors agreed to share and see where the team agrees or is split.
- **Journaling:** find stocks you mention a lot without ever taking a side, and the ones where you flipped.
- **Following one author:** with author timelines, see when each author first called a stock, every time they changed direction, and where they stand now, with the post behind each step. Add your own closes to see how each call did.
- **Data pipelines and AI agents:** a deterministic first pass that feeds a spreadsheet, a dashboard or your own model.

### Pricing

**US$0.001 per row**, plus Apify's standard start fee of US$0.00005 per run.

| What you give | Rows | Cost |
|---|---:|---:|
| The 8 demo posts | 15 | US$0.015 |
| 500 posts naming about 80 tickers in 600 mentions | about 680 | about US$0.68 |
| Ticker summaries only for the same 500 posts | about 80 | about US$0.08 |
| Author timelines are extra rows | one per author and ticker | US$0.001 each |
| The 10,000-row maximum of one run | 10,000 | US$10.00 |

Posts that name no ticker cost nothing. Set **Maximum cost per run** to cap your spend.

### Limits to know

- **Only data you supply, and you need the right to use it.** Upload your own posts, or posts whose authors agreed. The Actor does not check that for you.
- **Rule-based, not AI, and its accuracy has not been measured.** We have no test of this rule set against posts labelled by people, so we quote no accuracy figure. It is deliberately strict: a stance needs an explicit word such as bullish, buy, accumulate, overweight, bearish, sell or underweight in a sentence that names the ticker. Everything else is `unclear`, so expect many unclear rows and few wrong directions rather than the reverse.
- **Sentence by sentence.** "Adding to $NVDA. Very bullish." gives `unclear` for NVDA, because the direction is in a sentence that does not name it. "Bullish on $NVDA" works.
- **A ticker must be in the text.** A `$` and 1 to 5 capitals, or a symbol you list. Company names ("Nvidia"), lower-case symbols and tickers only implied by context are not found. The Actor never adds a ticker that is not written in the post.
- **No prices of its own.** It checks whether a call was right only against closes you supply in `closes`, and only for author timeline rows.
- **Reposts are skipped** in an archive, because they are someone else's words. In a pasted list, every post you give is read.
- **At most 20,000 posts and 10,000 rows a run.** Split larger archives.

### FAQ

**Do you keep my posts?**
No. The run reads your input and writes rows to your run's dataset in your own Apify account; we store nothing elsewhere and nothing leaves the run. Your input and output stay under your Apify storage retention settings, and you can delete them there.

**Can I paste posts by other people?**
Only if you have their permission. The Actor is built to process your own data.

**Does it use ChatGPT, Claude or another model?**
No. It is a fixed set of rules, so there is no model cost and the result is the same every time.

**Why is my clearly bullish post unclear?**
The rules only count explicit direction words in the sentence with the ticker. Rephrase, or treat `unclear` as "not stated".

**Does it read Chinese posts?**
Tickers and direction words in Traditional Chinese are read; output labels stay in English.

**What does a run cost if most of my posts are not about stocks?**
Posts that name no ticker produce no row and cost nothing. You pay for one row per ticker per post, plus one summary row per ticker.

**Is this investment advice?**
No. It describes what posts say. It is not investment advice, not a recommendation and not an offer of securities analysis.

### Data sources

None of ours: every row comes from the posts you supply in the run's input. The rules were adapted from our own stock-opinion tracking work, and we organise only what you give.

### Related Actors and free pages

More datasets from the same publisher, all pay per row:

- [Taiwan Stocks Post-Market](https://apify.com/o19750120/taiwan-stock-post-market-flows): every TWSE and TPEx common stock after the close, with margin balances, TPEx institutional flows and top-20 rankings.
- [Taiwan & Global Macro Indicators](https://apify.com/o19750120/taiwan-global-macro-indicators): Taiwan's official GDP, CPI, PMI, money and rates in English, next to the US, the euro area and Japan.
- [Football Match Predictions, Backtested](https://apify.com/o19750120/football-prematch-report-backtested): pre-match home, draw and away probabilities for seven European leagues, with the model's backtest as data.
- [MLB Season Stats 2025](https://apify.com/o19750120/mlb-season-pitching-bullpen-data): the finished 2025 MLB season per club and per starting pitcher, from Retrosheet open data.
- **Our own site:** [AY Consensus](https://consensus.ayskilllab.com/) is a free preview of consensus scores across the accounts we follow, from the same stock-opinion work these rules came from. It names no tickers and is not for sale; this Actor is the part you can run on your own posts.

# Actor input Schema

## `posts` (type: `array`):

A list of posts you have the right to use. Each one: text (required), date (such as 2026-11-03 or 2026-11-03T14:20:00Z), and optionally author, url and id. Give several authors to see where they agree or disagree.

## `archive` (type: `string`):

Paste the content of data/tweets.js from the archive X lets you download for your own account (Settings, Your account, Download an archive). Several parts can be pasted one after another. Reposts (RT @...) are skipped because they are someone else's words.

## `archiveAuthor` (type: `string`):

Optional. Used as the author of the archive posts and to build each post's x.com link.

## `plainTickers` (type: `array`):

By default only $CASHTAGS count. List symbols here (in capitals, such as TSLA, 2330 or BRK.B) to also count them when written without a $. Each must still appear in the post exactly as listed.

## `themes` (type: `object`):

Optional labels you choose, such as {"NVDA": "AI chips"}. Copied to every row of that ticker. The Actor never guesses a theme.

## `closes` (type: `object`):

Optional, used by author timeline rows. Daily closing prices you supply, such as {"NVDA": {"2026-10-28": 181.2, "2026-10-29": 184.0}}. Each call is then scored: entry at the first close after the post's date, and the return 5, 20 and 60 closes later, with bearish calls right when the price falls. The Actor never fetches prices itself.

## `output` (type: `string`):

Both: one summary row per ticker, then one row per post and ticker. Author timelines: one row per author and ticker with each dated change of call. All: the three kinds together. Or only one kind.

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

Most rows to return, and so to pay for. Ticker summaries come first.

## Actor input object example

```json
{
  "posts": [
    {
      "text": "Adding to $NVDA. Still bullish on $NVDA because data-center guidance keeps rising.",
      "date": "2026-11-03",
      "author": "me"
    }
  ],
  "output": "both",
  "maxResults": 1000
}
```

# 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 = {
    "posts": [
        {
            "text": "Adding to $NVDA. Still bullish on $NVDA because data-center guidance keeps rising.",
            "date": "2026-11-03",
            "author": "me"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("o19750120/stock-opinion-extractor-own-posts").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 = { "posts": [{
            "text": "Adding to $NVDA. Still bullish on $NVDA because data-center guidance keeps rising.",
            "date": "2026-11-03",
            "author": "me",
        }] }

# Run the Actor and wait for it to finish
run = client.actor("o19750120/stock-opinion-extractor-own-posts").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 '{
  "posts": [
    {
      "text": "Adding to $NVDA. Still bullish on $NVDA because data-center guidance keeps rising.",
      "date": "2026-11-03",
      "author": "me"
    }
  ]
}' |
apify call o19750120/stock-opinion-extractor-own-posts --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,o19750120/stock-opinion-extractor-own-posts"
        }
    }
}
```

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/pefbN5lfS7JJjjD8Q/builds/HqiFJn2TUkc5VN9dM/openapi.json
