# DataForSEO API: Pay Per Call, No Deposit or Subscription (`lead_king/dataforseo-api`) Actor

Call any DataForSEO live endpoint (SERP, Keywords, Labs, Backlinks, On-Page, AI Optimization, Lighthouse and more) without an account, a $50 deposit or a subscription. Send the endpoint and task array, get the raw JSON back. Pay only per successful call.

- **URL**: https://apify.com/lead_king/dataforseo-api.md
- **Developed by:** [Lead King](https://apify.com/lead_king) (community)
- **Categories:** SEO tools, Developer tools, Integrations
- **Features:** Limited permissions
- **Stats:** 2 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.10 / 1,000 api usage units

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## DataForSEO API: Pay Per Call, No Deposit or Subscription

Call any **DataForSEO live endpoint** straight from Apify. You don't need a DataForSEO account, a $50 minimum deposit or a monthly plan. Send the endpoint path and the task array from the official docs, get the raw JSON response back, and pay only for the calls you make.

### What you can call

Every synchronous **live** endpoint in the [DataForSEO v3 docs](https://docs.dataforseo.com/v3/), including:

| API | Example endpoints |
|---|---|
| SERP | `serp/google/organic/live/advanced`, `serp/google/maps/live/advanced`, `serp/bing/organic/live/regular`, `serp/google/ai_mode/live/advanced` |
| Keywords Data | `keywords_data/google_ads/search_volume/live`, `keywords_data/google_ads/keywords_for_site/live` |
| DataForSEO Labs | `dataforseo_labs/google/keyword_ideas/live`, `dataforseo_labs/google/ranked_keywords/live`, `dataforseo_labs/google/competitors_domain/live` |
| Backlinks | `backlinks/summary/live`, `backlinks/backlinks/live`, `backlinks/referring_domains/live`, `backlinks/bulk_spam_score/live` |
| On-Page | `on_page/instant_pages`, `on_page/lighthouse/live/json`, `on_page/content_parsing/live` |
| AI Optimization | `ai_optimization/chat_gpt/llm_responses/live`, `ai_optimization/llm_mentions/search_mentions/live` |
| Domain Analytics, Content Analysis, Business Data, Merchant | every `.../live` endpoint |

Free **reference lists** work with `GET`: `serp/google/locations`, `serp/google/languages`, `dataforseo_labs/locations_and_languages`, `.../models`, `.../categories`, `.../available_filters`.

**Not supported:** task-based endpoints (`task_post`, `task_get`, `tasks_ready`), full site crawls (`on_page/task_post`) and account endpoints (`appendix/*`). Use the `live` version of the same endpoint instead; it returns the result in the same call.

### How to use

1. Find the endpoint in the [docs](https://docs.dataforseo.com/v3/). The path is the part after `/v3/`.
2. Paste the path into **Endpoint**.
3. Paste the request body from the docs into **Request body**. It's a JSON array of tasks, up to 100 per request.
4. Run. Each request becomes one dataset row containing the full response.

Example input:

```json
{
  "endpoint": "serp/google/organic/live/advanced",
  "payload": [
    { "keyword": "best running shoes", "location_code": 2840, "language_code": "en", "depth": 10 }
  ]
}
```

#### Batch mode

Call several endpoints in one run with **Multiple requests** (up to 1,000 per run, up to 20 in parallel):

```json
{
  "requests": [
    { "path": "dataforseo_labs/google/keyword_ideas/live",
      "body": [{ "keywords": ["coffee"], "location_code": 2840, "language_code": "en", "limit": 100 }] },
    { "path": "backlinks/summary/live", "body": [{ "target": "example.com" }] },
    { "method": "GET", "path": "serp/google/locations/us" }
  ]
}
```

#### Calling from code

Use the Apify API's `run-sync-get-dataset-items` endpoint to get the response in a single HTTP call:

```bash
curl -X POST "https://api.apify.com/v2/acts/lead_king~dataforseo-api/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"endpoint":"backlinks/summary/live","payload":[{"target":"example.com"}]}'
```

### Output

One row per request:

| Field | Meaning |
|---|---|
| `endpoint`, `method`, `request` | What was sent |
| `statusCode`, `statusMessage` | Top-level API status (`20000` = OK). Each task inside `response.tasks` has its own `status_code` too. |
| `chargedUsd` | What this request cost you |
| `response` | The full JSON response, unchanged except that `cost` fields show your price |
| `responseUrl` | Only for responses over 8 MB. The response is saved to the run's key-value store and this field links to it. |
| `error` | Why a request failed or was skipped. Nothing is charged for these. |

### Pricing

You pay per call, based on how much data the endpoint returns. The price is charged as `api-usage` units of $0.0001, and each row's `chargedUsd` shows the exact amount. Typical prices:

| Call | Approx. price |
|---|---|
| Google organic SERP, live advanced, top 10 | $0.004 |
| Backlinks summary for one domain | $0.04 |
| Labs keyword ideas, 100 results | $0.04 |
| Reference lists (locations, languages) | $0.0001 |

- **Failed calls are free.** A request rejected because of invalid parameters is not charged.
- **You stay in control.** Before each call, the Actor checks your run's **maximum cost per run**. If the budget left can't cover the call, the Actor skips it and marks the row instead of overspending.
- A paid Apify plan is required.

### 🔗 Related Actors

More Actors from the same developer:

- **[Contact Enrichment](https://apify.com/lead_king/contact-enrichment)**: use this instead if your list has names + companies, emails or phone numbers (not just LinkedIn URLs) and you want the missing phones and emails.
- **[Leads Finder](https://apify.com/lead_king/leads-finder)**: use this instead if you don't have a list yet and want new leads by location, seniority, department, industry or company size, with emails and US phones.
- **[Email Sender](https://apify.com/lead_king/email-sender)**: use this instead if you want to email your opt-in list from your own domain.

### FAQ

**Do I need a DataForSEO account?** No. Calls run on our account; you pay through Apify.

**Can I use the standard (task) queue?** Not yet. Every endpoint on this Actor is a live endpoint that returns its result in the same call.

**What is the request size limit?** Up to 100 tasks per request and 1,000 requests per run. A response too large to return (tens of MB of JSON) is rejected without a charge; lower `limit` or `depth` and split the call.

# Actor input Schema

## `endpoint` (type: `string`):

Any DataForSEO v3 live endpoint path, as shown in the docs at https://docs.dataforseo.com/v3/. Examples: serp/google/organic/live/advanced, dataforseo_labs/google/keyword_ideas/live, backlinks/summary/live, on_page/instant_pages. The /v3/ prefix and the full URL are both accepted. Leave empty if you use 'Multiple requests' below.

## `method` (type: `string`):

POST for live endpoints. GET only for free reference lists such as serp/google/locations.

## `payload` (type: `array`):

The JSON array of tasks, exactly as the endpoint's docs page shows it. Up to 100 tasks per request. Ignored for GET.

## `requests` (type: `array`):

Optional. Call several endpoints in one run: a list of {"path": "...", "method": "POST", "body": \[ ...tasks ]}. Up to 1000 requests per run. Runs together with the single endpoint above, if one is set.

## `maxConcurrency` (type: `integer`):

How many requests run at the same time.

## Actor input object example

```json
{
  "endpoint": "serp/google/organic/live/advanced",
  "method": "POST",
  "payload": [
    {
      "keyword": "best running shoes",
      "location_code": 2840,
      "language_code": "en",
      "depth": 10
    }
  ],
  "requests": [
    {
      "path": "dataforseo_labs/google/keyword_ideas/live",
      "body": [
        {
          "keywords": [
            "coffee"
          ],
          "location_code": 2840,
          "language_code": "en",
          "limit": 100
        }
      ]
    },
    {
      "path": "backlinks/summary/live",
      "body": [
        {
          "target": "example.com"
        }
      ]
    }
  ],
  "maxConcurrency": 5
}
```

# Actor output Schema

## `results` (type: `string`):

Open the results dataset.

## `resultsConsole` (type: `string`):

Browse the results in the Apify Console.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "endpoint": "serp/google/organic/live/advanced",
    "payload": [
        {
            "keyword": "best running shoes",
            "location_code": 2840,
            "language_code": "en",
            "depth": 10
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lead_king/dataforseo-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "endpoint": "serp/google/organic/live/advanced",
    "payload": [{
            "keyword": "best running shoes",
            "location_code": 2840,
            "language_code": "en",
            "depth": 10,
        }],
}

# Run the Actor and wait for it to finish
run = client.actor("lead_king/dataforseo-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "endpoint": "serp/google/organic/live/advanced",
  "payload": [
    {
      "keyword": "best running shoes",
      "location_code": 2840,
      "language_code": "en",
      "depth": 10
    }
  ]
}' |
apify call lead_king/dataforseo-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lead_king/dataforseo-api"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/f30pruqD7khF9KkCS/builds/t3Pw7MkK0uRkzjrd7/openapi.json
