# AnswerThePublic

> Research what people search for around a keyword and pull AnswerThePublic's reports into your work.

App · 8 actions. Web page: https://docs.lodol.com/docs/integrations/answerthepublic

## Actions

### Ask AI about a search

Ask ChatGPT or Gemini one of a search's prompts, or your own question about its results. Uses plan credits.

**Inputs**

- Search (`report`, text, required): The search's ID (parent_search_id), or one source's search ID.
- Prompt ID (`ai_prompt_id`, text): A prompt's ID from List AI prompts. Give this or a question.
- Question (`question`, text): Your own question about the search's results. Give this or a prompt ID.

**Outputs**

- `data` (object): The response from AnswerThePublic.

**Example output**

```json
{
  "data": {
    "data": {
      "task_id": "c0ffee00-1234-4abc-9def-000000000003"
    },
    "message": "OK"
  }
}
```

### Create search

Research a keyword on one source or all of them. Uses a search credit unless the same search ran in the last 24 hours.

**Inputs**

- Keyword (`keyword`, text, required): The word or phrase to research.
- Language (`language`, text, required): A two-letter language code, such as en, es or pt.
- Region (`region`, text, required): A two-letter region code, such as us, gb or de.
- Source (`provider`, text): Search only this source. Leave empty to search them all. One of: `gweb` (Google), `youtube`, `bing`, `amazon`, `tiktok`, `instagram`, `chatgpt`, `gemini`.

**Outputs**

- `data` (object): The response from AnswerThePublic.

**Example output**

```json
{
  "data": {
    "data": {
      "created_at": "2026-11-20T10:00:00Z",
      "keyword": "marketing automation",
      "language": "en",
      "parent_search_id": "4b0f8e4e-8f5c-4f6e-9d55-2f0c7d1b9a11",
      "region": "us",
      "searches": [
        {
          "id": "9c3e1f2a-7b6d-4c5e-8f9a-0b1c2d3e4f5a",
          "provider": "gweb",
          "status": "completed"
        }
      ],
      "status": "completed",
      "updated_at": "2026-11-20T10:02:30Z",
      "workspace_id": "a2f1c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
    },
    "message": "Created"
  }
}
```

### Get account

Get your workspace, plan and how many searches and reads are left.

**Inputs**: None.

**Outputs**

- `data` (object): The response from AnswerThePublic.

**Example output**

```json
{
  "data": {
    "data": {
      "api_version": "beta",
      "plan_slug": "business-month-4",
      "quota": {
        "reads": {
          "limit": 2000,
          "period": "day",
          "remaining": 1988,
          "resets_at": "2026-11-21T00:00:00Z",
          "used": 12
        },
        "searches": {
          "limit": 200,
          "period": "cycle",
          "remaining": 150,
          "resets_at": "2026-12-01T00:00:00Z"
        }
      },
      "token": {
        "created_at": "2026-11-20T09:00:00Z",
        "expires_at": "2027-11-20T00:00:00Z",
        "id": "7e8f9a0b-0000-4000-8000-000000000002",
        "name": "Lodol",
        "prefix": "atp_pk_live_a1b2c3",
        "scopes": [
          "searches:read",
          "reports:read"
        ]
      },
      "user": {
        "email": "you@example.com",
        "first_name": "Ada",
        "id": "1d2c3b4a-0000-4000-8000-000000000001",
        "last_name": "Lovelace"
      },
      "workspace": {
        "atp_tier": "t2",
        "id": "a2f1c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
        "name": "Acme",
        "slug": "acme"
      }
    },
    "message": "OK"
  }
}
```

### Get AI answer

Get the answer to a question asked with Ask AI about a search, once it is ready. An answer can be collected only once.

**Inputs**

- Search (`report`, text, required): The search's ID (parent_search_id), or one source's search ID.
- Task ID (`task_id`, text, required): The task ID that Ask AI about a search returned.

**Outputs**

- `data` (object): The response from AnswerThePublic.

**Example output**

```json
{
  "data": {
    "data": {
      "ai_answer": {},
      "status": "completed"
    },
    "message": "OK"
  }
}
```

### Get report

Get a finished search's keywords with their volume, cost per click, intent and sentiment, filtered and sorted as you choose.

**Inputs**

