Home Arrow Icon Knowledge base Arrow Icon Global Arrow Icon What is the difference between 'phrase_all' and 'phrase_this' in the Keyword Overview API


What is the difference between 'phrase_all' and 'phrase_this' in the Keyword Overview API


The difference between 'phrase_all' and 'phrase_this' in the Keyword Overview API is primarily related to the scope of the data they provide and their usage context within the API for keyword analysis.

phrase_all

- The 'phrase_all' report type in the Keyword Overview API aggregates keyword data across all regional databases.
- It provides a summary of a keyword including its search volume, cost per click (CPC), competition level, and the number of results in all available databases combined.
- This type of report is used when a broad, aggregated view of keyword metrics is desired, without focusing on a specific geographical or regional database.
- This report type consumes 10 API units per line, reflecting the aggregated computational resources needed to compile data from multiple sources.
- The response includes keyword metrics from a global perspective, useful for understanding the keyword's overall presence and competition on a wide scale.

phrase_this

- The 'phrase_this' report type focuses on keyword data from a single specified regional database.
- It provides a keyword summary including volume, CPC, competition, and the number of results but only within the context of the chosen regional database.
- This report type is more detailed for a specific market, allowing users to analyze keywords within a precise geographic location or market.
- 'phrase_this' consumes 50 API units per line, which is higher than 'phrase_all' due to the more detailed and focused data output.
- This type is useful for regional keyword analysis, where understanding local competition, search trends, and volumes is critical for targeted SEO or advertising campaigns.

Usage Comparison

- If the goal is to get a broad, worldwide perspective on a keyword's metrics, 'phrase_all' is the appropriate choice.
- If the goal is to perform detailed, localized keyword research, 'phrase_this' is preferable due to its focus on a single regional database.
- 'phrase_all' does not require specifying a database, whereas 'phrase_this' requires a mandatory regional database parameter.
- 'phrase_all' is efficient for getting keyword insights across multiple markets simultaneously, while 'phrase_this' provides depth within one market.

API Request and Response Examples

- A 'phrase_all' request looks like:
`https://api.semrush.com/?type=phrase_all&key=API_KEY&phrase=seo&export_columns=Dt,Db,Ph,Nq,Cp,Co,Nr`
The response includes data fields such as Date, Database, Keyword, Search Volume, CPC, and Competition metrics across multiple databases.

- A 'phrase_this' request requires specifying the database:
`https://api.semrush.com/?type=phrase_this&key=API_KEY&phrase=seo&export_columns=Ph,Nq,Cp,Co,Nr,Td&database=us`
The response provides data focused on the US regional database with detailed keyword statistics including trends and competition.

Summary

In summary, 'phrase_all' gathers keyword data in an aggregated form from all regional databases for a broad-market overview, while 'phrase_this' targets a specific regional database with more detailed local keyword data, suitable for geographically targeted campaigns. The API usage costs and the level of detail differ, with 'phrase_this' being more resource-intensive but providing deeper insights into a chosen regional market.