Scrapfly · Capability

Scrapfly Scrape API — Scraping

Scrapfly Scrape API — Scraping. 2 operations. Lead operation: Scrape URL. Self-contained Naftiko capability covering one Scrapfly business surface.

Run with Naftiko ScrapflyScraping

What You Can Do

GET
Scrapeurl — Scrape URL
/v1/scrape
POST
Scrapeurlpost — Scrape URL (POST)
/v1/scrape

MCP Tools

scrape-url

Scrape URL

read-only idempotent
scrape-url-post

Scrape URL (POST)

Capability Spec

scrape-scraping.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Scrapfly Scrape API — Scraping
  description: 'Scrapfly Scrape API — Scraping. 2 operations. Lead operation: Scrape URL. Self-contained Naftiko capability
    covering one Scrapfly business surface.'
  tags:
  - Scrapfly
  - Scraping
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SCRAPFLY_API_KEY: SCRAPFLY_API_KEY
capability:
  consumes:
  - type: http
    namespace: scrape-scraping
    baseUri: https://api.scrapfly.io
    description: Scrapfly Scrape API — Scraping business capability. Self-contained, no shared references.
    resources:
    - name: scrape
      path: /scrape
      operations:
      - name: scrapeurl
        method: GET
        description: Scrape URL
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: key
          in: query
          type: string
          description: API key for authentication
          required: true
        - name: url
          in: query
          type: string
          description: Target URL to scrape (URL encoded)
          required: true
        - name: render_js
          in: query
          type: boolean
          description: Enable JavaScript rendering via headless browser
        - name: asp
          in: query
          type: boolean
          description: Enable Anti Scraping Protection bypass
        - name: country
          in: query
          type: string
          description: Proxy geographic location using ISO 3166-1 alpha-2 country codes. Supports exclusions and weighted
            distribution.
        - name: proxy_pool
          in: query
          type: string
          description: Select proxy network (datacenter or residential)
        - name: format
          in: query
          type: string
          description: Response content format
        - name: lang
          in: query
          type: string
          description: Page language preference via Accept-Language header
        - name: headers
          in: query
          type: string
          description: Custom HTTP headers (URL encoded)
        - name: timeout
          in: query
          type: integer
          description: Request timeout in milliseconds
        - name: retry
          in: query
          type: boolean
          description: Enable automatic retry on failures
        - name: rendering_wait
          in: query
          type: integer
          description: Delay after page load in milliseconds (requires render_js=true)
        - name: wait_for_selector
          in: query
          type: string
          description: CSS/XPath selector or XHR pattern to wait for before capturing
        - name: js
          in: query
          type: string
          description: Custom JavaScript to execute (base64 encoded, max 16KB)
        - name: screenshots
          in: query
          type: string
          description: Capture page or element screenshots (CSS selectors, up to 10)
        - name: js_scenario
          in: query
          type: string
          description: Page interaction actions as JSON scenario (URL encoded)
        - name: cache
          in: query
          type: boolean
          description: Enable response caching
        - name: cache_ttl
          in: query
          type: integer
          description: Cache time-to-live in seconds
        - name: cache_clear
          in: query
          type: boolean
          description: Force cache refresh
        - name: session
          in: query
          type: string
          description: Session name to persist cookies and browser fingerprint across requests
        - name: session_sticky_proxy
          in: query
          type: boolean
          description: Reuse the same proxy IP within a session
        - name: extraction_template
          in: query
          type: string
          description: Structured data extraction template name
        - name: extraction_prompt
          in: query
          type: string
          description: LLM instruction for data extraction
        - name: extraction_model
          in: query
          type: string
          description: AI auto-extraction model for predefined content types
        - name: debug
          in: query
          type: boolean
          description: Store results and screenshots for debugging
        - name: correlation_id
          in: query
          type: string
          description: Group related scrapes together
        - name: tags
          in: query
          type: string
          description: Comma-separated tags to categorize scrapes in dashboard
        - name: dns
          in: query
          type: boolean
          description: Query target DNS information
        - name: ssl
          in: query
          type: boolean
          description: Retrieve SSL certificate and TLS information
        - name: webhook_name
          in: query
          type: string
          description: Webhook name to redirect response to
        - name: cost_budget
          in: query
          type: integer
          description: Limit anti-scraping protection retry costs
        - name: proxified_response
          in: query
          type: boolean
          description: Return scraped content directly as response body instead of JSON wrapper
      - name: scrapeurlpost
        method: POST
        description: Scrape URL (POST)
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: apikey
      key: key
      value: '{{env.SCRAPFLY_API_KEY}}'
      placement: query
  exposes:
  - type: rest
    namespace: scrape-scraping-rest
    port: 8080
    description: REST adapter for Scrapfly Scrape API — Scraping. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/scrape
      name: scrape
      description: REST surface for scrape.
      operations:
      - method: GET
        name: scrapeurl
        description: Scrape URL
        call: scrape-scraping.scrapeurl
        with:
          key: rest.key
          url: rest.url
          render_js: rest.render_js
          asp: rest.asp
          country: rest.country
          proxy_pool: rest.proxy_pool
          format: rest.format
          lang: rest.lang
          headers: rest.headers
          timeout: rest.timeout
          retry: rest.retry
          rendering_wait: rest.rendering_wait
          wait_for_selector: rest.wait_for_selector
          js: rest.js
          screenshots: rest.screenshots
          js_scenario: rest.js_scenario
          cache: rest.cache
          cache_ttl: rest.cache_ttl
          cache_clear: rest.cache_clear
          session: rest.session
          session_sticky_proxy: rest.session_sticky_proxy
          extraction_template: rest.extraction_template
          extraction_prompt: rest.extraction_prompt
          extraction_model: rest.extraction_model
          debug: rest.debug
          correlation_id: rest.correlation_id
          tags: rest.tags
          dns: rest.dns
          ssl: rest.ssl
          webhook_name: rest.webhook_name
          cost_budget: rest.cost_budget
          proxified_response: rest.proxified_response
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: scrapeurlpost
        description: Scrape URL (POST)
        call: scrape-scraping.scrapeurlpost
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: scrape-scraping-mcp
    port: 9090
    transport: http
    description: MCP adapter for Scrapfly Scrape API — Scraping. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: scrape-url
      description: Scrape URL
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: scrape-scraping.scrapeurl
      with:
        key: tools.key
        url: tools.url
        render_js: tools.render_js
        asp: tools.asp
        country: tools.country
        proxy_pool: tools.proxy_pool
        format: tools.format
        lang: tools.lang
        headers: tools.headers
        timeout: tools.timeout
        retry: tools.retry
        rendering_wait: tools.rendering_wait
        wait_for_selector: tools.wait_for_selector
        js: tools.js
        screenshots: tools.screenshots
        js_scenario: tools.js_scenario
        cache: tools.cache
        cache_ttl: tools.cache_ttl
        cache_clear: tools.cache_clear
        session: tools.session
        session_sticky_proxy: tools.session_sticky_proxy
        extraction_template: tools.extraction_template
        extraction_prompt: tools.extraction_prompt
        extraction_model: tools.extraction_model
        debug: tools.debug
        correlation_id: tools.correlation_id
        tags: tools.tags
        dns: tools.dns
        ssl: tools.ssl
        webhook_name: tools.webhook_name
        cost_budget: tools.cost_budget
        proxified_response: tools.proxified_response
      outputParameters:
      - type: object
        mapping: $.
    - name: scrape-url-post
      description: Scrape URL (POST)
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: scrape-scraping.scrapeurlpost
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.