Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
c72679d
feat: add getxapi skill — X/Twitter via getxapi.com third-party API
ayushere May 12, 2026
e366a98
fix: address Copilot review — remove delete references, fix field map…
ayushere May 12, 2026
ff04274
fix: remove mmx reference — user-specific tool, not general Hermes de…
ayushere May 12, 2026
60e8cbf
fix: address second Copilot review — v1.1/v2 accuracy, JSON comment, …
ayushere May 12, 2026
6bca460
fix: address third Copilot review — 4 fixes in one pass
ayushere May 12, 2026
069e774
fix: remove hardcoding recommendation, use placeholder in Secret Safe…
ayushere May 12, 2026
1197481
fix: correct scanner behavior — only token+GitHub exempt, Bearer alwa…
ayushere May 12, 2026
8215900
fix: scrub personal data — kextcache handle, real tweet ID, real cred…
ayushere May 12, 2026
ff23b36
fix: URL-encoding note, scanner coverage, field table consistency
ayushere May 12, 2026
91d79f3
fix: replace real target keywords with generic exampleKeyword1/exampl…
ayushere May 12, 2026
ed3c753
fix: double-pipe tables and URL-encoding consistency
ayushere May 12, 2026
bd22b09
feat: comprehensive endpoint reference — all 35 getxapi endpoints doc…
ayushere May 12, 2026
c1259b6
fix: drop related_skills, add count params, login warning, align resp…
ayushere May 12, 2026
8ac8962
fix: standardize placeholders, Response→Response fields, reconcile au…
ayushere May 12, 2026
a54cffc
chore: remove author name from skill frontmatter
ayushere May 14, 2026
ff22eac
chore: restore author attribution
ayushere May 14, 2026
dbaede3
fix: address Copilot review comments on getxapi endpoints reference
ayushere May 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
150 changes: 150 additions & 0 deletions skills/social-media/getxapi/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
---
name: getxapi
description: X/Twitter via getxapi.com third-party API — search, post, reply, user lookup, media. Simpler than official v2.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is 110 characters. New skills require a single-sentence description of at most 60 characters (AGENTS.md:888-900); please shorten it before merge.

version: 1.0.0
author: Ayush Sahay Chaudhary
license: MIT
metadata:
hermes:
tags: [twitter, x, social-media, getxapi, api]
required_environment_variables:
- name: GETXAPI_API_KEY
prompt: getxapi API key (Bearer token)
help: Get your key at https://getxapi.com — sign up, go to dashboard, copy API key
required_for: all API access (search, post, user lookup)
- name: GETXAPI_AUTH_TOKEN
prompt: X auth_token for posting (32+ hex chars)
help: Extract from browser cookies (x.com → Storage → Cookies → auth_token). Required for posting tweets and replies.
required_for: posting tweets and replies
---

# getxapi — X (Twitter) via getxapi.com

Third-party X/Twitter API at `https://api.getxapi.com`. Credits-based ($0.001/read, $0.002/write). Simpler than official v2 — no OAuth, no PKCE. Authenticate with a Bearer API key. Post with an X `auth_token` cookie.

Use this skill for:
- searching tweets by keyword with `product=Top` (actual engagement) vs `product=Latest` (bot spam)
- posting standalone tweets, replies, and quote tweets with media attachments
- liking, retweeting, and fetching tweet replies and articles
- fetching user profiles, timelines, media, mentions, and liked tweets
- searching users, checking follow relationships, listing followers/following
- managing profile (avatar, banner, display name, bio)
- sending and listing direct messages
- checking account credits and payment history
- bookmark search and home timeline

Do NOT use for:
- deleting tweets (no delete endpoint — must delete manually on x.com)
- creating Articles (GET only, read-only)
- OAuth flows or official v2 endpoints (use `xurl` instead)

## Secret Safety (MANDATORY)

Critical rules when operating inside an agent/LLM session:

- **Never** read, print, parse, summarize, upload, or send the getxapi API key or X `auth_token` to LLM context.
- **Never** ask the user to paste credentials or tokens into chat.
- The user must store credentials in `~/.hermes/.env` via `hermes setup` or manual editing.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hard-codes the default profile's secret file. Use ${HERMES_HOME:-~/.hermes}/.env (the peer-skill convention) so named profiles store and load the credentials from their own HERMES_HOME.

- **Never** execute `curl` commands with inline `Authorization: Bearer <real-key>` in agent sessions — it may be logged or exposed.
- Treat the X `auth_token` like a password — it grants posting access to the account. Rotate immediately if exposed.
- To verify API key validity, run: `curl -s -H "Authorization: Bearer <your-api-key>" "https://api.getxapi.com/account/me"` (use the placeholder — the user supplies their real key locally, outside agent context)

## Quick Reference

All requests use `Authorization: Bearer <your-api-key>`. Posting also requires `auth_token` in the JSON body.

