{"slug": "build-an-ai-agent-that-pays-for-apify-actors-with-skyfire", "title": "Build an AI agent that pays for Apify Actors with Skyfire", "summary": "Apify now supports Skyfire payments, letting AI agents buy prepaid Apify API tokens without creating an account, logging in, or completing 2FA. An agent issues a signed Skyfire PAY token funded from a Skyfire wallet for a set amount, such as $5, and hands it to Apify AGI (Agent General Interface), which charges it once and returns an Apify API token worth the same amount that works with the Apify MCP server or the Apify API until its balance runs out. Apify frames the integration as a step toward an \"agentic economy\" in which agents pay for the tools they need, demonstrated by an agent that uses Google Maps Scraper and Google Maps Reviews Scraper to research coffee-shop competitors in Austin.", "body_md": "Every time you want your agent to interact with an external online service, you end up repeating the same workflow: create an account, log in, subscribe to a plan, enter payment details, complete 2FA, process the payment, fetch an authorization token, and finally integrate it into your agent.\n\nIf you feel there must be a better way, you're absolutely right. That's why Apify supports [Skyfire payments](https://skyfire.xyz/), enabling AI agents to autonomously run tools from [Apify Store](https://apify.com/store) without requiring traditional user accounts.\n\nWe're paving the path towards [unlocking the agentic economy](https://blog.apify.com/agentic-commerce/) by allowing your agents to pay for the tools they need when accomplishing their tasks.\n\n## A quick primer on Apify\n\nFor those new to Apify: it's a web scraping and automation platform with thousands of ready-made scrapers and tools called **Actors**. Each Actor is a specialized tool that can extract data from websites, automate workflows, or process information.\n\nTraditionally, using Apify requires:\n\n1. Creating an account\n2. Getting an API token\n3. Running Actors\n4. Downloading results\n\nWith agentic payments, your AI agent skips the account. It pays with Skyfire and gets an API token in return, so it can go straight to running Actors.\n\n## What is Skyfire, and how does it work?\n\n[Skyfire](https://skyfire.xyz/) is a payment network designed specifically for AI agents. Think of it as a digital wallet that your agent can use to pay for services autonomously, without requiring human approval for each transaction.\n\nIt provides a unified way to pay for services without needing to have an account with each of them.\n\n### PAY tokens\n\nWhen your agent needs to pay for something, it creates a [PAY token](https://docs.skyfire.xyz/): a signed token for one seller, funded from your Skyfire wallet with a specific amount of money ($5, for example). Think of it as a prepaid gift card that your agent hands over at the checkout.\n\n### Where Apify AGI comes in\n\n[Apify AGI](https://agi.apify.com) (Agent General Interface) is the front door to Apify for AI agents. Your agent hands it the PAY token, AGI charges it once, and returns a prepaid Apify API token worth the same amount. From then on, that token works like any other Apify API token, with the Apify MCP server or the Apify API, until its balance runs out.\n\n## What we're building\n\nImagine you're thinking about opening a coffee shop in Austin. Before you sign a lease, you want to know who the best-rated competitors are and what their customers keep complaining about.\n\nIdeally, you just give an AI agent the business type and the city, and it finds the top places on Google Maps, reads their reviews, and tells you what customers love, what they hate, and where the gaps are, without you having to be part of the whole process.\n\nTraditionally, you'd have to register on Apify and generate an API token before you could use the tools (Actors) programmatically. That's not ideal for an autonomous agent. Instead, the agent uses your Skyfire wallet (*which you may already be using for other services*) to buy its own prepaid Apify token.\n\nThe agent's workflow looks like this:\n\n1. Pay once with a Skyfire PAY token and get a prepaid Apify API token\n2. Find the top-rated places with Google Maps Scraper\n3. Get their newest reviews with Google Maps Reviews Scraper\n4. Summarize the praise and complaints into a short report\n\n### Requirements\n\nThis agent consists of three important parts:\n\n#### 1. Access to tools through MCP\n\nThe easiest way to give an agent Apify's tools is the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp). MCP (Model Context Protocol) is an open standard that allows AI agents to discover and use tools across different services. The prepaid token is how the agent signs in to it.\n\n#### 2. Instructions that give it purpose\n\nA direction in the form of some agent prompt that tells the agent what its scope is, what its goals are, and how it should behave.\n\n#### 3. Powered by an LLM\n\nA language model that will be powering the agent. Making the decisions, calling the tools.\n\nLet's build it step by step.\n\n## Step 1: Buy a prepaid Apify token with Skyfire\n\nYou need a Skyfire buyer account with a funded wallet and its API key from the [Skyfire dashboard](https://app.skyfire.xyz/). Then three requests get you a $5 prepaid Apify token:\n\n```\n# Your Skyfire buyer API key (keep it secret)\nexport SKYFIRE_API_KEY=\"...\"\n\n# 1. Ask Apify AGI for Apify's Skyfire seller ID\nSERVICE=$(curl -s 'https://agi.apify.com/protocols/skyfire/prepaid-tokens?amount=5&currency=usd' | jq -r .sellerServiceId)\n\n# 2. Create a $5 PAY token for Apify, valid for 15 minutes\nPAY_TOKEN=$(curl -s -X POST 'https://api.skyfire.xyz/api/v1/tokens' \\\n  -H \"skyfire-api-key: $SKYFIRE_API_KEY\" \\\n  -H 'Content-Type: application/json' \\\n  -d \"{\\\"type\\\":\\\"pay\\\",\\\"tokenAmount\\\":\\\"5.00\\\",\\\"sellerServiceId\\\":\\\"$SERVICE\\\",\\\"expiresAt\\\":$(( $(date +%s) + 900 ))}\" \\\n  | jq -er .token)\n\n# 3. Exchange it at Apify AGI for a prepaid Apify API token\ncurl -s 'https://agi.apify.com/protocols/skyfire/prepaid-tokens?amount=5&currency=usd' \\\n  -H \"kyapay-token: $PAY_TOKEN\"\n# → {\"token\":\"apify_api_...\",\"remainingBalanceUsd\":5,\"expiresAt\":\"...\"}\n```\n\nAGI charges the PAY token once, so repeating the last request never charges you twice. Save the returned token as `APIFY_TOKEN`:\n\n```\nexport APIFY_TOKEN=\"apify_api_...\"\n```\n\n**Let the agent do it.** These are plain HTTP requests, so an agent with a shell and your Skyfire API key can run them on its own. Point it to\n\n[agi.apify.com/AGENTS.md](https://agi.apify.com/AGENTS.md), which has the instructions written for agents.\n\n## Step 2: Connect the Apify MCP server\n\nYou'll need an MCP client, such as [OpenCode](https://opencode.ai/), [Hermes Agent](https://hermes-agent.nousresearch.com/), or any other client that supports remote MCP servers, connected to the Apify MCP server with your prepaid token. We'll use OpenCode in this example:\n\n1. [Install OpenCode](https://opencode.ai/docs/#install) (if you haven't already).\n\n```\ncurl -fsSL https://opencode.ai/install | bash\n```\n\n1. [Configure OpenCode](https://opencode.ai/docs/config/#locations) with the following JSON configuration in`opencode.json` in your working directory:\n\n```\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"mcp\": {\n    \"servers\": {\n      \"apify\": {\n        \"type\": \"remote\",\n        \"url\": \"https://mcp.apify.com\",\n        \"oauth\": false,\n        \"headers\": {\n          \"Authorization\": \"Bearer {env:APIFY_TOKEN}\"\n        }\n      }\n    }\n  }\n}\n```\n\n**Important:** The prepaid token goes in the\n\n`Authorization` header, just like a regular Apify API token. OpenCode reads it from the `APIFY_TOKEN` environment variable, so it never sits in the config file.\n## Step 3: Give it a purpose\n\nSince we're building a real-world agent that does market research on its own, we'll create a \"Local Market Research Agent\" that finds the best-rated businesses in a city and explains what their customers think.\n\nIt uses two popular Actors from Apify Store: [Google Maps Scraper](https://apify.com/compass/crawler-google-places) to find the places and [Google Maps Reviews Scraper](https://apify.com/compass/google-maps-reviews-scraper) to read their reviews.\n\n### The agent prompt\n\nHere's the system prompt that guides the agent. Save it as `AGENTS.md` in your working directory, and OpenCode will use it automatically:\n\n```\nYou are a local market research agent. Your job is to find the best-rated local\nbusinesses in an area and explain what their customers love and complain about.\n\n## Workflow\n\n1. **Find places**: Use Google Maps Scraper (compass/crawler-google-places) to find\n   businesses matching the user's request in the given city. Pick the top 10 by\n   rating and number of reviews.\n\n2. **Read reviews**: Use Google Maps Reviews Scraper (compass/Google-Maps-Reviews-Scraper)\n   to get the 50 newest reviews of each of those places. Set personalData to false.\n\n3. **Analyze & report**: Summarize the most common praise and complaints across all\n   places, with one line per place and its Google Maps URL.\n\n## Important notes\n\n- Run each Actor once per task and pass all places in a single run to keep costs down\n- Don't collect or repeat reviewers' personal data\n- Back every finding with examples from actual reviews\n- Structure the report as: top places, common praise, common complaints, and gaps a\n  new business could fill\n```\n\n## Step 4: Run your agent\n\nThe last step is to open the client, choose the LLM that will be in charge, and give it a task:\n\n1. Launch **OpenCode** in your project directory:\n\n```\nopencode\n```\n\n1. [Pick the LLM](https://opencode.ai/docs/models) that will drive your agent:\n\n```\n/models\n```\n\n1. Give your agent a task:\n\n```\nFind the 10 best-rated coffee shops in Austin, TX and tell me what customers complain about most\n```\n\n## What happens behind the scenes\n\nWhen you give your agent this task, it finds Google Maps Scraper through the Apify MCP server and runs it for coffee shops in Austin, TX.\n\nIt runs the Actor right away. There's no payment step in the middle of the task: the prepaid token already covers it, and each run is drawn from the token's balance.\n\nIt then passes the top 10 places to Google Maps Reviews Scraper, reads their newest reviews, and writes the report: which places customers rate best, what they praise, and what they complain about most.\n\nYou can check what's left on the token at any time:\n\n```\ncurl -s https://agi.apify.com/prepaid-tokens/balance -H \"Authorization: Bearer $APIFY_TOKEN\"\n# → {\"remainingBalanceUsd\":4.12,\"expiresAt\":\"...\"}\n```\n\n**Good to know.** The token balance is a hard spending cap, so the agent can never spend more than you paid. The smallest token is $1, it expires after 14 days, and unused balance isn't refunded. The token runs any Actor that uses\n\n[limited permissions](https://docs.apify.com/platform/actors/development/permissions). Check\n\n[agi.apify.com](https://agi.apify.com)for the current terms.\n\n## Not just MCP\n\nThe prepaid token is a regular Apify API token, so the same token works with the [Apify API](https://docs.apify.com/api/v2). For example, to run Google Maps Scraper and get its results in one call:\n\n```\ncurl -s -X POST \\\n  -H \"Authorization: Bearer $APIFY_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"searchStringsArray\": [\"coffee shop\"], \"locationQuery\": \"Austin, TX, USA\", \"maxCrawledPlacesPerSearch\": 10}' \\\n  \"https://api.apify.com/v2/acts/compass~crawler-google-places/run-sync-get-dataset-items\"\n```\n\n## What's coming next?\n\nIf you think this all feels like a traditional workflow, you are right and wrong at the same time. It is the same workflow in the sense that you still need a token to access services.\n\nBut the twist is that we removed the need for a human in the loop, which allows anyone or anything to pay for services, including web data and the large collection of scrapers and automation tools that Apify provides.\n\nThis opens the door to a new ecosystem of tools and a new type of economy, one not driven by humans but by autonomous agents. This is just the beginning of the agentic economy at Apify.\n\n### More ways to pay\n\nSkyfire isn't the only option. Apify AGI sells the same prepaid token for:\n\n- [x402](https://www.x402.org/) : stablecoins on Base or Solana\n- [MPP](https://mpp.dev/) : stablecoins on Tempo or Solana\n- A card: a one-time card payment, for example from a [Link](https://link.com/agents) wallet\n\nWhichever your agent's wallet supports, the result is the same prepaid Apify token. See [agi.apify.com](https://agi.apify.com) for all of them.\n\n[Get web data](https://console.apify.com/sign-up)\n\n*The future of web scraping is autonomous. With agentic payments, your AI agents can now discover, execute, and pay for data extraction without human intervention. We can't wait to see what you build.*", "url": "https://wpnews.pro/news/build-an-ai-agent-that-pays-for-apify-actors-with-skyfire", "canonical_source": "https://blog.apify.com/agentic-payments-skyfire/", "published_at": "2026-11-24 14:19:00+00:00", "updated_at": "2026-11-24 14:48:25.446682+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-tools", "ai-products"], "entities": ["Apify", "Skyfire", "Apify AGI", "Apify Store", "Google Maps Scraper", "Google Maps Reviews Scraper", "Model Context Protocol"], "also_reported_by": [], "takeaway": "Agents can obtain an Apify API token by presenting a Skyfire PAY token funded for a specific amount (e.g. $5) to Apify AGI, skipping account creation and 2FA, then use that prepaid token with the Apify MCP server or API until the balance is exhausted.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/build-an-ai-agent-that-pays-for-apify-actors-with-skyfire", "markdown": "https://wpnews.pro/news/build-an-ai-agent-that-pays-for-apify-actors-with-skyfire.md", "text": "https://wpnews.pro/news/build-an-ai-agent-that-pays-for-apify-actors-with-skyfire.txt", "jsonld": "https://wpnews.pro/news/build-an-ai-agent-that-pays-for-apify-actors-with-skyfire.jsonld"}}