Skip to content
Scrappa Get API key
Secure API Access

Authentication

Use an API key for account-based credits—save the token when Scrappa reveals it once—or pay individual requests through x402 without creating an account.

API Key Authentication

Include your API key in the X-API-KEY header with every request.

curl -X GET "https://scrappa.co/api/search?query=coffee" \
  -H "X-API-KEY: YOUR_API_KEY"

Accountless x402 payments

Every paid API endpoint accepts native USDC on Base through x402. The price is $0.0003 per successful request ($0.30 per 1,000), and failed requests are not charged.

  1. Call the endpoint without X-API-KEY.
  2. Read the x402 v2 challenge from the PAYMENT-REQUIRED header.
  3. Sign the Base USDC batch-settlement voucher and retry with PAYMENT-SIGNATURE.
  4. Read settlement details from PAYMENT-RESPONSE.
curl "https://scrappa.co/api/search-light?query=coffee"

Scrappa advertises the EVM batch-settlement scheme. Register the batch-settlement client from your x402 SDK. See the machine-readable x402 manifest for the complete endpoint catalog and payment configuration.

Getting Your API Key

1

Sign up

Create a free account at scrappa.co

2

Navigate to Dashboard

Go to your account dashboard

3

Create a Key

Open API Keys and create a new key

4

Save the Revealed Token

Copy and store the token before confirming it is saved

5

Open Playground

Use the saved token to run a test request in Playground

API tokens are shown once

After you confirm a token is saved, Scrappa hides it permanently. If you lose the saved token, create a replacement key and update your app before revoking the old one.

Authentication Errors

If your API key is missing or invalid, you'll receive a 401 Unauthenticated response:

{
  "message": "Unauthenticated"
}

Security Best Practices

Never commit your API key to version control
Store API keys in environment variables or secure config files
Rotate your API keys regularly
Use different API keys for dev, staging, and production
Revoke compromised keys immediately and generate new ones

Keep Your API Key Secret

Never expose your API key in client-side code or public repositories. If you suspect your key has been compromised, revoke it immediately from your dashboard.