```bash
# Check credits
curl -s -H "Authorization: Bearer <your-api-key>" \
"https://api.getxapi.com/account/me"

# Search tweets (always use product=Top)
curl -s -H "Authorization: Bearer <your-api-key>" \
"https://api.getxapi.com/twitter/tweet/advanced_search?q=exampleKeyword1&product=Top&count=20"

# Post a tweet
curl -s -X POST "https://api.getxapi.com/twitter/tweet/create" \
-H "Authorization: Bearer <your-api-key>" \
-H "Content-Type: application/json" \
-d '{"auth_token":"<your-auth-token>","text":"hello world"}'

# Reply to a tweet
curl -s -X POST "https://api.getxapi.com/twitter/tweet/create" \
-H "Authorization: Bearer <your-api-key>" \
-H "Content-Type: application/json" \
-d '{"auth_token":"<your-auth-token>","text":"good take","reply_to_tweet_id":"1234567890"}'

# User timeline
curl -s -H "Authorization: Bearer <your-api-key>" \
"https://api.getxapi.com/twitter/user/tweets?userName=someuser&count=10"

# Single tweet detail
curl -s -H "Authorization: Bearer <your-api-key>" \
"https://api.getxapi.com/twitter/tweet/detail?id=1234567890"
```

## Field Name Mapping — CRITICAL

getxapi uses **non-standard field names**. Do NOT use official X API v2 field names — they silently produce zero results.

| getxapi field | NOT these (official X API fields — won't work) | Usage |
|---------------|---------------------|-------|
| `author.userName` | `screen_name` (v1.1), `username` (v2 user objects), `author.username` — using any of these returns zero results | Author handle |
| `author.followers` | `public_metrics.followers_count` | Follower count |
| `isReply` | `in_reply_to_user_id` (check if set) | Is it a reply? |
| `id` | (same — no difference from official API) | Tweet ID |
| `inReplyToId` | `referenced_tweets[].id` | Original tweet being replied to |
| `createdAt` | `created_at` | Timestamp |
| `viewCount` | `public_metrics.impression_count` | Views |

**Filtering rules using these fields:**
- Skip `isReply: true` (don't reply to replies)
- Skip `author.followers < 500` (low reach)
- Skip `author.followers > 500000` (too big, reply gets buried)
- Check `createdAt` before replying — skip tweets older than 7 days

## Search Strategy

**Always use `product=Top`.** `product=Latest` returns 0-50 follower accounts and bot spam.

Broad niche keywords work best (examples: `exampleKeyword1`, `exampleKeyword2`). Multi-word queries must be URL-encoded (e.g. `exampleKeyword1%20modifier`) — unencoded spaces cause truncated or failed requests.

Overly specific terms like `exampleKeyword2%20tip` often return zero Top results. Cast a wide net then filter.

## Posting

Posting requires BOTH the API key (Bearer header) AND an X `auth_token` value (passed in the JSON body). The auth_token is typically extracted from browser cookies — it is httpOnly and should not be extracted programmatically at runtime. Alternatively, `POST /twitter/user_login` (see the endpoint reference) can retrieve fresh tokens, but this endpoint accepts highly sensitive credentials and must only be used locally with credentials stored in `~/.hermes/.env`.

**Cron prompt compatibility:** The Hermes cron scanner (`_CRON_EXFIL_COMMAND_PATTERNS` + `_CRON_SECRET_VAR_RE`) blocks `$VAR`-style environment variable references — in Authorization headers, embedded in URLs, and in POST/form data — for all curl/wget invocations targeting non-GitHub domains. The only allowlist exemption is `Authorization: token $VAR` targeting `https://api.github.com`. To use getxapi in cron jobs, reference a helper script that reads credentials from `~/.hermes/.env` at runtime and makes the authenticated call — scripts are not scanned.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not direct users to an unspecified unscanned helper as the credential path. Either ship and test a narrowly scoped helper with profile-aware handling, or remove this workaround; this PR currently adds no helper script.


**Shell quoting:** When reply text contains apostrophes (`'`), embedding JSON in `-d '{...}'` breaks. Write JSON to a temp file and use `-d @file` instead.

## Account & Credits

Check `GET /account/me` before bulk operations. If credits drop below $1.00, reduce volume or alert. Each search costs ~$0.001, each post costs $0.002.

## Gotchas

- **No delete endpoint.** `/twitter/tweet/delete` is not implemented (returns 404). Contradictory tweets must be deleted manually on x.com.
- **`inReplyToId` is the field to check for original tweet** when deduplicating — use this, not `conversationId`.
- **Transient "Daily tweet limit reached" errors** — retry once. Account still in warmup may hit X platform caps.
- **Image-only tweets:** If text < 30 chars with media, analyze image OR skip — never reply blind.
- **Detail endpoint param:** Use `?id=` not `?tweet_id=` — wrong param name returns "Missing required query param" error.

## Verification

```bash
# Verify API key works
curl -s -H "Authorization: Bearer <your-api-key>" \
"https://api.getxapi.com/account/me"
# Should return account details with email, credit balance, and request counts.

# Verify posting works
curl -s -X POST "https://api.getxapi.com/twitter/tweet/create" \
-H "Authorization: Bearer <your-api-key>" \
-H "Content-Type: application/json" \
-d '{"auth_token":"<your-auth-token>","text":"api test"}'
# Should return tweet object with id
```

For detailed endpoint documentation covering all 35 endpoints, field maps, response schemas, pagination, and error codes, see `references/getxapi-endpoints.md`.
Loading