Skip to main content
The Wetrocloud Data Extraction API allows you to extract specific information from any web page and receive it in a structured JSON format that matches your requirements. Simply provide a URL, describe what you want to extract, and define your desired output schema.

How It Works

The API uses advanced AI to:
  1. Load and analyze the content from the provided URL
  2. Understand your extraction requirements from the prompt
  3. Extract the relevant data
  4. Format the results according to your JSON schema

Endpoint

Example Request (Structured Output)

This example shows how to extract data in a structured JSON format by providing a json_schema:
Response:

Request Parameters

The json_schema Parameter (Optional)

The json_schema parameter defines the structure of the data you want to extract. It’s an array of objects where each object represents a field in your output. When to use:
  • Use json_schema when you want structured data in a specific format
  • Omit json_schema when you want a plain text response
Format:
Supported data types:
  • "string" - Text values
  • "number" - Numeric values
  • "boolean" - True/false values
Example schemas: Single object extraction:
Multiple items extraction (same schema, returns array):

The prompt Parameter

The prompt tells the AI what information to extract. Be specific and clear about what you want. Good prompts:
  • “Extract the names and net worth of all billionaires mentioned in the article”
  • “Get all product names, prices, and ratings from this page”
  • “Find all email addresses and phone numbers in the contact section”
Tips for better prompts:
  • Be specific about what data you want
  • Mention if you want all instances or just specific ones
  • Indicate any filtering criteria

The delay Parameter

Use the delay parameter when extracting from dynamic websites that load content via JavaScript. The delay gives the page time to fully load before extraction begins. When to use:
  • Single-page applications (SPAs)
  • Pages with lazy-loaded content
  • Dynamic dashboards
  • Sites with JavaScript-rendered content

More Examples

Extract Billionaire Data (Plain Text Response)

When you omit the json_schema, you get a plain text response:
Response:

Extract Product Information

Extract Article Metadata

Response Format

All successful requests return a JSON object with the following structure: With json_schema (Structured Output):
Without json_schema (Plain Text):

Error Handling

If the request fails, you’ll receive an error response:
Common errors:
  • Invalid API key
  • Malformed JSON schema
  • Inaccessible URL
  • Invalid URL format

Best Practices

  1. Be specific in your prompts: Clear, detailed prompts produce better results
  2. Use appropriate delays: Add a delay for JavaScript-heavy websites
  3. Design clear schemas: Use descriptive field names and appropriate data types
  4. Handle errors gracefully: Always check the success field in responses
  5. Test your schemas: Start with simple schemas and iterate based on results

Use Cases

The Data Extraction API is perfect for:
  • Price monitoring: Track competitor pricing across multiple websites
  • Lead generation: Extract contact information from business directories
  • Content aggregation: Gather articles, blogs, or news from various sources
  • Market research: Collect product data, reviews, and ratings
  • Data migration: Extract data from old systems or websites
  • Real estate: Gather property listings and details
  • Job boards: Collect job postings and requirements

Authentication

All requests require an API key in the Authorization header:
Get your API key from the Wetrocloud Console. If you need help obtaining your API key, refer to this guide.

Rate Limits

Please refer to your plan details in the Wetrocloud Console for rate limit information.

Need Help?