POST のみ

API ドキュメント

Google Search、Images、News、Videos、Maps Search、Maps Detail をエンドポイント単位で確認できます。

Base URL
https://test-api.serpbase.dev
認証ヘッダー
X-API-Key
課金
成功リクエストごとに 1 または 2 クレジット
認証

POST JSON リクエストを送り、X-API-Key ヘッダーで API key を渡します。成功時も失敗時も JSON を返します。

elapsed_ms

共通レスポンス構造

credits_charged

成功リクエストごとに 1 または 2 クレジット

request_id

support trace id

最小リクエスト
bash
curl -X POST https://test-api.serpbase.dev/google/search \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key" \
  -d '{"q":"openai realtime api","hl":"en","gl":"us"}'
共通レスポンス構造

成功レスポンスは同じトップレベルメタデータを返します。エンドポイント固有のデータは organic、images、news、videos、places、place などに入ります。

status
必須
number

必須

ビジネスステータスコード。0 は成功です。

request_id
必須
string

必須

サポート、リトライ、ログ照合に使うリクエスト ID。

elapsed_ms
必須
number

必須

ゲートウェイが観測したレイテンシ。単位はミリ秒。

credits_charged
必須
number

必須

返金ロジック適用後に課金されたクレジット数。

search_type
必須
string

必須

解決済みタイプ: search、images、news、videos、maps_search、maps_detail。

エンドポイント
POST
/google/images

画像検索

画像 URL、サムネイル、参照元ページ、ドメイン。

type
images
result
images
課金
2 credits
パラメータ
q
必須
string

必須

検索クエリ文字列。

hl
任意
string

任意

言語コード。デフォルトは en。

gl
任意
string

任意

国コード。デフォルトは us。

page
任意
number

任意

1 始まりのページ番号。デフォルトは 1。

レスポンスフィールド
query
必須
string

必須

リクエストから正規化されたクエリ。

page
必須
number

必須

現在の 1 始まりのページ番号。

images
任意
ImageResult[]

When image results are parsed.

Google Images results.

ImageResult 結果アイテム構造
rank
必須
number

必須

このレスポンス内の 1 始まりの順位。

position
任意
number

利用可能な場合は rank のエイリアス。

position を期待するクライアント向けの正規化順位。

title
任意
string

画像タイトルまたは alt テキストを解析できる場合。

結果タイトル。

link
必須
string

必須

parser が返す主リンク。

url
任意
string

結果リンクを正規化できる場合に返ります。

正規化されたターゲット URL。通常は link と同じです。

source_url
任意
string

Google のリダイレクト元 URL がある場合のみ返ります。

デバッグと出所確認のために保持される元の Google URL。

display_url
任意
string

Google の表示テキストまたはドメインを取得できる場合。

表示 URL またはソースドメイン。

image_url
必須
string

必須

Full image URL.

thumbnail_url
任意
string

Google がサムネイルを公開している場合。

サムネイル URL。

thumbnail
任意
string

利用可能な場合は thumbnail_url のエイリアス。

正規化されたサムネイルエイリアス。

source
任意
string

When source text is parsed.

Image source label.

domain
任意
string

When source page domain can be derived.

Source page domain.

bash
curl -X POST https://test-api.serpbase.dev/google/images \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key" \
  -d '{
    "q": "iphone 15 pro blue",
    "hl": "en",
    "gl": "us",
    "page": 1
  }'
注記

ビジュアル検索、商品監視、画像ソース発見。

Some Google Images payload shapes expose rank/link but not every normalized alias. Treat url, display_url, source_url, position, and thumbnail as optional.

POST
/google/news

ニュース検索

配信元、時刻テキスト、スニペット、サムネイル付きニュース記事。

type
news
result
news
課金
1 credits
パラメータ
q
必須
string

必須

検索クエリ文字列。

hl
任意
string

任意

言語コード。デフォルトは en。

gl
任意
string

任意

国コード。デフォルトは us。

page
任意
number

任意

1 始まりのページ番号。デフォルトは 1。

レスポンスフィールド
query
必須
string

必須

リクエストから正規化されたクエリ。

page
必須
number

必須

