Idempotency-Key
Sonucu belirsiz POST isteğini tekrarlarken aynı anahtarı kullanın. İkinci kez ücret düşmeden ilk sonuç döner; aynı anahtar farklı içerikle kullanılırsa HTTP 409 alınır.
Yetkili URL’leri göndermek, bakiyenizi okumak, işlemleri listelemek, URL durumlarını incelemek ve hesap istatistiklerini almak için güvenli REST API’yi kullanın.
Index Grab API, kullanıcı paneliyle aynı bakiye, fiyatlandırma, kuyruk ve işlem kayıtlarını kullanan JSON tabanlı bir REST arayüzüdür. API gönderimleri normal arka plan akışına girer ve bağlantıyı açık tutmadan sorgulayabileceğiniz bir referans döndürür.
Kimlik doğrulama Bearer token veya X-API-Key başlığını destekler. API anahtarları giriş yapılan panelde oluşturulur, yalnızca bir kez gösterilir, güvenli özet olarak saklanır ve siz iptal edene veya yenileyene kadar geçerli kalır.
https://indexgrab.com/api/v1Bu kısa teknik özeti ChatGPT, Claude, Gemini veya başka bir kodlama asistanına verin. Yapay zekanın sayfadaki kuralları tahmin etmesine gerek kalmadan gerçek API sözleşmesini açıklar.
# Index Grab REST API v1 - AI integration brief
Use this specification to generate a server-side Index Grab integration. Do not expose the API key in browser code, mobile bundles, repositories, client logs, or responses sent to end users.
Base URL: https://indexgrab.com/api/v1
Protocol: HTTPS REST API with JSON request and response bodies
Authentication: Authorization: Bearer YOUR_API_KEY
Alternative authentication: X-API-Key: YOUR_API_KEY
Currency: TRY
Create a submission:
- Method and path: POST /submissions
- Required headers: Authorization, Content-Type: application/json, and Idempotency-Key
- Idempotency-Key must contain 8-100 safe characters.
- Request body: {"project":"My Website","urls":["https://example.com/page"],"service":"standard"}
- A single URL may be sent with "url"; multiple URLs use the "urls" array.
- Send 1-5000 unique HTTP(S) URLs per submission.
- Use service "standard". Do not select "fast" unless the account explicitly confirms that service is enabled.
- The account's current per-URL price is applied and the required balance is charged when the submission is accepted.
Submission workflow:
- HTTP 202 means accepted and queued, not indexed by a search engine.
- Save data.reference from the response.
- Query GET /submissions/{reference} to read the job and per-URL states.
- Possible job states: queued, processing, completed, partial, failed.
- Poll with a reasonable delay, such as 10-30 seconds, and stop when a terminal state is reached.
- Index Grab processing states do not guarantee search-engine indexing.
Safe retry rule:
- If a POST result is uncertain because of a timeout or connection loss, retry the exact same body with the exact same Idempotency-Key.
- The same key and same body return the original submission without a second charge.
- The same key with different content returns HTTP 409.
Read endpoints:
- GET /me: account, wallet, and API-key metadata
- GET /balance: current balance and TRY currency
- GET /submissions: paginated history; supports status, reference, url, q, from, to, page, and limit
- GET /submissions/{reference}: submission details and paginated URL states
- GET /stats: balance and submission statistics
Response envelope:
- Success: {"success":true,"status":"success","message":"...","data":{},"request_id":"..."}
- Error: {"success":false,"status":"error","message":"...","data":null,"error":{"code":"...","message":"..."},"request_id":"..."}
- Read HTTP status codes as well as the JSON envelope.
Current limits per API key:
- General requests: 120/minute, 3000/hour, 30000/day
- Submission requests: 10/minute
- List page limit: 100; submission-detail URL page limit: 500
- On HTTP 429, respect Retry-After and rate-limit response headers.
Important errors:
- 400 invalid JSON, request, or Idempotency-Key
- 401 missing, invalid, or revoked API key
- 402 insufficient balance
- 409 idempotency or duplicate conflict
- 413 payload too large
- 415 Content-Type is not application/json
- 422 validation error
- 429 rate limit exceeded
- 503 API or submission service temporarily unavailable
Machine-readable contract: https://indexgrab.com/api/v1/openapi.jsonKimlik doğrulamalı tüm endpointler tutarlı JSON zarfı ve rate-limit başlıkları döndürür.
/Sağlık ve erişilebilirlikPublic/meHesap, bakiye ve anahtar bilgisiGerekli/balanceMevcut hesap bakiyesiGerekli/submissionsKuyrukta URL işlemi oluşturGerekli/submissionsİşlem geçmişini filtrele ve sayfalaGerekli/submissions/{reference}İşlem ayrıntısı ve URL durumlarıGerekli/statsBakiye ve işlem istatistikleriGerekliAPI anahtarını sunucu tarafı ortam değişkeninde saklayın. Public tarayıcı JavaScript’ine, mobil uygulama paketlerine, depolara, analitik araçlara veya kullanıcının görebileceği loglara asla eklemeyin.
curl -X POST "https://indexgrab.com/api/v1/submissions" \
-H "Authorization: Bearer $INDEXGRAB_API_KEY" \
-H "Idempotency-Key: job-20260801-001" \
-H "Content-Type: application/json" \
-d '{"project":"My Website","url":"https://example.com/page"}'<?php
$payload = json_encode([
'project' => 'My Website',
'urls' => ['https://example.com/page'],
]);
$ch = curl_init('https://indexgrab.com/api/v1/submissions');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('INDEXGRAB_API_KEY'),
'Idempotency-Key: job-20260801-001',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $payload,
]);
$result = json_decode(curl_exec($ch), true);// Node.js 18+
const response = await fetch('https://indexgrab.com/api/v1/submissions', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.INDEXGRAB_API_KEY}`,
'Idempotency-Key': `job-${crypto.randomUUID()}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
project: 'My Website',
urls: ['https://example.com/page']
})
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());import os, uuid, requests
response = requests.post(
'https://indexgrab.com/api/v1/submissions',
headers={
'Authorization': f'Bearer {os.environ["INDEXGRAB_API_KEY"]}',
'Idempotency-Key': f'job-{uuid.uuid4()}',
},
json={'project': 'My Website', 'urls': ['https://example.com/page']},
timeout=30,
)
response.raise_for_status()
print(response.json())Her URL tamamlanana kadar isteği açık tutmak yerine kuyruklu işlem yapısına göre entegrasyon kurun.
Sonucu belirsiz POST isteğini tekrarlarken aynı anahtarı kullanın. İkinci kez ücret düşmeden ilk sonuç döner; aynı anahtar farklı içerikle kullanılırsa HTTP 409 alınır.
Her kimlik doğrulamalı yanıtta kalan dakika, saat ve gün bütçelerini okuyun. Güncel anahtar limitleri dakika 120, saat 3000 ve gün 30000 istektir.
HTTP 202 işlemin kabul edilip kuyruğa alındığını belirtir. Referansı kaydedip detay endpointini sorgulayın; bu yanıt arama motorunun her URL’yi indekslediği anlamına gelmez.
Anahtarınızı oluşturun, entegrasyon şemasını indirin ve yetkili tek bir URL ile test edin.