Skip to main content

Setup

Put them in your environment or .env; Data APIs covers the other ways.

Notes

  • Lookups draw from plan quota pools (daily for keywords, SERPs and metrics, monthly for backlink rows); mangools.limits shows what is left. A spent pool answers 429 with type CreditLimit. Identical requests within 24 hours come from cache and cost nothing.
  • Burst limit: 3 requests per 30 seconds per account and pool; send requests one at a time, at least 11 seconds apart in the same pool. Over it: 429 type RateLimit with retry_after seconds.
  • Locations are Google geotarget ids (2840 is the United States); find them with mangools.locations.search.

Endpoints

Get remaining quotas

  • Answers 200 with nothing left even for a bad or missing token, so it cannot check a key.
  • Draws on the Keyword lookups pool; an identical request within 24 hours is free.

Get keyword difficulty and top results

  • Draws on the SERP lookups pool; an identical request within 24 hours is free.

Get the keywords a site ranks for

  • Draws on the Keyword lookups pool. Rows are capped by the plan’s competitor-keywords-rows (see limits); ordered from worst position to best.

Get organic competitor domains

  • Needs a mangools.domain.keywords lookup for the same url and location_id within the last 24 hours, else 422 No result. Free.
  • Spends the monthly Backlink rows pool by each link returned.
  • Draws on the daily lm-url-metrics pool.

Get a site overview

  • Draws on the daily sp-overview pool. Run it before site.competitors and site.top_content.

Get a site’s competitors

  • Needs a site.overview lookup of the same url in the last 24 hours, else 429 Not in history.

Get a site’s top content

  • Needs a site.overview lookup of the same url in the last 24 hours, else 429 Not in history.