Get key intelligence on a user: contract activity, community creation, and name changes.
| username | string | Twitter username. Provide username or twitterId. |
| twitterId | string | Twitter numeric ID. Provide username or twitterId. |
Gateway ini pengganti langsung untuk API Alphagate. Path, query, dan bentuk respons persis sama — yang berubah cuma host dan isi header x-api-key.
Kamu butuh satu client key dari operator gateway, bentuknya agk_…. Itu bukan kunci Alphagate: kunci yang asli tidak pernah keluar dari server gateway dan kamu tidak akan pernah melihatnya. Kalau key-mu bocor, operator bisa mencabutnya tanpa mengganggu pemakai lain.
# sebelumnya
curl "https://api.alphagate.io/api/v2/user/alpha?username=elonmusk" \
-H "x-api-key: KUNCI_ALPHAGATE"
# lewat gateway
curl "$GATEWAY/api/v2/user/alpha?username=elonmusk" \
-H "x-api-key: agk_45a18cd75a7a1e83…"const res = await fetch(
`${GATEWAY}/api/v2/user/alpha?username=${encodeURIComponent(name)}`,
{ headers: { 'x-api-key': process.env.GATEWAY_KEY } },
)
const { data } = await res.json()x-cache: hit hit | miss | stale | bypass | error
x-cache-age: 1841 detik sejak data ini diambil dari Alphagate
x-credits-charged: 0 credit yang terpotong untuk permintaan ini
x-credits-saved: 6 credit yang tidak jadi terpotong karena cache| hit | Dari cache. Alphagate tidak disentuh, 0 credit. |
| miss | Diambil dari Alphagate, credit terpotong. |
| stale | Alphagate sedang gagal — ini salinan lama. Cek x-cache-age. |
| bypass | Sengaja tidak di-cache: route bertarif nol, _fresh=1, atau route yang belum dikenal. |
| error | Permintaan gagal, tidak ada yang tersaji. |
| situasi | langsung | lewat gateway |
|---|---|---|
| Data masih segar di cache | selalu bayar | 0 credit |
| 50 permintaan identik bersamaan | 50 kali bayar | 1 kali bayar |
| Kuota habis, kena limit, atau 5xx | error | salinan lama kalau ada |
| Key salah | 401 dari Alphagate | 401 sebelum Alphagate dihubungi |
| Metode selain GET | tergantung endpoint | 405 |
Bentuk error tetap sama seperti Alphagate, {"message":"…"}, termasuk 401 dan 502 yang berasal dari gateway sendiri. Dua pengecualian yang bodinya kosong:404 untuk path di luar /api/v2/ dan 405 untuk metode selain GET — keduanya salah alamat, bukan jawaban API.
Butuh data terbaru? Tambahkan _fresh=1. Cache dilewati, credit terpotong, isi cache ikut diperbarui, dan parameter itu tidak diteruskan ke Alphagate. Jangan dijadikan kebiasaan — kalau semua permintaanmu memakainya, kamu membayar penuh seperti tanpa gateway.
Query yang beda tulisan tapi sama maksudnya dianggap satu. Urutan parameter tidak berpengaruh, username tidak peka huruf besar-kecil, dancount dianggap sama dengan limit pada endpoint yang menerima keduanya. Kamu tidak perlu menyeragamkan sendiri untuk mendapat hit.
404 ikut di-cache sebentar. Username yang tidak ada dijawab langsung tanpa memanggil Alphagate. Ini tidak memakan credit — Alphagate memang tidak menagih 404 — hanya menghemat waktu tunggu.
Kolom TTL di bawah adalah setelan gateway ini sekarang, bukan angka contoh. Operator bisa mengubahnya kapan saja, jadi jangan menanam asumsi umur data di kodemu; baca x-cache-age kalau kesegarannya penting bagimu.
Get key intelligence on a user: contract activity, community creation, and name changes.
| username | string | Twitter username. Provide username or twitterId. |
| twitterId | string | Twitter numeric ID. Provide username or twitterId. |
Get bio change history for a user. Returns previous and new bio values with timestamps.
| username | string | Twitter username. Provide username or twitterId. |
| twitterId | string | Twitter numeric ID. Provide username or twitterId. |
| page | number | Page number (default: 1, max: 30; a later page returns an empty list). |
| limit | number | Page size (default 20, max 50). |
Get the smart contract addresses associated with a user: the 100 most recent, oldest first. `contracts` lists the addresses; `mentioned_contracts` lists the same contracts in the same order, each with its chain, the token symbol and name, and when the account first mentioned it (Unix seconds, null when not known).
| username | string | Twitter username. Provide username or twitterId. |
| twitterId | string | Twitter numeric ID. Provide username or twitterId. |
Get deleted tweets from a user.
| username | string | Twitter username. Provide username or twitterId. |
| twitterId | string | Twitter numeric ID. Provide username or twitterId. |
| limit | number | Max tweets to return (default 100, max 100). |
Get the first accounts that followed this user (early supporters).
| username | string | Twitter username. Provide username or twitterId. |
| twitterId | string | Twitter numeric ID. Provide username or twitterId. |
Get key followers (influencers/KOLs) that follow this user, with the time of each follow. A follow that already existed when we started tracking that key profile has no known time and is not listed.
| username | string | Twitter username. Provide username or twitterId. |
| twitterId | string | Twitter numeric ID. Provide username or twitterId. |
| sort | string | Sort order: "recent" (default) or "oldest". |
| page | number | Page number (default: 1). No maximum: page through the full list; a page past the end returns an empty list. |
| limit | number | Page size (default 20, max 50). |
Get previous usernames for a user.
| username | string | Twitter username. Provide username or twitterId. |
| twitterId | string | Twitter numeric ID. Provide username or twitterId. |
Convert a Twitter username to a numeric user ID in real time.
| username | string · wajib | Twitter handle (without @). |
Get a user's 50 most recent followers from Twitter in real time. There are no further pages.
| twitterId | string | Twitter numeric user ID. Required if username not provided. |
| username | string | Twitter handle (without @). Required if twitterId not provided. |
Get the 50 accounts a user followed most recently on Twitter, in real time. There are no further pages.
| twitterId | string | Twitter numeric user ID. Required if username not provided. |
| username | string | Twitter handle (without @). Required if twitterId not provided. |
Get a user's latest tweets in real time (replies excluded): one page of up to 20 tweets (fewer with `count`). There are no further pages.
| twitterId | string | Twitter numeric user ID. Required if username not provided. |
| username | string | Twitter handle (without @). Required if twitterId not provided. |
| count | number | Number of tweets to return, up to 20 (default 20). A larger count returns 20. |
| raw | string | Set to "true" to get the tweets in X's original format. |
Get a full Twitter user profile in real time.
| username | string · wajib | Twitter handle (without @). |
Get current credit balance and plan info.
Tanpa parameter.
Paginated log of all API calls made.
| page | number | Page number (default: 1). |
Aggregated usage stats for the last 30 days.
Tanpa parameter.