AxioAPI

Keyword data API: get search volume and CPC in code

2026-10-08

Keyword research tools are built for people, but you often need the same numbers inside your own product or script. A keyword data API returns monthly search volume, CPC and competition as JSON, so you can rank a list of keywords in code.

Get volume, CPC and competition

POST /api/v1/seo/keywords/metrics takes a keywords array with up to 10 phrases and a country code, and returns one row per keyword. Volume depends on the country, so use the market you want to rank in; the country is us unless you set another one.

curl -s -X POST "https://axioapi.com/api/v1/seo/keywords/metrics" \
  -H "Authorization: Bearer $AXIOAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keywords": ["api gateway", "proxy scraper"], "country": "us"}'

Sort a list in Python

The script sends a batch, sorts the rows by search volume and prints the volume and CPC of each keyword. For more than 10 keywords, split the list into batches of 10.

import os
import requests

API = "https://axioapi.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['AXIOAPI_KEY']}", "Accept": "application/json"}


def keyword_metrics(keywords, country="us"):
    res = requests.post(f"{API}/seo/keywords/metrics", headers=HEADERS,
                        json={"keywords": keywords, "country": country}, timeout=60)
    res.raise_for_status()
    return res.json()["data"]


rows = keyword_metrics(["api gateway", "proxy scraper"], "us")
for row in sorted(rows, key=lambda r: r["search_volume"] or 0, reverse=True):
    print(f"{row['keyword']}: {row['search_volume']} searches/month, CPC ${row['cpc']}")

Expand a seed keyword

Two more endpoints widen the list: suggestions returns autocomplete phrases for a prefix and ideas returns long-tail variations of a seed keyword. Feed the results back into the metrics call to see which ones are worth targeting.

# Autocomplete suggestions for a prefix
curl -s "https://axioapi.com/api/v1/seo/keywords/suggestions?q=laravel%20api&country=us&lang=en" \
  -H "Authorization: Bearer $AXIOAPI_KEY"

# Long-tail ideas for a seed keyword
curl -s -X POST "https://axioapi.com/api/v1/seo/keywords/ideas" \
  -H "Authorization: Bearer $AXIOAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keyword": "web scraping", "country": "us"}'

Choose keywords that can rank

  • Volume is an estimate and varies between data sources. Missing metrics are returned empty, not guessed.
  • A high CPC suggests commercial intent, while a high competition value means more advertisers bid on it.
  • Check the search results yourself before you commit: the page type that already ranks tells you which page you need to publish.

Cost and limits

Each request is billed once, no matter how many keywords it contains, so sending 10 keywords in one call is cheaper than 10 separate calls. Check the SEO API page for the current endpoint prices.