Pattern: SEO and competitor research with SE Ranking
- Use it to decide where a small site can rank before writing any pages.
- Get an API key from your SE Ranking account. Keep it in a secret store or an environment variable, never in a note or a chat.
- How the API is laid out:
- The Data API answers research questions: keywords, domains, backlinks. The Project API tracks your own site's rankings over time.
- Each area takes a seed (a keyword or a domain), a market (a country's Google) and a limit on rows.
- Read the current paths in SE Ranking's own API docs at the time you use it. Don't copy them from an old note.
- Cost:
- You pay per row returned, so the limit is what sets the cost.
- Try every new call with a small limit, check the balance, then scale up.
- The balance can update late. Wait a moment before reading it.
- Save every raw response in the work folder, so a second question doesn't pay for the same rows again.
- Keywords:
- The tight modes ("similar", "questions") give on-topic variants with volume, difficulty and cost per click.
- The loose mode ("related") brings back anything loosely connected. It's mostly noise and costs the most. Skip it.
- Use narrow seeds. A broad seed pulls in other industries.
- Close variants often share one volume figure, so don't add them up.
- Check a fixed list's volumes in one bulk call, not one call per keyword.
- Competitors:
- Benchmark against sites the customer can actually buy from, not brands that only rank.
- A domain's keyword pull returns its top keywords by traffic, so a big site's small niche rankings can be missed.
- If the API's own filter fails, pull and filter on your side, but pull only the 5–6 competitors that matter.
- Check a domain's exact address first. A wrong guess comes back empty and still costs a call.
- Backlinks:
- Totals overstate authority. Read the list of linking sites before using a count as a target.
- Expect directories, sister sites, bought press releases and spam. Count only the real links.
- The strong links come from a public resource others cite, like a dataset or a register.
- Scripts:
- The same kind of call can come back in different shapes, say a list one time and an object the next, or empty when there's no data. Handle all three.
- Write each response to disk before parsing it, so a parsing bug doesn't mean paying for the call twice.
- Check search results against AI answers too. Small specialist sites often get quoted by AI well before they rank on Google.