Skip to main content

What is Geekflare API?

Geekflare API provides a suite of enterprise-ready REST APIs to handle Scraping, Search, Data Extraction, Screenshots, DNS lookups, and other essential web utilities.

Getting started

Getting up and running with Geekflare API is simple. Create a free account (no credit card required) to generate your API key. Once you have your key, you can test endpoints using our Interactive Playground.

Get your API key

Sign up for a free account to generate your key.

API Protocol

Geekflare provides a RESTful API. It is accessed via HTTPs and ensures that all data sent and received is formatted as JSON.

Rate Limits

Rate limits range from 1 to 50 requests per second (RPS), depending on your subscription plan. If you exceed this threshold, the API will return an HTTP 429 Too Many Requests error.

Proxy & Geolocation

Several Geekflare APIs (such as Scraping, Site Status, PDF Generator, Load time, etc.) support request routing via specific locations. To use this, pass the target country code in the proxyCountry parameter. View supported APIs Note: Using proxies incurs additional credit costs. We recommend using this feature only when geolocation is required.
Proxy is available to premium plan users only.

Request

Authentication

Make sure it’s present in your header value when making API calls.
x-api-key YOUR-API-KEY
It expects the API access key to be present in a request header called x-api-key.

Base URL

For all the endpoints listed in this documentation, the base URL is:
https://api.geekflare.com

Response

The API response follows some common formats for the sake of clarity and consistency. Depending on the request status, the response structures are as given below.

Success Response

On successful processing of a request, the API returns a response in the following format:
{
  "timestamp": 1610796547300,
  "apiStatus": "success",
  "apiCode": 200,
  "message": "An overview message.",
  "meta": {
    "url": "https://example.com"
  },
  "data": []
}
200 - Success

Missing API Key

When no API key is provided in the request, the following response structure is returned:
{
  "apiCode": 401,
  "message": "Missing x-api-key header"
}
401 - Unauthorized

Invalid API Key

When an invalid or incorrect API key is provided:
{
  "apiCode": 401,
  "message": "Invalid x-api-key"
}
401 - Unauthorized

Forbidden Response

If you are under a free plan and try to access a paid-only API like Port Scanner, it would return an error in the following format:
{
  "timestamp": 1658254283953,
  "apiStatus": "failure",
  "apiCode": 403,
  "message": "You are not allowed to access. This is available to premium plan only."
}
403 - Forbidden

Not Found Response

If a wrong endpoint or wrong request type (POST instead of GET, for example) is provided, the API returns an error in the following format:
{
  "timestamp": 1657208461046,
  "apiStatus": "failure",
  "apiCode": 404,
  "message": "API not found.",
  "meta": {
    "method": "POST",
    "endpoint": "/helloworld"
  }
}
404 - Not Found

Next Steps