# Google Business Profile: Task Post

> **Beta:** the parser for this endpoint has not yet been checked against a live response. Field shapes may change.

`POST /v1/business/google/my_business_info/task_post`

Queue business profile lookups and collect them with tasks_ready and task_get.

Family: Business API · Mode: Task Post

## Price

Unit: profile

| Mode | Price (USD) |
|---|---|
| Standard queue | $0.00135 |
| Priority queue | $0.00135 |

| Fetch level | Price (USD) |
|---|---|
| standard | $0.00135 |
| rendered | $0.00234 |
| protected | $0.003 |

Billed by the level that returned the profile.

## Description

Post up to 100 tasks; each returns 20100 and a task id. The price is the same on both queues; `priority: 2` runs sooner.

**Billing.** Billed per profile by the fetch level that returned it (see `by_level`). We try the Maps search data first and the place page second; a rendered fetch is used only when the plain fetch carried no place data and your `max_level` allows it. A request where no level gets the profile costs $0. Profiles are cached for 24 h; send `max_age: 0` for a fresh fetch.

**Beta.** We read Google's place data with a parser written from public documentation that hasn't been checked against live responses yet. Field names and shapes are fixed; some values may be null more often than they should be until that check is done.

## Authentication

HTTP Basic auth: any login, with your `dg_` API key as the password. A `Bearer` token header with the key also works.

## Request

Send a JSON array of task objects (up to 100 per request).

| Field | Type | Required | Description |
|---|---|---|---|
| `keyword` | string | yes | The business to look up, up to 700 characters: its name and address (`Summit Running Co. Boulder`), `cid:<number>`, `place_id:<id>`, or a `0x…:0x…` feature id. max 700 |
| `location_name` | string | no | A place to search in, added to a name search, for example `Boulder,Colorado,United States`. |
| `location_code` | integer | no | Echoed in the result's `location_code`. It doesn't change the search: use `location_name` or `location_country_iso`. |
| `location_country_iso` | string | no | Two-letter country to search in. `country_iso_code` is accepted too. default `us` |
| `country_iso_code` | string | no | Same as `location_country_iso`. |
| `language_code` | string | no | Result language, for example `en`. default `en` |
| `language_name` | string | no | Language name, used when `language_code` isn't sent. English, Spanish, French, German, Italian, Portuguese, Dutch and Japanese are recognized; others fall back to English. |
| `auto_upgrade` | boolean | no | Lets the request move to a higher fetch level when the included level can't get the data, billed at the level that delivered it. `false` stops at the Standard level and returns the failure at $0. Also accepts `"true"`, `"false"`, `1` and `0`. default `true` |
| `max_level` | string | no | The highest fetch level Auto-upgrade may use. `rendered` never uses the Protected level. default `protected`; one of `standard`, `rendered`, `protected` |
| `max_cost` | number | no | The most this task may cost, in USD. The wallet check reserves this amount instead of the worst-case price, the request never upgrades past it, and the charge never exceeds it. min 0 |
| `max_age` | integer | no | Accept a cached result up to this many seconds old, 0 to 86,400. `0` always fetches fresh. Default window: 24 h. Leave it out to use it. min 0; max 86400 |
| `priority` | integer | no | Queue for this task: `1` is the standard queue, `2` the priority queue (faster, priced higher). default `1`; one of `1`, `2` |
| `tag` | string | no | Your own label for the task, up to 255 characters. Returned by tasks_ready. max 255 |
| `pingback_url` | string | no | We send a GET to this http(s) URL when the task finishes. `$id` and `$tag` in the URL are replaced with the task id and tag. Only public hosts are called and redirects aren't followed. max 2000 |
| `postback_url` | string | no | We POST the finished task, in the task_get envelope, to this http(s) URL. Only public hosts are called and redirects aren't followed. max 2000 |
| `postback_data` | string | no | Result format sent to `postback_url`. Defaults to `advanced` when `postback_url` is set. one of `regular`, `advanced`, `html` |

### Example request

```bash
curl -X POST "https://api.dataforgaio.com/v1/business/google/my_business_info/task_post" \
  -u "api:$DATAFORGAIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
  {
    "keyword": "Summit Running Co. Boulder",
    "location_name": "Boulder,Colorado,United States",
    "language_code": "en",
    "tag": "store-audit"
  }
]'
```

## Response