- Search (`report`, text, required): The search's ID (parent_search_id), or one source's search ID.
- Sources (`providers`, list): Only these sources. Leave empty for all. One or more of: `gweb` (Google), `youtube`, `bing`, `amazon`, `tiktok`, `instagram`, `chatgpt`, `gemini`.
- Grouped (`grouped`, true/false): On to group keywords by source and category as the dashboard does, off for one flat list.
- Source bucket (`source_name`, text): Only one bucket, such as questions, prepositions, comparisons or alphabeticals.
- Category (`category`, text): Only one category, such as a question word like how or why.
- Keyword contains (`search_string`, text): Only keywords containing this.
- Intents (`intents`, list): Only keywords with these intents, such as informational.
- Sentiments (`sentiments`, list): Only keywords with these sentiments, such as positive.
- Only new (`only_new`, true/false): On for only keywords that weren't in the search's previous results.
- Minimum volume (`range_start_volume`, number): Only keywords searched at least this often a month.
- Maximum volume (`range_end_volume`, number): Only keywords searched at most this often a month.
- Minimum cost per click (`range_start_cost`, number): Only keywords costing at least this per click.
- Maximum cost per click (`range_end_cost`, number): Only keywords costing at most this per click.
- Sort by (`sort_by`, text): The field to sort by, such as volume, cost_per_click or keyword.
- Order (`sort_order`, text): Highest or lowest first. One of: `desc` (Highest first), `asc` (Lowest first).
- Page (`page`, number): Which page to read, starting at 1. From 1 to 1000.
- Page size (`per_page`, number): How many keywords a page holds, up to 500. AnswerThePublic's default is 100. From 1 to 500.

**Outputs**

- `data` (object): The response from AnswerThePublic.

**Example output**

```json
{
  "data": {
    "data": {
      "results": {
        "withheld_by_modifier": [
          {
            "count": 4,
            "modifier_name": "how",
            "source_name": "questions"
          }
        ],
        "withheld_results_count": 4
      }
    },
    "message": "OK"
  }
}
```

### Get search

Get one source's search and its suggestions, or check whether it has finished.

**Inputs**

- Search ID (`search`, text, required): One source's search ID, from a search's searches list.
- Page (`page`, number): Which page to read, starting at 1. From 1 to 1000.
- Page size (`per_page`, number): How many suggestions a page holds, up to 500. AnswerThePublic's default is 100. From 1 to 500.

**Outputs**

- `data` (object): The response from AnswerThePublic.

**Example output**

```json
{
  "data": {
    "data": {
      "search": {
        "created_at": "2026-11-20T10:00:00Z",
        "id": "9c3e1f2a-7b6d-4c5e-8f9a-0b1c2d3e4f5a",
        "keyword": "marketing automation",
        "language": "en",
        "parent_search_id": "4b0f8e4e-8f5c-4f6e-9d55-2f0c7d1b9a11",
        "provider": "gweb",
        "region": "us",
        "slug": "marketing-automation",
        "updated_at": "2026-11-20T10:02:30Z",
        "workspace_id": "a2f1c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
      },
      "snapshot": {
        "results": {
          "withheld_by_modifier": [
            {
              "count": 4,
              "modifier_name": "how",
              "source_name": "questions"
            }
          ],
          "withheld_results_count": 4
        }
      },
      "status": "completed"
    },
    "message": "OK"
  }
}
```

### List AI prompts

List the AI prompts of a ChatGPT or Gemini search. The first call for a search writes them and uses plan credits.

**Inputs**

- Search (`report`, text, required): The search's ID (parent_search_id), or one source's search ID.
- Page (`page`, number): Which page to read, starting at 1. From 1 to 1000.
- Intents (`intents`, list): Only prompts with these intents, such as informational.

**Outputs**

- `data` (object): The response from AnswerThePublic.

**Example output**

```json
{
  "data": {
    "data": {
      "page_info": {
        "next_page": 2,
        "page": 1,
        "per_page": 10,
        "total_pages": 3
      },
      "prompts": [
        {}
      ],
      "withheld_results_count": 0
    },
    "message": "OK"
  }
}
```

### List searches

List one page of your workspace's searches, most recently updated first.

**Inputs**

- Region (`region`, text): A two-letter region code, such as us, gb or de.
- Language (`language`, text): A two-letter language code, such as en, es or pt.
- Source (`provider`, text): Only searches that ran on this source. One of: `gweb` (Google), `youtube`, `bing`, `amazon`, `tiktok`, `instagram`, `chatgpt`, `gemini`.
- Keyword contains (`q`, text): Only searches whose keyword matches this.
- Alphabetical order (`sort_by`, text): Sort by keyword instead of by last update. One of: `asc` (A to Z), `desc` (Z to A).
- Page (`page`, number): Which page to read, starting at 1. From 1 to 1000.
- Page size (`per_page`, number): How many searches a page holds, up to 500. AnswerThePublic's default is 10. From 1 to 500.

**Outputs**

- `data` (object): The response from AnswerThePublic.

**Example output**

```json
{
  "data": {
    "data": {
      "pagination": {
        "count": 42,
        "limit": 10,
        "next": 2,
        "page": 1,
        "pages": 5
      },
      "parent_searches": [
        {
          "created_at": "2026-11-20T10:00:00Z",
          "keyword": "marketing automation",
          "language": "en",
          "parent_search_id": "4b0f8e4e-8f5c-4f6e-9d55-2f0c7d1b9a11",
          "region": "us",
          "searches": [
            {
              "id": "9c3e1f2a-7b6d-4c5e-8f9a-0b1c2d3e4f5a",
              "provider": "gweb",
              "status": "completed"
            }
          ],
          "status": "completed",
          "updated_at": "2026-11-20T10:02:30Z",
          "workspace_id": "a2f1c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
        }
      ]
    },
    "message": "OK"
  }
}
```
