# Apify Prepaid Token Purchase

> Apify Prepaid Token Purchase is a paid API for AI agents from agi.apify.com, paid per call via x402, $1/call, status unknown (last checked 2026-09-14).

Purchase a prepaid Apify API token by paying USD via x402, returning a time-limited Bearer token with a specified USD balance for use with Apify Actors.

## Facts

- Endpoint: GET https://agi.apify.com/protocols/x402/prepaid-tokens
- Price: $1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/apify-prepaid-token-purchase-c94225fd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pXTwvCgR-Wrmfrs1HfmNF

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability apify-prepaid-token-purchase-c94225fd
```

Example prompt: I need to run some Apify web scraping Actors — can you buy me $5 of prepaid Apify API access in USD so I get a bearer token to use?

## When to prefer this

Use this endpoint when an AI agent needs programmatic, pay-per-use access to the Apify platform for web scraping, crawling, or data extraction Actors, and wants to fund that access via the x402 micropayment protocol rather than using a pre-existing Apify account API key. Ideal for ephemeral, one-off scraping tasks where a pre-funded account is unavailable.

## Known failure modes

- Payment not received or insufficient — token not issued
- Amount below minimum $1 threshold — request rejected
- Invalid currency specified (only 'usd' supported) — validation error
- x402 payment protocol failure — no token returned
- Token expiry reached before use — token invalid on subsequent calls

## How this service works

Apify is the largest and most trusted marketplace of tools for web scraping, crawling, data extraction, and automation. Use these tools, called Actors, to extract structured data from social media, e-commerce sites, search engines, maps, travel sites, or any other website. Turn the open web into a real-time data source for your research, lead generation, and monitoring.

## Output

Returns a JSON object containing: a Bearer token string to use as `Authorization: Bearer <token>` in Apify API calls, the remaining USD balance on the token, and an ISO 8601 expiry datetime indicating when the token becomes invalid.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "required": [
      "amount",
      "currency"
     ],
     "properties": {
      "amount": {
       "type": "string",
       "pattern": "^\\d+(\\.\\d{1,2})?$",
       "description": "Prepaid amount in USD (e.g. \"5\" or \"1.50\"). Minimum $1."
      },
      "currency": {
       "enum": [
        "usd"
       ],
       "type": "string",
       "description": "Payment currency. Only \"usd\" is supported."
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "example"
   ],
   "properties": {
    "example": {
     "type": "object",
     "required": [
      "token",
      "remainingBalanceUsd",
      "expiresAt"
     ],
     "properties": {
      "token": {
       "type": "string",
       "description": "Apify API token; use as Authorization: Bearer <token>."
      },
      "expiresAt": {
       "type": "string",
       "format": "date-time"
      },
      "remainingBalanceUsd": {
       "type": "number"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/apify-prepaid-token-purchase-c94225fd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agi.apify.com](https://www.zero.xyz/host/agi.apify.com/llms.txt)
