Skip to main content
The examples below demonstrate some of the most common requests you’ll make using the SERPtag REST API. All requests return JSON and require a valid API key.
Base URL https://serptag.com/api
Authentication Replace sk_live_your_key_here with your own API key before running these examples.

Get All Projects

Retrieve every project associated with your SERPtag account.

cURL

JavaScript

Python


Get Project Details

Retrieve detailed information for a single project. Replace 123 with your own project ID.

Get Project Keywords

Retrieve every tracked keyword for a project. Replace 123 with your project ID.

Get Keyword Details

Retrieve information for a single tracked keyword. Replace 456 with your keyword ID.

Get Keyword Ranking History

Retrieve historical ranking data for a keyword. Replace 123 with your project ID and 456 with your keyword ID.

Get Keyword Search Volume History

Retrieve historical search volume data for a keyword.

Get Project Performance Graph

Retrieve project graph data for a specific date range.
Dates must use the format:

Get Top 10 Keywords

Retrieve every keyword currently ranking between positions 1 and 10.

Typical Workflow

Most applications follow a similar process when working with the SERPtag REST API.
For example:
  1. Retrieve your projects using /projects/.
  2. Select a project ID.
  3. Retrieve keywords using /project-keywords-list/{project_id}/.
  4. Use the returned keyword IDs to retrieve rankings, history, and search volume.

Common Use Cases

Custom SEO Dashboards

Build internal dashboards by combining:
  • /projects/
  • /project-keywords-list/
  • /project-keyword-history/

Automated Reports

Generate scheduled SEO reports using:
  • /projects/stats/
  • /project-keyword-graph/
Perfect for weekly and monthly reporting.

Client Reporting

Export ranking data into tools such as:
  • Looker Studio
  • Google Sheets
  • Power BI
  • Internal reporting systems
Useful endpoints include:
  • /keyworddata/
  • /keyword-volume-history/
  • /projects/top-10-keywords/

Data Backups

Export your ranking data by combining:
  • /project-keywords-list/
  • /project-keyword-history/
This makes it easy to archive historical rankings.

Best Practices

For the best experience when integrating with the SERPtag REST API:
  • Store API keys securely using environment variables.
  • Never commit API keys to source control.
  • Cache project and keyword data whenever possible.
  • Handle 401 Unauthorized and 429 Too Many Requests responses gracefully.
  • Use pagination (limit and offset) when retrieving large keyword lists.

Interactive API Documentation

You can also explore the REST API directly from your SERPtag dashboard. Navigate to: Settings → API Details → Documentation The interactive documentation includes:
  • Live endpoint testing
  • Project picker
  • Keyword picker
  • Example requests
  • Example responses

📧 Email: support@serptag.com