Back to Home
Developer Documentation
Integration Guide

How to Send Requests

Complete guide on where and how to send your scraping request payload directly to our servers.

1. Where to Send Your Request

Send an HTTP POST request with your JSON data directly to our API server:

POST https://scrape.dedyn.io/api/scrape.php
Header: X-API-Key: YOUR_API_KEY
Header: Content-Type: application/json

2. Request Payload & Parameters

Pass your scraping criteria in the request body as a JSON object. The required data type, optional status, and description for each field are documented directly inline below:

request_payload.js
const data = {
    // =========================================================================
    // 1. SEARCH CRITERIA
    // =========================================================================
    query: 'coffee in cupertino',                     // Type: String | Main search keyword. (Required if cities/search_links omitted)
    business_types: ['Cafe', 'Coffee shop'],         // Type: Array<String> // optional - Target category keywords (e.g. ['Restaurant', 'Hotel'])
    cities: ['US__CALIFORNIA__CUPERTINO'],            // Type: Array<String> // optional - Standardized city IDs (e.g. ['US__NEW_YORK__NEW_YORK'])
    max_results: 50,                                 // Type: Number // optional - Maximum count of places to scrape (e.g. 50, 200)
    search_links: [],                                // Type: Array<String> // optional - Direct Google Maps URLs to scrape directly

    // =========================================================================
    // 2. MAP & SPEED CONTROLS
    // =========================================================================
    extraction_method: 'fast',                       // Type: String // optional - Speed mode: 'fast' (high throughput) or 'thorough' (deep details)
    geo_zoom_level: '16',                            // Type: String // optional - Sweet spot: '16' (1-few mins). Avoid '17'-'18' on large areas!
    lang: 'en',                                      // Type: String // optional - Language locale code ('en', 'es', 'fr', 'de', etc.)

    // =========================================================================
    // 3. QUALITY & REVIEW COUNT FILTERS
    // =========================================================================
    enrichment_filters: ['not_permanently_closed', 'good_rating'], // Type: Array<String> // optional - Filters: 'not_permanently_closed', 'good_rating'
    filter_reviews_gt: 10,                           // Type: Number // optional - Minimum review count (only scrape places with reviews > 10)
    filter_reviews_lt: 500,                          // Type: Number // optional - Maximum review count (only scrape places with reviews < 500)

    // =========================================================================
    // 4. USER REVIEWS (NEW VS OLD / SORTING / DATE FILTER)
    // =========================================================================
    enable_reviews_extraction: true,                 // Type: Boolean // optional - Set true to extract full text user reviews
    max_reviews: 20,                                 // Type: Number // optional - Maximum reviews count to scrape per place (e.g. 10, 50)
    reviews_sort: 'newest',                          // Type: String // optional - Sort order: 'newest' (new reviews), 'most_relevant', or 'highest_rating'
    reviews_since_date: '2024-01-01',                // Type: String // optional - Scrape reviews newer than date (format: 'YYYY-MM-DD')
    reviews_query: '',                               // Type: String // optional - Search keyword within reviews (e.g. 'espresso', 'clean')

    // =========================================================================
    // 5. PHOTOS & CONTACT ENRICHMENT
    // =========================================================================
    enable_photos_extraction: false,                 // Type: Boolean // optional - Set true to extract place photo URLs
    max_photos: 10,                                  // Type: Number // optional - Maximum photo links per place (e.g. 10, 25)
    enable_website_contacts: true                    // Type: Boolean // optional - Set true to extract emails, phones & social links from websites
};
Ready-to-Use

3. Ready-to-Run Code Examples

Pre-configured requests to test our server with exactly 10 results. Just paste your API key and run directly:

// Ready-made JavaScript request to test our server (10 results)
const API_KEY = 'YOUR_API_KEY'; // <-- Paste your API key here

const response = await fetch('https://scrape.dedyn.io/api/scrape.php', {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
        'X-API-Key': API_KEY
    },
    body: JSON.stringify({
        business_types: ['Restaurant'],
        cities: ['US__CALIFORNIA__CUPERTINO'],
        query: 'restaurants in cupertino',
        max_results: 10,
        extraction_method: 'fast',
        geo_zoom_level: '16'
    })
});

const data = await response.json();
console.log('Scraped Results:', data);
# Ready-made cURL command to test our server (10 results)
# Replace YOUR_API_KEY with your actual API key
curl -X POST "https://scrape.dedyn.io/api/scrape.php" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "business_types": ["Restaurant"],
    "cities": ["US__CALIFORNIA__CUPERTINO"],
    "query": "restaurants in cupertino",
    "max_results": 10,
    "extraction_method": "fast",
    "geo_zoom_level": "16"
  }'
# Ready-made Python script to test our server (10 results)
# Requires: pip install requests
import requests

API_KEY = "YOUR_API_KEY"  # <-- Paste your API key here

url = "https://scrape.dedyn.io/api/scrape.php"
headers = {
    "Content-Type": "application/json",
    "X-API-Key": API_KEY
}

payload = {
    "business_types": ["Restaurant"],
    "cities": ["US__CALIFORNIA__CUPERTINO"],
    "query": "restaurants in cupertino",
    "max_results": 10,
    "extraction_method": "fast",
    "geo_zoom_level": "16"
}

response = requests.post(url, headers=headers, json=payload)
data = response.json()
print("Scraped Results:", data)

Usage Guidelines & Plan Information

  • Plan Searches & Yield: You get 50 free searches on the trial tier and 10,000 searches on the paid plan. Each single search can bring anywhere from hundreds to thousands of businesses depending entirely on the cities and business categories you select.
  • Speed & Recommended Zoom (16): Setting geo_zoom_level: "16" is the recommended sweet spot — a decent request will finish in 1 or a few minutes up to several minutes.
    ⚠️
    Never run an entire country, multiple cities, or one big metropolitan city on zoom 17 or 18 — high zoom levels split the area into thousands of micro-grids and take hours!
  • Request Cooldown & Pacing:
    ⚠️
    Do not send multiple requests at once. Please take at least a 10-second gap between requests to ensure reliable server execution and prevent rate-limiting.
  • Found a Glitch or Issue? If you encounter any glitch, unexpected error, or timeout, please contact us directly to report it so our team can resolve it immediately.

Need an API Key or Custom Endpoint?

Reach out to Rayan directly via the contact links on the home page (X / Twitter, Email, Instagram) to activate your account or free trial.