---
title: "Scrape Website"
method: POST
path: "/ai/api/v1/marketing/scrape"
tags: ["Marketing - Web Scraper"]
---

# Scrape Website

`POST /ai/api/v1/marketing/scrape`

## Request

- Base URL: `https://sharksapi.ai`
- URL: `https://sharksapi.ai/ai/api/v1/marketing/scrape`
- Auth: HTTP bearer

Scrape any website using a headless browser. Extract page title, H1, meta description, text content, links, images, and headings. Works with JavaScript-heavy websites and SPAs. Use this for competitor analysis, SEO audits, price monitoring, and content research.

## Request body

- object
  - `url` string, uri, required: The URL to scrape (must include https:// or http://)
  - `extract` string[]: What data to extract from the page. Default: title, h1, meta_description, text
  - `wait_for_selector` string: CSS selector to wait for before scraping (for dynamic/SPA pages)
  - `custom_selector` string: Custom CSS selector to extract specific elements

## Response `200`

Website scraped successfully

- object
  - `status` string
  - `url` string: The scraped URL
  - `data` object: Extracted data from the page
    - `title` string: Page title
    - `h1` string: First H1 heading
    - `meta_description` string: Meta description content
    - `text` string: Page text content (first 5000 chars)
    - `links` object[]: Links found on the page
      - `text` string
      - `href` string
    - `images` object[]: Images found on the page
      - `src` string
      - `alt` string
    - `headings` object[]: H1, H2, H3 headings
      - `tag` string
      - `text` string
    - `custom` string[]: Custom selector results
  - `message` string

## Other responses

- `400`: Bad request - Invalid URL or parameters
- `500`: Server error - Failed to scrape website
- `503`: Service unavailable - Scraper service is not running

---

[API](https://skmtc.dev/sharksapi/apis/sharksapi-ai-complete-api.md) · [All operations](https://skmtc.dev/sharksapi/apis/sharksapi-ai-complete-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sharksapi/apis/sharksapi-ai-complete-api/revisions/7e956273a359?raw)
