POST https://api.serphubapi.com/v1/fetch
Give it a URL, get back the page's main content with navigation, ads and boilerplate removed — ready to drop into an agent's context. 3 credits per page; failures are free.
| Parameter | Type | Default | Description |
|---|
url | string | — | Required. The page URL (http or https, publicly reachable). |
format | string | markdown | markdown or text (plain text with Markdown syntax stripped). |
mode | string | live | live fetches the page now. cache_first may return a copy fetched within the last hour — free on a cache hit. |
URLs pointing at private, local or otherwise non-public addresses are rejected with 400 validation_error.
curl -X POST https://api.serphubapi.com/v1/fetch \
-H "X-API-Key: shapi_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/blog/espresso-guide", "format": "markdown"}'
{
"meta": {
"id": "fet_01J9Z4A2BC",
"status": "success",
"engine": "fetch",
"cached": false,
"credits_charged": 3,
"time_ms": 1240
},
"url": "https://example.com/blog/espresso-guide",
"title": "The Complete Espresso Guide",
"markdown": "# The Complete Espresso Guide\n\nPulling a good shot starts with ..."
}
| Field | Type | Description |
|---|
meta | object | Same shape as in Search. engine is always fetch. |
url | string | The URL you requested. |
title | string | Page title, when one could be determined. |
markdown | string | The main content. With format=text this is plain text — the field name stays markdown. |
| Case | Credits |
|---|
| Page fetched | 3 |
cache_first cache hit | 0 |
| Page could not be fetched | 0 |
| HTTP | Code | When |
|---|
| 400 | validation_error | Missing/invalid url, or the URL is not publicly reachable |
| 401 | invalid_api_key | Missing, invalid or disabled key |
| 402 | insufficient_balance | Fewer than 3 credits available |
| 429 | rate_limited | Rate limit or key daily credit limit reached |
| 502 | all_upstreams_failed | The page could not be fetched (blocked, timed out, too large…). Not charged |
- To fetch the pages behind search results in one round trip, use
include_content on /v1/search instead.
- Some sites block automated access or require a login; those return
502 and cost nothing.
- Fetch results are not stored in the search archive; keep the content on your side if you need it later.