| Field | Type | Description |
|---|---|---|
| `version` | string | Response format version, for example `0.1.20261203`. |
| `status_code` | integer | Status of the request as a whole. 20000 when it was accepted; each task has its own `status_code`. |
| `status_message` | string | Plain-language request status. |
| `time` | string | Time the whole request took, for example `1.8410 sec.` |
| `cost` | number | Sum of every task's `cost`, in USD. |
| `tasks_count` | integer | Number of tasks in `tasks`. |
| `tasks_error` | integer | Tasks whose `status_code` is 40000 or higher. |
| `tasks` | array<object> | One entry per task you sent, in the order you sent them. |
| `tasks.id` | string | Task id (a UUID). For task_post, use it with task_get. |
| `tasks.status_code` | integer | Outcome of this task. 20000 means data came back; 20100 means queued. See the status codes table. |
| `tasks.status_message` | string | Plain-language status. For 40501 it names the field that failed. |
| `tasks.time` | string | Time this task took on our side, for example `1.8203 sec.` |
| `tasks.cost` | number | What this task was charged, in USD. 0 when it returned no data. |
| `tasks.result_count` | integer | Number of entries in `result`. |
| `tasks.path` | array<string> | The route this task ran on, split into segments, starting with `v1`. |
| `tasks.data` | object | The task you sent, echoed back. Utility routes echo their query parameters. |
| `tasks.result` | null | Always null for task_post. |
| `tasks.receipt_id` | string\|null | Id of the ledger receipt for this task: what was fetched, at which level, and what was charged. Null for utility routes and failed checks. |
| `tasks.fetch_level` | string\|null | The fetch level that delivered the data: `standard`, `rendered` or `protected`. Null when the route doesn't fetch pages or nothing was fetched. one of `standard`, `rendered`, `protected` |
| `tasks.upgraded` | boolean | True when Auto-upgrade moved the request past the included level (or, for SERP, to the live path) and the charge reflects that. |
| `tasks.upgrade_reason` | string\|null | Why the request upgraded, in our level names and HTTP facts, for example `403 at standard; challenge page at rendered`. Null when it didn't upgrade. |
| `tasks.cache_hit` | boolean | True when the data came from the shared result cache instead of a new fetch. |

### Example response

```json
{
  "version": "0.1.20261203",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "0.4210 sec.",
  "cost": 0,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": "8cbb5b5c-8e15-5c82-9959-45f93cdad009",
      "status_code": 20100,
      "status_message": "Task Created.",
      "time": "0.4210 sec.",
      "cost": 0,
      "result_count": 0,
      "path": [
        "v1",
        "business",
        "google",
        "my_business_info",
        "task_post"
      ],
      "data": {
        "keyword": "Summit Running Co. Boulder",
        "location_name": "Boulder,Colorado,United States",
        "language_code": "en",
        "tag": "store-audit"
      },
      "result": null,
      "receipt_id": null,
      "fetch_level": null,
      "upgraded": false,
      "upgrade_reason": null,
      "cache_hit": false
    }
  ]
}
```

## Errors

| Code | When |
|---|---|
| 40100 | No credentials were sent (HTTP 401). |
| 40101 | The API key is missing, malformed or revoked (HTTP 401). |
| 40202 | Too many requests for this key (HTTP 429, with `Retry-After`). |
| 40503 | The body isn't a JSON array of task objects, or the method isn't POST (HTTP 400 or 405). |
| 40006 | More than 100 tasks in one POST (HTTP 400). |
| 40210 | Wallet balance below the worst case this POST could cost (HTTP 402). |
| 40501 | A task field failed validation. Returned per task; other tasks still run. |

## Migrating

Replaces DataForSEO `/v3/business_data/google/my_business_info/task_post`. Same request body and response envelope; change the base URL and the key.

## Related

- [Google Business Profile: Live](https://dataforgaio.com/docs/api/business-google-my-business-info-live.md): A Google business profile: name, categories, address, phone, website, rating and review counts, hours, coordinates and Google ids.
- [Google Business Profile: Tasks Ready](https://dataforgaio.com/docs/api/business-google-my-business-info-tasks-ready.md): List finished profile lookups you haven't collected yet.
- [Google Business Profile: Tasks Fixed](https://dataforgaio.com/docs/api/business-google-my-business-info-tasks-fixed.md): Same list as tasks_ready, kept for clients that call tasks_fixed.
- [Google Business Profile: Task Get](https://dataforgaio.com/docs/api/business-google-my-business-info-task-get.md): Read one queued profile lookup.
