# Dataforseo Related Keywords

Blocks for finding semantically related keywords using the DataForSEO Labs API.

## Data For Seo Related Keywords

### What it is

Get related keywords from DataForSEO Labs Google API

### How it works

This block uses the DataForSEO Labs Google Related Keywords API to find semantically related keywords based on a seed keyword. It returns keywords that share similar search intent or topic relevance.

The depth parameter controls the breadth of the search, with higher values returning exponentially more related keywords. Results include search metrics, competition data, and optional SERP/clickstream information.

### Inputs

| Input                      | Description                                                                                                                                             | Type | Required |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | -------- |
| keyword                    | Seed keyword to find related keywords for                                                                                                               | str  | Yes      |
| location\_code             | Location code for targeting (e.g., 2840 for USA)                                                                                                        | int  | No       |
| language\_code             | Language code (e.g., 'en' for English)                                                                                                                  | str  | No       |
| include\_seed\_keyword     | Include the seed keyword in results                                                                                                                     | bool | No       |
| include\_serp\_info        | Include SERP information                                                                                                                                | bool | No       |
| include\_clickstream\_data | Include clickstream metrics                                                                                                                             | bool | No       |
| limit                      | Maximum number of results (up to 3000)                                                                                                                  | int  | No       |
| depth                      | Keyword search depth (0-4). Controls the number of returned keywords: 0=1 keyword, 1=\~8 keywords, 2=\~72 keywords, 3=\~584 keywords, 4=\~4680 keywords | int  | No       |

### Outputs

| Output            | Description                               | Type                  |
| ----------------- | ----------------------------------------- | --------------------- |
| error             | Error message if the operation failed     | str                   |
| related\_keywords | List of related keywords with metrics     | List\[RelatedKeyword] |
| related\_keyword  | A related keyword with metrics            | RelatedKeyword        |
| total\_count      | Total number of related keywords returned | int                   |
| seed\_keyword     | The seed keyword used for the query       | str                   |

### Possible use case

**Topic Clustering**: Group related keywords to build comprehensive content clusters around a topic.

**Semantic SEO**: Discover LSI (latent semantic indexing) keywords to improve content relevance.

**Keyword Expansion**: Expand targeting beyond exact match to capture related search traffic.

***

## Related Keyword Extractor

### What it is

Extract individual fields from a RelatedKeyword object

### How it works

This block extracts individual fields from a RelatedKeyword object returned by the Related Keywords block. It separates the compound object into distinct outputs for workflow integration.

Outputs include the keyword text, search volume, competition score, CPC, keyword difficulty, and any SERP or clickstream data that was requested in the original search.

### Inputs

| Input            | Description                                       | Type           | Required |
| ---------------- | ------------------------------------------------- | -------------- | -------- |
| related\_keyword | The related keyword object to extract fields from | RelatedKeyword | Yes      |

### Outputs

| Output              | Description                           | Type            |
| ------------------- | ------------------------------------- | --------------- |
| error               | Error message if the operation failed | str             |
| keyword             | The related keyword                   | str             |
| search\_volume      | Monthly search volume                 | int             |
| competition         | Competition level (0-1)               | float           |
| cpc                 | Cost per click in USD                 | float           |
| keyword\_difficulty | Keyword difficulty score              | int             |
| serp\_info          | SERP data for the keyword             | Dict\[str, Any] |
| clickstream\_data   | Clickstream data metrics              | Dict\[str, Any] |

### Possible use case

**Keyword Prioritization**: Extract metrics to rank related keywords by opportunity score.

**Content Optimization**: Access keyword difficulty and search volume for content planning decisions.

**Competitive Analysis**: Pull competition and CPC data to assess keyword viability.

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://agpt.co/docs/integrations/block-integrations/related_keywords.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
