Skip to main content

geekflare-api

Official Python SDK for all Geekflare.

  • API version: 1.0.0
  • Package version: 0.2.0

Requirements.

Python 3.10+

Installation & Usage

pip install

pip install geekflare-api

Quick Start

from geekflare_api.client import GeekflareClient
from geekflare_api.models import WebScrapeDto

with GeekflareClient(api_key="your-api-key") as client:
    result = client.web_scrape(WebScrapeDto(url="https://toscrape.com/"))
    print(result)

Available Methods

Method Description
client.meta_scrape(body) Scrape meta tags from a URL
client.web_scrape(body) Scrape web page content
client.dns_record(body) Look up DNS records
client.screenshot(body) Take a screenshot of a URL
client.site_status(body) Check if a site is up or down
client.redirect_check(body) Check redirect chain of a URL
client.broken_link(body) Find broken links on a page
client.url2_pdf(body) Convert a URL to PDF
client.open_ports(body) Scan open ports on a host
client.tls_scan(body) Scan TLS/SSL configuration
client.load_time(body) Test page load time
client.mixed_content(body) Check for mixed content issues
client.dns_sec(body) Check DNSSEC configuration
client.mtr(body) Perform MTR network test
client.ping(body) Ping a host
client.lighthouse(body) Run Lighthouse audit
client.search(body) Perform a web search

Error Handling

import geekflare_api
from geekflare_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.geekflare.com
# See configuration.py for a list of all supported configuration parameters.
configuration = geekflare_api.Configuration(
    host = "https://api.geekflare.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: x-api-key
configuration.api_key['x-api-key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'


# Enter a context with an instance of the API client
with geekflare_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = geekflare_api.ApiToolApi(api_client)
    broken_link_dto = geekflare_api.BrokenLinkDto() # BrokenLinkDto |

    try:
        # Check if a webpage contains broken links
        api_response = api_instance.broken_link(broken_link_dto)
        print("The response of ApiToolApi->broken_link:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ApiToolApi->broken_link: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.geekflare.com

Class Method HTTP request Description
ApiToolApi broken_link POST /brokenlink Check if a webpage contains broken links
ApiToolApi dns_record POST /dnsrecord Retrieve DNS records for a given domain
ApiToolApi dns_sec POST /dnssec Check if DNSSEC is enabled for a domain
ApiToolApi lighthouse POST /lighthouse Run Lighthouse audit on a website
ApiToolApi load_time POST /loadtime Measure the page load time for a given URL
ApiToolApi meta_scrape POST /metascraping Scrape a webpage meta with custom options
ApiToolApi mixed_content POST /mixedcontent Check for mixed content on a site
ApiToolApi mtr POST /mtr Perform MTR (My Traceroute) network diagnostic test
ApiToolApi open_ports POST /openport Scan a website for open ports
ApiToolApi ping POST /ping Perform ICMP Ping test on a given URL or IP
ApiToolApi redirect_check POST /redirectcheck Check the redirection chain of a given URL
ApiToolApi screenshot POST /screenshot Capture a full-page screenshot of a website
ApiToolApi search POST /search Search API for AI Agents & LLMs
ApiToolApi site_status POST /up Check if a site is up or down
ApiToolApi tls_scan POST /tlsscan Perform TLS scan for a given domain
ApiToolApi url2_pdf POST /url2pdf Capture a full-page Url2Pdf of a website
ApiToolApi web_scrape POST /webscraping Scrape a webpage with custom options

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

x-api-key

  • Type: API key
  • API key parameter name: x-api-key
  • Location: HTTP header

bearer-token

  • Type: Bearer authentication (JWT)

gf_auth_session

  • Type: API key
  • API key parameter name: gf_auth_session
  • Location:

License

MIT

mcp-name: com.geekflare/mcp

Release files for geekflare-api 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for geekflare-api 0.2.0
File Size Uploaded
geekflare_api-0.2.0.tar.gz 93.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for geekflare-api 0.2.0
File Interpreter ABI Platform
geekflare_api-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 299.2 kB

Release files / geekflare_api-0.2.0.tar.gz

Download URL geekflare_api-0.2.0.tar.gz
Size 93.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9100eb819b5aa9f92192b8446f1eb4f6105e6811f73c6445fb75b8f6eb588564
BLAKE2b-256 checksum
How to use checksums
a683146f3bbc5296da651c33763403fab65465f209ff224d45e77169648681b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / geekflare_api-0.2.0-py3-none-any.whl

Download URL geekflare_api-0.2.0-py3-none-any.whl
Size 205.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4592cf992a46d7f305f99e3c542a36bb87c68233350b69f2b9714e87a768fe2e
BLAKE2b-256 checksum
How to use checksums
157263121be39fb432f2c9165924220fff45c942a9e8c5f8192e8f762827ea0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release history Release notifications | RSS feed

0.3.1

2 release files

This release

0.2.0 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page