現在の 1 始まりのページ番号。

news
任意
NewsResult[]

When news results are parsed.

Google News results.

NewsResult 結果アイテム構造
rank
必須
number

必須

このレスポンス内の 1 始まりの順位。

position
任意
number

利用可能な場合は rank のエイリアス。

position を期待するクライアント向けの正規化順位。

title
必須
string

必須

結果タイトル。

link
必須
string

必須

parser が返す主リンク。

url
任意
string

結果リンクを正規化できる場合に返ります。

正規化されたターゲット URL。通常は link と同じです。

source_url
任意
string

Google のリダイレクト元 URL がある場合のみ返ります。

デバッグと出所確認のために保持される元の Google URL。

display_url
任意
string

Google の表示テキストまたはドメインを取得できる場合。

表示 URL またはソースドメイン。

source
任意
string

When publisher text is parsed.

Publisher/source label.

time
任意
string

When Google exposes time text.

Raw published time text.

published_at
任意
string

Alias for parsed time when available.

Normalized published time alias.

snippet
任意
string

When a snippet is parsed.

Article summary snippet.

thumbnail_url
任意
string

Google がサムネイルを公開している場合。

サムネイル URL。

thumbnail
任意
string

利用可能な場合は thumbnail_url のエイリアス。

正規化されたサムネイルエイリアス。

bash
curl -X POST https://test-api.serpbase.dev/google/news \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key" \
  -d '{
    "q": "apple event",
    "hl": "en",
    "gl": "us",
    "page": 1
  }'
注記

ブランド監視、トレンド追跡、メディア発見。

Source and time are parsed from compact Google metadata text, so clients should treat both as optional.

POST
/google/videos

動画検索

ソース、長さ、時刻、サムネイル付き動画結果。

type
videos
result
videos
課金
1 credits
パラメータ
q
必須
string

必須

検索クエリ文字列。

hl
任意
string

任意

言語コード。デフォルトは en。

gl
任意
string

任意

国コード。デフォルトは us。

page
任意
number

任意

1 始まりのページ番号。デフォルトは 1。

レスポンスフィールド
query
必須
string

必須

リクエストから正規化されたクエリ。

page
必須
number

必須

現在の 1 始まりのページ番号。

videos
任意
VideoResult[]

When video results are parsed.

Google Videos results.

VideoResult 結果アイテム構造
rank
必須
number

必須

このレスポンス内の 1 始まりの順位。

position
任意
number

利用可能な場合は rank のエイリアス。

position を期待するクライアント向けの正規化順位。

title
必須
string

必須

結果タイトル。

link
必須
string

必須

parser が返す主リンク。

url
任意
string

結果リンクを正規化できる場合に返ります。

正規化されたターゲット URL。通常は link と同じです。

source_url
任意
string

Google のリダイレクト元 URL がある場合のみ返ります。

デバッグと出所確認のために保持される元の Google URL。

display_url
任意
string

Google の表示テキストまたはドメインを取得できる場合。

表示 URL またはソースドメイン。

source
任意
string

When source/channel can be parsed.

Video source or channel label.

duration
任意
string

When duration appears in result text.

Video duration text.

time
任意
string

When posted time can be parsed.

Raw posted time text.

published_at
任意
string

Alias for parsed time when available.

Normalized posted time alias.

thumbnail_url
任意
string

Google がサムネイルを公開している場合。

サムネイル URL。

thumbnail
任意
string

利用可能な場合は thumbnail_url のエイリアス。

正規化されたサムネイルエイリアス。

bash
curl -X POST https://test-api.serpbase.dev/google/videos \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key" \
  -d '{
    "q": "python asyncio tutorial",
    "hl": "en",
    "gl": "us",
    "page": 1
  }'
注記

動画検索、チュートリアル発見、メディア監視。

If no dedicated video cards are parsed, the parser falls back to news-style extraction for compatible Google layouts.

POST
/google/maps/detail

Maps 詳細

Google Maps feature_id による単一地点の詳細。

type
maps_detail
result
place
課金
2 credits
パラメータ
feature_id
必須
string

必須

Google Maps feature id。形式は 0x...:0x...。

hl
任意
string

任意

