Link Scraper API - Dart/Flutter Client

Link Scraper is a website link extractor API that pulls internal and external links from any webpage URL in real time. It resolves relative paths to absolute URLs, strips empty fragments, and returns anchor text with internal and external counts.

pub package License: MIT

This is the Dart/Flutter client for the Link Scraper API.

Installation

Add this to your pubspec.yaml:

dependencies:
  apiverve_linkscraper: ^1.2.6

Then run:

dart pub get
# or for Flutter
flutter pub get

Usage

import 'package:apiverve_linkscraper/apiverve_linkscraper.dart';

void main() async {
  final client = LinkscraperClient('YOUR_API_KEY');

  try {
    final response = await client.execute({
      'url': 'https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html',
      'maxlinks': 20,
      'includequery': false
    });

    print('Status: ${response.status}');
    print('Data: ${response.data}');
  } catch (e) {
    print('Error: $e');
  }
}

Response

{
  "status": "ok",
  "error": null,
  "data": {
    "url": "http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html",
    "linkCount": 16,
    "externalLinkCount": 13,
    "internalLinkCount": 3,
    "links": [
      {
        "text": "Documentation",
        "href": "http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html/index.html",
        "external": false
      },
      {
        "text": "Amazon EC2 Instance Types Guide",
        "href": "https://docs.aws.amazon.com/ec2/latest/instancetypes/instance-types.html",
        "external": true
      },
      {
        "text": "Amazon EC2 Auto Scaling",
        "href": "https://docs.aws.amazon.com/autoscaling/",
        "external": true
      }
    ],
    "uniqueDomains": [
      "docs.aws.amazon.com",
      "aws.amazon.com"
    ],
    "maxLinksReached": false
  }
}

API Reference

Authentication

All requests require an API key. Get yours at apiverve.com.

License

MIT License - see LICENSE for details.


Built with Dart for APIVerve

Libraries

apiverve_linkscraper
Link Scraper API client for Dart/Flutter