Skip to main content

API Documentation

Complete guide to integrating Geocode Farm into your applications

Getting Started

The Geocode Farm API provides fast and accurate geocoding services with both forward and reverse geocoding capabilities. All endpoints return JSON responses and require authentication via API key.

Base URL

https://api.geocode.farm/

Authentication

All API requests require an API key passed as a query parameter:

?key=YOUR_API_KEY

Forward Geocoding

Overview

The Geocode.Farm Forward Geocoding API provides latitude and longitude coordinates for a given address. API authentication is required via an API key.

Base URL

GET https://api.geocode.farm/forward/

Authentication

API keys are required for all requests. Provide the key using the key parameter in the URL.

Request Parameters

ParameterRequiredDescription
keyYesYour API key for authentication.
addrYesThe address to be geocoded (URL-encoded).

Example Request

GET https://api.geocode.farm/forward/?key=YOUR-API-KEY-HERE&addr=30+N+Gould+St,+Ste+R,+Sheridan,+WY+82801+USA

Example Response

  {
    "LEGAL": {
      "notice": "This system is the property of Geocode.Farm and any information contained herein is Copyright (c) Geocode.Farm. Usage is subject to the Terms of Service.",
      "terms": "https://geocode.farm/terms-of-service/",
      "privacy": "https://geocode.farm/privacy-policy/"
    },
    "STATUS": {
      "key": "VALID",
      "request": "VALID",
      "status": "SUCCESS",
      "credit_used": "1"
    },
    "USER": {
      "key": "YOUR-API-KEY-HERE",
      "name": "Your Name",
      "email": "yourname@yourdomain.com",
      "usage_limit": "UNLIMITED",
      "used_today": "1",
      "remaining_limit": "UNLIMITED"
    },
    "RESULTS": {
      "request": {
        "addr": "30 N Gould St, Ste R, Sheridan, WY 82801 USA"
      },
      "result": {
        "coordinates": {
          "lat": "44.7977733966548",
          "lon": "-106.954917523499"
        },
        "address": {
          "full_address": "30 N Gould St, Sheridan, WY 82801, United States",
          "house_number": "30",
          "street_name": "N Gould St",
          "locality": "Sheridan",
          "admin_2": "Sheridan County",
          "admin_1": "WY",
          "country": "United States",
          "postal_code": "82801"
        },
        "accuracy": "EXACT_MATCH"
      }
    }
  }

Response Fields

STATUS

  • key: Indicates API key validity (“VALID” or “INVALID”).
  • status: Request status (“SUCCESS” or “FAILED”).
  • request: Whether the request was valid (“VALID” or “INVALID”).
  • credit_used: Number of API credits or plan queries consumed. Will be 0 on failed, as failed requests DO NOT use credit.

USER

  • key: API key used in the request.
  • name: Registered name.
  • usage_limit: Daily API query limit (e.g., “UNLIMITED” or a set number).
  • used_today: Number of requests made today.
  • remaining_limit: Remaining query limit for today.

RESULTS

  • request: The originally requested address.
  • result: Contains geolocation details:
    • coordinates: Latitude and longitude.
    • address: Full structured address data.
    • accuracy: Quality of match (e.g. “EXACT_MATCH”, “HIGH_ACCURACY”, “MEDIUM_ACCURACY”, “LOW_ACCURACY”, or “UNKNOWN_ACCURACY”).

Error Status Codes

The following are provided with each result as HTTP Status Codes:

  • 200 – Results Returned Successfully.
  • 400 – Address parameter missing or invalid.
  • 401 – API key is invalid or missing.
  • 402 – No credit available or expired API key.
  • 404 – No matching results found.
  • 429 – Rate limit exceeded.
  • 500 – An unexpected error occurred. In this case, contact support immediately to report the issue.

Reverse Geocoding

Overview

The Geocode.Farm Reverse Geocoding API provides address information for a given set of latitude and longitude coordinates. API authentication is required via an API key.

Base URL

GET https://api.geocode.farm/reverse/

Authentication

API keys are required for all requests. Provide the key using the key parameter in the URL.

Request Parameters

ParameterRequiredDescription
keyYesYour API key for authentication.
latYesThe latitude coordinate (decimal format).
lonYesThe longitude coordinate (decimal format).

Example Request

GET https://api.geocode.farm/reverse/?key=YOUR-API-KEY-HERE&lat=44.7977733966548&lon=-106.954917523499

Example Response

{
    "LEGAL": {
      "notice": "This system is the property of Geocode.Farm and any information contained herein is Copyright (c) Geocode.Farm. Usage is subject to the Terms of Service.",
      "terms": "https://geocode.farm/terms-of-service/",
      "privacy": "https://geocode.farm/privacy-policy/"
    },
    "STATUS": {
      "key": "VALID",
      "request": "VALID",
      "status": "SUCCESS",
      "credit_used": "1"
    },
    "USER": {
      "key": "YOUR-API-KEY-HERE",
      "name": "Your Name",
      "email": "yourname@yourdomain.com",
      "usage_limit": "UNLIMITED",
      "used_today": "2",
      "remaining_limit": "UNLIMITED"
    },
    "RESULTS": {
      "request": {
        "lat": "44.7977733966548",
        "lon": "-106.954917523499"
      },
      "result": {
        "coordinates": {
          "lat": "44.7977733966548",
          "lon": "-106.954917523499"
        },
        "address": {
          "full_address": "30 N Gould St, Sheridan, WY 82801, United States",
          "house_number": "30",
          "street_name": "N Gould St",
          "locality": "Sheridan",
          "admin_2": "Sheridan County",
          "admin_1": "WY",
          "country": "United States",
          "postal_code": "82801"
        },
        "accuracy": "EXACT_MATCH"
      }
    }
  }

Response Fields

STATUS

  • key: Indicates API key validity (“VALID” or “INVALID”).
  • status: Request status (“SUCCESS” or “FAILED”).
  • request: Whether the request was valid (“VALID” or “INVALID”).
  • credit_used: Number of API credits or plan queries consumed. Will be 0 on failed, as failed requests DO NOT use credit.

USER

  • key: API key used in the request.
  • name: Registered name.
  • usage_limit: Daily API query limit (e.g., “UNLIMITED” or a set number).
  • used_today: Number of requests made today.
  • remaining_limit: Remaining query limit for today.

RESULTS

  • request: The originally requested coordinates.
  • result: Contains geolocation details:
    • coordinates: The provided latitude and longitude.
    • address: Full structured address data for the location.
    • accuracy: Quality of match (e.g. “EXACT_MATCH”, “HIGH_ACCURACY”, “MEDIUM_ACCURACY”, “LOW_ACCURACY”, or “UNKNOWN_ACCURACY”).

Error Status Codes

The following are provided with each result as HTTP Status Codes:

  • 200 – Results Returned Successfully.
  • 400 – Latitude or longitude parameter missing or invalid.
  • 401 – API key is invalid or missing.
  • 402 – No credit available or expired API key.
  • 404 – No matching results found.
  • 429 – Rate limit exceeded.
  • 500 – An unexpected error occurred. In this case, contact support immediately to report the issue.