Create a destination
Store a bucket once; jobs and schedules then reference its id.
/v1/async/destinationsCredentials are encrypted at rest by the service and are never returned. For gcs, the HMAC key is used through GCS's S3-compatibility endpoint.
Request
https://api.scrapercompany.com/v1/async/destinationsAuthenticate with your API key in the x-api-key header (see Authentication).
Body
JSON object. Unknown fields are rejected with 422.
- namestringrequiredmin length 1, max length 80
Display name, unique per account.
- kindstringdefault
s3s3for AWS/R2/B2/MinIO and any S3-compatible store;gcsfor a Google Cloud Storage HMAC key (its S3-compatibility endpoint).One of
s3gcs - bucketstringrequiredmin length 3, max length 63
Bucket name. It must already exist and the credentials must be allowed to write to it.
- prefixstring | nullmax length 200
Optional key prefix inside the bucket, for example
scrapercompany. A job writes<prefix>/async-jobs/<date>/<job_id>/manifest.jsonand one gzipped object per item underitems/. - regionstring | nullmax length 40
S3 region (ignored for GCS, which uses
auto). - endpointstring | nullmax length 300
Optional custom S3 endpoint (R2, B2, MinIO). It must be public HTTPS: the hostname is resolved when the destination is saved and again on every upload, and private, loopback, link-local, CGNAT and cloud-metadata addresses are rejected, including after a redirect. GCS always uses
https://storage.googleapis.com. - path_stylebooleandefault
falseUse path-style addressing, needed by some S3-compatible stores (MinIO, B2). GCS always uses virtual-host style.
- formatstringdefault
jsonHow each item object is encoded.
jsonandjsonlare one gzipped JSON document per item;csvis one gzipped row.manifest.jsonlists the object keys.One of
jsonjsonlcsv - access_key_idstringrequiredmin length 1, max length 256
S3 access key id, or a GCS HMAC key id.
- secret_access_keystringrequiredmin length 1, max length 512
S3 secret access key, or a GCS HMAC secret. Stored encrypted and never returned.
Example request
curl -X POST "https://api.scrapercompany.com/v1/async/destinations" \
-H "x-api-key: $SCRAPERCOMPANY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"access_key_id": "AKIAEXAMPLE123456",
"bucket": "acme-rate-archive",
"format": "jsonl",
"kind": "s3",
"name": "nightly-comp-set",
"prefix": "scrapercompany",
"region": "us-east-1",
"secret_access_key": "replace-with-the-secret"
}'Response
201 — Saved destination; the secret is never returned.
{
"id": "asyncdst_0123456789abcdef0123456789abcdef",
"name": "nightly-comp-set",
"kind": "s3",
"bucket": "acme-rate-archive",
"prefix": "scrapercompany",
"region": "us-east-1",
"endpoint": "https://s3.us-east-1.amazonaws.com",
"path_style": false,
"format": "jsonl",
"access_key_id": "...3456",
"secret_configured": true,
"created_at": "2026-10-22T09:00:00Z",
"updated_at": "2026-10-22T09:00:00Z"
}Errors
Errors return a JSON body with a detail field. Failed requests are not charged. See Errors for the full list and retry advice.
| Status | Meaning | Retry? |
|---|---|---|
401Unauthorized | Missing or invalid API key. {"detail":"missing or invalid API key"} | No, fix the request |
409Conflict | The Idempotency-Key was already used for a different request body. {"detail":"Idempotency-Key was already used for a different request"} | No, fix the request |
422Unprocessable Content | Request validation failed. {"detail":[{"loc":["body","name"],"msg":"Field required","type":"missing"}]} | No, fix the request |
429Too Many Requests | Too many requests: the key's requests-per-minute limit was exceeded, or (in {"detail":"rate limit 60/min exceeded"} | Yes, with backoff |
503Service Unavailable | Temporarily unavailable: a dependency of this endpoint is down, or the upstream source changed its contract. Retry later. {"detail":"database unavailable: OperationalError"} | Yes, with backoff |
Try it
Async jobs, destinations, schedules and the callback secret are not changed from the docs; call this with your own key.
- Export your key:
export SCRAPERCOMPANY_API_KEY=sk_...(no key yet? start a free trial). - Copy the cURL example above and run it in a terminal.
Questions about this page?
Send the page link and your question, and the team will answer.