言語コード。デフォルトは en。

gl
任意
string

任意

国コード。デフォルトは us。

レスポンスフィールド
feature_id
必須
string

必須

Feature id resolved from the Maps detail request.

page
必須
number

必須

Always 1 for maps detail.

place
任意
MapsPlace

When place details are parsed.

Single place detail object.

MapsPlace 結果アイテム構造
position
任意
number

Maps Search only.

Place rank in the local result list.

name
必須
string

必須

Place name.

title
必須
string

必須

Alias for name.

feature_id
必須
string

必須

Google Maps feature id.

place_id
任意
string

When Google exposes it.

Google place id.

data_id
任意
string

Alias for feature_id.

Maps data id.

cid
任意
string

Derived from feature_id when possible.

Google CID.

kgmid
任意
string

When present in Maps payload.

Knowledge graph machine id.

google_maps_url
任意
string

When Google exposes a Maps URL.

Google Maps URL.

url
任意
string

google_maps_url or website fallback.

Primary place URL.

rating
任意
number

When rating is present.

Google rating.

types
任意
string[]

When categories are present.

Place type labels.

category
任意
object

When category block is parsed.

Structured category data.

address
任意
string

When address is present.

Formatted address.

address_components
任意
object

When components are present.

Street, city, postal code, country code.

plus_code
任意
object

When plus code is present.

Global and compound plus codes.

phone
任意
string

When phone is present.

Local phone number.

phone_international
任意
string

When present.

International phone number.

phone_uri
任意
string

When present.

Telephone URI.

website
任意
string

When website is present.

Business website.

website_domain
任意
string

When website domain is present.

Business website domain.

latitude
任意
number

When coordinates are present.

Latitude.

longitude
任意
number

When coordinates are present.

Longitude.

image
任意
string

When image is present.

Primary place image.

thumbnail
任意
string

Alias for image when available.

Primary image alias.

photos
任意
MapsPhoto[]

When photos are parsed.

Photo id, URL, size, and optional coordinates.

hours
任意
Record<string,string>

When hours are parsed.

Opening hours by day.

open_status
任意
object

When status is present.

Open status text and current hours.

attributes
任意
object[]

When attributes are parsed.

Grouped place attributes.

related_places
任意
object[]

When related places are present.

Related places from Maps payload.

short_description
任意
string

When description block is present.

Short place description.

description
任意
string

When description block is present.

Longer place description.

snippet
任意
string

short_description or description fallback.

Normalized text summary.

timezone
任意
string

When present.

Place timezone.

region
任意
string

When present.

Region label.

country_code
任意
string

When present.

Country code.

language
任意
string

When present.

Language code from Maps payload.

bash
curl -X POST https://test-api.serpbase.dev/google/maps/detail \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key" \
  -d '{
    "feature_id": "0x8085809c2c6fdc63:0x4b3f2d70e4f5a123",
    "hl": "en",
    "gl": "us"
  }'
注記

地点データ拡充、ローカル CRM、詳細ページ。

Use feature_id from Maps Search results to request a detail record.

エラー
error
必須
string

必須

人が読めるエラーメッセージ。

0
SUCCESS

Request completed successfully.

1000
INVALID_REQUEST

Missing or invalid body or parameters.

1001
UNAUTHORIZED

Missing, invalid, or revoked API key.

1020
INSUFFICIENT_CREDITS

Account balance is not enough.

1029
RATE_LIMITED

QPS or concurrency limit exceeded.

1500
INTERNAL_ERROR

Unexpected internal server error.

1502
UPSTREAM_FAILED

Worker returned an upstream fetch or parse error.

1503
SERVICE_UNAVAILABLE

No worker session is available.

1504
UPSTREAM_TIMEOUT

Gateway timed out waiting for a worker result.

json
{
  "status": 1001,
  "error": "unauthorized",
  "request_id": "0f3576b2-6e2e-4f1e-bb0e-8cb0d4a60195",
  "elapsed_ms": 0,
  "credits_charged": 0
}
プライバシーと保持
検索クエリは課金、デバッグ、不正利用防止、アカウントログのために記録される場合があります。保持期間はプライバシーページをご確認ください。