API Documentation

Learn the fastest path from free credits to production SERP and URL-to-Markdown workflows with one consistent API.

Step 1

Get 100 free credits

Create your account and generate your API key from the dashboard.

Step 2

Test live requests

Use the playground and copy-paste examples to validate real SERP and URL-to-Markdown calls.

Step 3

Ship to production

Reuse the same endpoints, auth pattern, and response format in your production workflow.

Quick Start

Get started with SERPpost API in minutes:

  1. Create your account and claim 100 free credits
  2. Get your API key from the Dashboard
  3. Make your first SERP or URL Extraction call

Credit Usage

Credits are shared across endpoints, so you only pay for the requests you use. The current endpoint-level rules are:

Endpoint Credit usage Notes
SERP API 1 credit / request Google and Bing live search requests
URL Extraction API 2 credits / request Turns a target URL into clean Markdown-ready output

New endpoints or features may use different credit amounts over time. Use this docs page as the current source of truth for endpoint-level credit usage.

Authentication

SERPpost API uses Bearer Token authentication. Include your API key in the request header:

Authorization: Bearer YOUR_API_KEY

SERP API

Endpoint

POST https://serppost.com/api/search GET https://serppost.com/api/search

Request Parameters

Parameter Type Required Description
s string Yes Search keyword
t string Yes Search engine type: google or bing
d number No Maximum API wait time (milliseconds), default is 5000
p number No Page number, default is 1

Request Example

bash
curl -X POST https://serppost.com/api/search \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "s": "artificial intelligence",
    "t": "google",
    "d": 5000,
    "p": 1
  }'

Response Example

{
  "code": 0,
  "msg": "Success",
  "data": [
    {
      "title": "Search result title",
      "url": "https://example.com",
      "content": "Search result summary content..."
    }
  ]
}

URL Extraction API

Use URL Extraction API when you already know the target page and want clean Markdown from that URL.

Endpoint

POST https://serppost.com/api/url GET https://serppost.com/api/url

Request Parameters

Parameter Type Required Description
s string Yes URL to convert into clean Markdown
t string Yes Type, fixed value: url
w number No Wait time to open URL (milliseconds), default is 3000. Use 5000ms+ for slower JavaScript-heavy pages.
d number No Maximum API wait time (milliseconds), default is 20000
b boolean No Whether to open with browser, default is true

Request Example

bash
curl -X POST https://serppost.com/api/url \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "s": "https://example.com/article",
    "t": "url",
    "w": 3000,
    "d": 20000,
    "b": true
  }'

Response Example

{
  "code": 0,
  "msg": "Success",
  "data": "# Clean Markdown output..."
}

Response Format

All API responses follow a unified JSON format:

{
  "code": 0,        // 0 = success, non-zero = error
  "msg": "",        // Error message (if any)
  "data": ...       // Response data (varies by endpoint)
}

code: 0 - Request successful

code: non-zero - Request failed, check msg field for error details

msg - Contains error description when request fails

data - Contains response data when successful (format varies by endpoint)

Code Examples in Multiple Languages

We provide ready-to-use code examples in 5 popular programming languages. Click the language tabs to switch between examples, and use the copy button to quickly copy the code.

SERP API - Complete Example

bash
curl -X POST https://serppost.com/api/search \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "s": "artificial intelligence",
    "t": "google",
    "d": 5000,
    "p": 1
  }'

URL Extraction API - Complete Example

bash
curl -X POST https://serppost.com/api/url \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "s": "https://example.com/article",
    "t": "url",
    "w": 3000,
    "d": 20000,
    "b": true
  }'

Production checklist

Use this checklist before you move from quick validation to recurring jobs, customer-facing workflows, or internal automation.

  • Keep your API key server-side and send it with Bearer authentication.
  • Build around the shared code / msg / data response envelope once and reuse it across endpoints.
  • Add retry logic, storage, and simple queues around recurring jobs instead of pushing everything through one request path.
  • Tune d and w based on page complexity, especially when URL-to-Markdown targets need browser rendering.
  • Use the Playground for quick validation, then move repeatable jobs into backend scripts or workers.
  • If your test volume already exceeds the free allowance, move to a paid pack so your Request Slots match your real usage.

Docs FAQ

When should I use SERP API vs URL Extraction API?

+

Use SERP API when you need fresh Google or Bing results for discovery, rankings, or monitoring. Use URL Extraction API when you already know the target page and want clean Markdown for research, summarization, or downstream processing.

How do I move from free validation to production?

+

Start with the same endpoints, auth pattern, and response format shown in the docs and Playground. Once your testing needs more credits or more live requests at once, switch to a paid pack so your Request Slots and credit pool match your real usage.

How should I think about timeout and caching settings?

+

Use d to control how long the API should wait before returning and use w when a page needs extra rendering time before URL-to-Markdown conversion. If you run repeated monitoring or extraction jobs, handle caching and storage in your own app so production behavior stays predictable.

What do Request Slots mean in practice?

+

Request Slots tell you how many live requests you can run at once. Standard includes a fixed allocation, while larger paid packs add more live request capacity and can combine across eligible orders as your usage grows.

Technical Support

If you encounter any issues while using our API, please contact us through the following channels:

  • Visit our API Playground for online testing
  • Check the Pricing page for more package information
  • Read our Blog for tutorials and guides
  • Submit a technical support request through the Dashboard