Extraction

Your First Extraction

In this guide, you'll send your first extraction request and retrieve the content of a webpage.

What You'll Build

By the end of this guide, you'll be able to:

  • Send an extraction request
  • Extract content from a webpage
  • Understand the response structure
  • Access the extracted content

Send Your First Request

Use the following request:

request.sh
curl -X POST "https://scraper.geonode.io/v1/extract" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com"
  }'

Request Breakdown

FieldDescription
urlThe webpage to extract content from.

Since no formats field is provided, the API returns HTML by default.

Understanding the Response

A successful request returns the extracted content and metadata.

request.json
{
  "data": {
    "html": "<!doctype html>..."
  },
  "metadata": {
    "url": "http://example.com/",
    "render_js": false,
    "http_status": 200,
    "formats": ["html"],
    "processing_mode": "sync"
  },
  "tokens_charged": 1
}

Access the Extracted Content

The extracted page content is available in:

data.html

The metadata section contains additional information about the extraction, including:

  • Target URL
  • HTTP status
  • Output format
  • Processing mode
  • Extraction duration

Success

If you received a response similar to the example above, your first extraction was successful.

Your API key is working, the Extraction API is accessible, and you're ready to start working with different output formats and extraction options.

Next Steps

Continue to Working With Output Formats to learn how to return Markdown, HTML, or both formats in a single request.

On this page