XAPI Dokumantasyonu
XAPI, public client isteklerini master/orchestrator uzerinden managed X node agina dagitir. Default entegrasyonlar icinPOST /api/execute/legacy response dondurur; X API v2'ye yakin public yollar/2/users...altinda ayrica sunulur.
Toplam worker
20
X1 10 + X2 10
Kapasite
20/20
X1 ve X2 toplam concurrency
Agir is kapasitesi
6
Node basina en fazla 3 adet count>=2001 is
Authentication
Public client isteklerinde zorunlu header X-API-Key alanidir. Dashboard oturum tokeni veya node tokeni public API icin kullanilmaz.
HeaderX-API-Key: <key>Preferred keyLegacy uyumlulukcurl -X POST https://archepolis.xyz/api/execute/ \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"user_tweets_fetch","params":{"username":"celalyaziyor","count":2}}'Ana Endpoint
MethodURLhttps://archepolis.xyz/api/execute/Body{ "type": "user_tweets_fetch", "params": { ... } }Default responseV2 opt-inX-Response-Format: v2Max countuser_tweets_fetchuser_tweetsusername_fetchuser_date_range_fetchuser_by_usernamebulk_userssearch_fetchtweet_detail_fetchuser_lookupuser_lookup_batchuser_tweets_by_id_fetchuser_tweets_fetch
usernameuser_idcountexclude["originals", "quotes", "replies", "retweets"]referenced_depthself_reference_depthother_reference_depthtimeout_secondsmonthssince_idquery_flagresponse_format"v2"curl -X POST https://archepolis.xyz/api/execute/ \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "user_tweets_fetch",
"params": {
"username": "celalyaziyor",
"count": 2
}
}'curl -X POST https://archepolis.xyz/api/execute/ \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "user_tweets_fetch",
"params": {
"username": "SinemasaYT",
"count": 3000
}
}'curl -X POST https://archepolis.xyz/api/execute/ \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "user_tweets_fetch",
"params": {
"username": "celalyaziyor",
"count": 100,
"since_id": "2068000000000000000",
"query_flag": "daily_sync"
}
}'curl -X POST https://archepolis.xyz/api/execute/ \
-H "X-API-Key: YOUR_API_KEY" \
-H "X-Response-Format: v2" \
-H "Content-Type: application/json" \
-d '{
"type": "user_tweets_fetch",
"params": {
"username": "moononleo",
"count": 80
}
}'curl -X POST https://archepolis.xyz/api/execute/ \
-H "X-API-Key: YOUR_API_KEY" \
-H "X-Response-Format: v2" \
-H "Content-Type: application/json" \
-d '{
"type": "user_tweets_fetch",
"params": {
"username": "elonmusk",
"count": 100,
"exclude": ["retweets", "quotes"],
"self_reference_depth": 100,
"other_reference_depth": 100
}
}'Varsayilan exclude=[] Posts & replies timeline kullanir. Posts-only sonuc icin exclude:["replies"] gonderilir. Eski include_replies yalniz geriye uyumluluk icin master tarafinda exclude listesine cevrilir ve node'a iletilmez. count filtrelerden sonra uygulanan kesin ust sinirdir. Expansion objeleri root data, result_count ve sonuc bazli faturalama sayisini artirmaz. Split parametre verilmezse eski referenced_depth davranisi korunur. 0 ilgili eksendeki expansion'i kapatir, root referenced_tweets baglantilarini silmez. Secilen mod ve filtreler meta.timeline, efektif derinlikler ve dinamik butce ise meta.referenced_enrichment icinde doner.
X API v2 Tarzi Public Endpointler
Bu yollar X API v2 endpoint mantigina yakindir ve daima normalize v2 response dondurur. Arkada ayni master queue ve node pull akisi kullanilir; legacy /api/execute/ formati degismez.
GET /2/tweets/{id}GET /2/users/by/username/{username}GET /2/usersGET /2/users/{id}/tweetsAuthX-API-KeyResponseHata formatiGizli alanlarcurl "https://archepolis.xyz/2/tweets/2095223570918166647?self_reference_depth=100&other_reference_depth=100" \ -H "X-API-Key: YOUR_API_KEY"
curl https://archepolis.xyz/2/users/by/username/celalyaziyor \ -H "X-API-Key: YOUR_API_KEY"
curl "https://archepolis.xyz/2/users?usernames=celalyaziyor,SinemasaYT" \ -H "X-API-Key: YOUR_API_KEY"
curl "https://archepolis.xyz/2/users?ids=15828364,783214" \ -H "X-API-Key: YOUR_API_KEY"
curl "https://archepolis.xyz/2/users/44196397/tweets?max_results=100&self_reference_depth=100&other_reference_depth=100" \ -H "X-API-Key: YOUR_API_KEY"
search_fetch
Search akisi X arama operatorlerini destekleyen node capability uzerinden calisir. Node tarafinda bulunan arama urunu/tipi parametresi type veya product olarak iletilebilir.
querycounttype / productresponse_formatcurl -X POST https://archepolis.xyz/api/execute/ \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "search_fetch",
"params": {
"query": "from:Fenerbahce",
"count": 20,
"type": "Latest"
}
}'curl -X POST https://archepolis.xyz/api/execute/ \
-H "X-API-Key: YOUR_API_KEY" \
-H "X-Response-Format: v2" \
-H "Content-Type: application/json" \
-d '{
"type": "search_fetch",
"params": {
"query": "place_country:TR",
"count": 20,
"type": "Latest"
}
}'Tarih Araligi
user_date_range_fetch, yeni tweetleri until sinirina kadar atlar ve pencere icinden count kadar sonuc bulana, since sinirina ulasana veya cursor bitene kadar geriye sayfalar. meta.date_range_scan taranan tarih kapsamini ve range_complete durumunu kanitlar.
curl -X POST https://archepolis.xyz/api/execute/ \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "user_date_range_fetch",
"params": {
"username": "celalyaziyor",
"since": "2026-01-01",
"until": "2026-06-01",
"count": 5
}
}'curl -X POST https://archepolis.xyz/api/jobs/ \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"target_username": "celalyaziyor",
"job_type": "user_date_range_fetch",
"params": {
"since": "2026-01-01",
"until": "2026-06-01",
"count": 20
}
}'Async istekte master mantiksal tipi node'un username_fetch capability'sine cevirir. Tamamlanan isin result_data.meta.date_range_scan alanindaki range_complete, partial, scan_limit_reached ve stop_reason degerleri tarama kapsamını gosterir.
Async Jobs ve Iptal
Burst trafik icin Prefer: respond-async kullanin. Master isi PostgreSQL'e commit ettikten sonra HTTP 202 ve job_id doner. Tek istekte en fazla 500 isi kalici kuyruga yazmak icin POST /api/jobs/batch kullanilir. Varsayilan senkron /api/execute ve TemizVeri formati degismez.
DurumlarTerminalIdempotencyRate-limit progressPartialVerisiz exhaustionretry_countCancelPOST /api/jobs/{job_id}/cancelcurl -X POST https://archepolis.xyz/api/execute/ -H "X-API-Key: YOUR_API_KEY" -H "Prefer: respond-async" -H "Idempotency-Key: customer-request-123" -H "Content-Type: application/json" -d '{"type":"user_tweets_fetch","params":{"username":"celalyaziyor","count":1000}}'curl -X POST https://archepolis.xyz/api/jobs/batch -H "X-API-Key: YOUR_API_KEY" -H "Idempotency-Key: customer-batch-20260920-1" -H "Content-Type: application/json" -d '{"jobs":[{"client_request_id":"row-1","type":"user_tweets_fetch","params":{"username":"celalyaziyor","count":1000}}]}'
curl https://archepolis.xyz/api/job-batches/BATCH_ID -H "X-API-Key: YOUR_API_KEY"Default / Legacy Response
Header verilmezse default response legacy formatta kalir. Bu format TemizVeri mevcut entegrasyonu icin korunur.
successdataincludeserrorsmetaerror{
"success": true,
"data": [
{
"id": "2068612761701974255",
"text": "Tweet text",
"author_id": "15828364",
"created_at": "2026-06-21T08:31:30.000Z",
"conversation_id": "2068612761701974255",
"public_metrics": {
"retweet_count": 1,
"reply_count": 11,
"like_count": 26,
"quote_count": 0,
"bookmark_count": 6,
"impression_count": 1751,
"total_engagement": 44
},
"context_annotations": [],
"query_flag": null,
"edit_history_tweet_ids": ["2068612761701974255"],
"reply_settings": null,
"in_reply_to_user_id": null,
"note_tweet": { "text": "Full note text when X returns it" },
"geo": { "place_id": null, "coordinates": null, "place": null },
"withheld": null,
"source": "<a href=\"https://mobile.twitter.com\" rel=\"nofollow\">Twitter Web App</a>",
"attachments": { "media_keys": [], "poll_ids": [] }
}
],
"includes": {
"tweets": [],
"media": [],
"places": [],
"polls": [],
"users": [
{
"id": "15828364",
"username": "celalyaziyor",
"verified": false,
"pinned_tweet_id": null,
"listed_count": 0,
"public_metrics": {
"followers_count": 2251,
"following_count": 2010,
"tweet_count": 1588,
"listed_count": 0
}
}
]
},
"errors": [],
"collection_date": "2026-06-22T07:36:14.103549Z",
"meta": {
"job_id": "job_example",
"node_id": "node_example",
"duration_ms": 12345,
"token_usage": 2,
"result_count": 2,
"cost": 0.05,
"cached": false,
"collection_date": "2026-06-22T07:36:14.103549Z"
},
"error": null
}V2 Response Opt-in
V2 format header, query/body response_format=v2 veya body response_format: "v2" ile istenebilir. V2 response ust seviyede success alanini kullanmaz.
data[]includes.users[]includes.tweets[]includes.media[]includes.places[]includes.polls[]errors[]metaTweet fieldsReferenced tweetsExpansion depthMetricsDelta/meta fieldsReply/noteGeo/legal/sourceAttachments/entitiesTimeline meta{
"data": [
{
"id": "2068939481344868780",
"text": "Tweet text",
"author_id": "1465736985738416133",
"created_at": "2026-06-22T06:09:46.000Z",
"conversation_id": "2068939481344868780",
"public_metrics": {
"retweet_count": 1,
"reply_count": 0,
"like_count": 0,
"quote_count": 0,
"bookmark_count": 0,
"impression_count": 0,
"total_engagement": 1
},
"referenced_tweets": [{ "type": "retweeted", "id": "2067603736915018160" }],
"context_annotations": [],
"edit_history_tweet_ids": ["2068939481344868780"],
"reply_settings": null,
"in_reply_to_user_id": null,
"note_tweet": { "text": null },
"geo": { "place_id": null, "coordinates": null, "place": null },
"withheld": null,
"source": "<a href=\"http://twitter.com/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>",
"attachments": { "media_keys": [], "poll_ids": [] },
"query_flag": null
}
],
"includes": {
"tweets": [
{
"id": "2067603736915018160",
"text": "Original RT/quote/reply tweet full text",
"author_id": "44196397",
"public_metrics": {
"retweet_count": 4,
"reply_count": 2,
"like_count": 95,
"quote_count": 1,
"bookmark_count": 8,
"impression_count": 4200,
"total_engagement": 110
}
}
],
"users": [
{
"id": "1465736985738416133",
"username": "moononleo",
"verified": false,
"pinned_tweet_id": null,
"listed_count": 0,
"public_metrics": {
"followers_count": 32560,
"following_count": 112,
"tweet_count": 9051,
"listed_count": 0
}
}
],
"media": [],
"places": [],
"polls": []
},
"meta": {
"job_id": "job_example",
"node_id": "node_example",
"result_count": 3,
"collection_date": "2026-06-22T07:36:18.433622Z",
"cost": 0.05,
"response_contract_version": 2,
"timeline": {
"mode": "with_replies",
"exclude": []
},
"longform_enrichment": {
"limited": false,
"time_budget_exceeded": false
},
"referenced_enrichment": {
"enabled": true,
"depth": 1,
"self_reference_depth": 100,
"other_reference_depth": 100,
"depth_mode": "axis",
"owner_author_id": "44196397",
"recursive_expansion": true,
"referenced_total": 1,
"referenced_unique": 1,
"already_in_includes": 0,
"filled_from_current_tweets": 0,
"filled_from_cache": 0,
"fetched_by_detail": 1,
"self_fetched_by_detail": 0,
"other_fetched_by_detail": 1,
"missing_after": 0,
"limited": false,
"time_budget_exceeded": false,
"time_budget_seconds": 125
}
},
"errors": []
}{
"data": [
{
"id": "2068961229268267161",
"text": "Tweet text",
"author_id": "2001222910393126912",
"geo": {
"place_id": "5e02a0f0d91c76d2",
"coordinates": null,
"place": {
"id": "5e02a0f0d91c76d2",
"full_name": "Istanbul, Turkiye",
"country": "Turkiye",
"country_code": "TR",
"place_type": "city",
"name": "Istanbul"
}
},
"public_metrics": {
"retweet_count": 0,
"reply_count": 0,
"like_count": 0,
"quote_count": 0,
"bookmark_count": 0,
"impression_count": 0,
"total_engagement": 0
},
"attachments": { "media_keys": [], "poll_ids": [] },
"context_annotations": []
}
],
"includes": {
"users": [{ "id": "2001222910393126912", "username": "example_user" }],
"media": [],
"places": [
{
"id": "5e02a0f0d91c76d2",
"full_name": "Istanbul, Turkiye",
"country": "Turkiye",
"country_code": "TR"
}
],
"polls": []
},
"meta": {
"job_id": "job_example",
"node_id": "node_example",
"result_count": 3,
"collection_date": "2026-06-22T07:36:22.456261Z",
"cost": 0.05
},
"errors": []
}Error Format
success === true kontrol edilmeli. V2 response icin errors.length === 0 ve meta.result_count birlikte degerlendirilmelidir.UNAUTHORIZEDINVALID_TYPECOUNT_TOO_LARGENODE_TIMEOUTUPSTREAM_UNAVAILABLENO_AVAILABLE_NODEQUOTA_EXCEEDED{
"data": [],
"includes": {
"tweets": [],
"users": [],
"media": [],
"places": [],
"polls": []
},
"meta": {
"job_id": null,
"node_id": null,
"result_count": 0,
"collection_date": "2026-08-12T18:04:34.887267Z",
"cost": 0.0
},
"errors": [
{
"title": "Invalid Request",
"detail": "Unsupported request type",
"type": "https://api.x.com/2/problems/invalid-request",
"parameter": "type"
}
]
}Queue ve Timeout Mantigi
Master job'u once queued olusturur. Node kapasitesi bosaldiginda managed node batch claim ile isi alir. Queue bekleme, node execution ve client sync timeout ayri hesaplanir.
QUEUE_WAIT_TIMEOUTNODE_EXECUTION_TIMEOUTtimeout_secondsPartial checkpointRate-limit progressRate-limit partialRateLimitExhaustedRetryRate-limit progressCancelCLIENT_SYNC_TIMEOUTLate completestop_reasonTimeline sonuRaw 500{
"queue_wait_timeout": 60,
"node_execution_timeout_base": 1500,
"node_execution_timeout_rule": "1500 seconds per started 3000 tweets",
"node_execution_timeout_depth_surcharge": "300 seconds when either split depth is above 50",
"node_execution_timeout_max": 7200,
"timeout_seconds_override": "60..7200",
"client_sync_timeout": 240,
"client_sync_timeout_for_large_user_tweets": 300,
"client_sync_timeout_for_1000_plus_user_tweets": "node timeout + 120 seconds",
"timeout_checkpoint": "completed partial + limited=true + stop_reason=execution_timeout",
"late_complete_policy": "late_completed or late_failed; normal completed status is not overwritten"
}Node Mimarisi
X1
10
worker / concurrency_limit
X2
10
worker / concurrency_limit
Toplam
20
aktif paralel kapasite
ModelBatch polling/api/nodes/job/next?limit=NConcurrencyactive_jobsDuplicate engeliX1 monitorX2 monitorGET /api/nodes/job/next?node_id=node_lzy7gico&token=NODE_TOKEN&limit=15
{
"status": "assigned",
"jobs": [
{
"id": "job_example",
"target_username": "SinemasaYT",
"job_type": "username_fetch",
"priority": 1,
"username": "SinemasaYT",
"count": 5000,
"_node_execution_timeout": 3000,
"_orchestrator_execution_timeout": 3120
}
]
}Kapasite ve Performans
30 paralel local testToplam kapasiteMax global processingX1 maxX2 maxAgir isDuplicate claimDB poolCloudflare 1010Pricing / Cost ve Rate Limit
Formulacost = max((result_count / 1000) * price_per_1000, min_cost)User tweetsSearch3000 tweet example20 search exampleRate limitUsage countersJSON Export
Tamamlanmis job sonuclari archepolis.xyz uzerinden JSON dosyasi olarak indirilebilir. Panelde /dashboard/jobs/:id detay ekranindaki JSON indir butonu ayni endpointi kullanir.
EndpointGET /api/jobs/{job_id}/exportAuthContent-TypeDosya aditweets_{username}_{YYYYMMDD_HHMMSS}.jsonIcerikcurl -L "https://archepolis.xyz/api/jobs/job_fcc2eacd71be64cf/export" \ -H "X-API-Key: YOUR_API_KEY" \ -OJ # Response header: # Content-Disposition: attachment; filename="tweets_celalyaziyor_20260812_180543.json"
TemizVeri Uyumlulugu
X-Response-Format: v2 veya response_format: "v2" gondermedigi surece response shape degismez.Ornek cURL Koleksiyonu
curl -X POST https://archepolis.xyz/api/execute/ \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "user_tweets_fetch",
"params": {
"username": "celalyaziyor",
"count": 2
}
}'curl -X POST https://archepolis.xyz/api/execute/ \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "user_tweets_fetch",
"params": {
"username": "SinemasaYT",
"count": 3000
}
}'curl -X POST https://archepolis.xyz/api/execute/ \
-H "X-API-Key: YOUR_API_KEY" \
-H "X-Response-Format: v2" \
-H "Content-Type: application/json" \
-d '{
"type": "user_tweets_fetch",
"params": {
"username": "moononleo",
"count": 80
}
}'curl -X POST https://archepolis.xyz/api/execute/ \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "search_fetch",
"params": {
"query": "from:Fenerbahce",
"count": 20,
"type": "Latest"
}
}'curl -X POST https://archepolis.xyz/api/execute/ \
-H "X-API-Key: YOUR_API_KEY" \
-H "X-Response-Format: v2" \
-H "Content-Type: application/json" \
-d '{
"type": "search_fetch",
"params": {
"query": "place_country:TR",
"count": 20,
"type": "Latest"
}
}'curl -X POST https://archepolis.xyz/api/execute/ \
-H "X-API-Key: YOUR_API_KEY" \
-H "X-Response-Format: v2" \
-H "Content-Type: application/json" \
-d '{
"type": "user_tweets_fetch",
"params": {
"username": "moononleo",
"count": 80
}
}'curl -X POST https://archepolis.xyz/api/execute/ \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "user_tweets_fetch",
"params": {
"username": "celalyaziyor",
"count": 100,
"since_id": "2068000000000000000",
"query_flag": "daily_sync"
}
}'curl "https://archepolis.xyz/2/tweets/2095223570918166647?self_reference_depth=100&other_reference_depth=100" \ -H "X-API-Key: YOUR_API_KEY"
curl https://archepolis.xyz/2/users/by/username/celalyaziyor \ -H "X-API-Key: YOUR_API_KEY"
curl "https://archepolis.xyz/2/users?usernames=celalyaziyor,SinemasaYT" \ -H "X-API-Key: YOUR_API_KEY"
curl "https://archepolis.xyz/2/users/44196397/tweets?max_results=100&self_reference_depth=100&other_reference_depth=100" \ -H "X-API-Key: YOUR_API_KEY"
curl -L "https://archepolis.xyz/api/jobs/job_fcc2eacd71be64cf/export" \ -H "X-API-Key: YOUR_API_KEY" \ -OJ # Response header: # Content-Disposition: attachment; filename="tweets_celalyaziyor_20260812_180543.json"
curl -X POST https://archepolis.xyz/api/execute/ \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"not_real","params":{}}'curl -X POST https://archepolis.xyz/api/execute/ \
-H "X-API-Key: INVALID_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"user_tweets_fetch","params":{"username":"celalyaziyor","count":2}}'Guvenlik Notlari
API key zorunludur ve server-side saklanmalidir.
Node token public client'a verilmez; node endpointleri managed worker icindir.
DataUsers, cookie, proxy ve upstream auth bilgileri dokumanda veya client kodunda yer almaz.
Client tarafinda Authorization: Bearer yerine X-API-Key header'i kullanilir.
Admin / Dashboard
/dashboard/nodes/dashboard/nodes/provision/dashboard/jobs/dashboard/settings/dashboard/docsWorker kontrolu
X1 10, X2 10 worker ile izlenir.
Queue gozlemi
Processing ve queued sayilari DB state ile takip edilir.
Uyumluluk
Legacy ve V2 formatlar ayridir.
Dogrulama Notu
celalyaziyor count=2, TemizVeri default count=2, V2 moononleo count=80 ve V2 place_country:TR count=20 lokal backend uzerinden HTTP 200 ile dogrulandi. X1 10 ve X2 10 worker kapasitesiyle yapilan routing testlerinde duplicate claim ve raw 500 gorulmedi.