OurAirport Data Search API

BasicSearch

searchByIATA

Search for an airport by its IATA code, airport name or GeoNames ID


/airport/{nameIATAorGeoNamesID}

Usage and SDK Samples

curl -X GET -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/ourairport/airport/{nameIATAorGeoNamesID}?expand="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.BasicSearchApi;

import java.io.File;
import java.util.*;

public class BasicSearchApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        BasicSearchApi apiInstance = new BasicSearchApi();
        String apiecoKey = apiecoKey_example; // String | 
        String nameIATAorGeoNamesID = nameIATAorGeoNamesID_example; // String | The IP address to find the geolocation for
        Boolean expand = true; // Boolean | When true, expands the region and country data into a "lookup" entity set.
        try {
            inline_response_200_1 result = apiInstance.searchByIATA(apiecoKey, nameIATAorGeoNamesID, expand);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BasicSearchApi#searchByIATA");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.BasicSearchApi;

public class BasicSearchApiExample {

    public static void main(String[] args) {
        BasicSearchApi apiInstance = new BasicSearchApi();
        String apiecoKey = apiecoKey_example; // String | 
        String nameIATAorGeoNamesID = nameIATAorGeoNamesID_example; // String | The IP address to find the geolocation for
        Boolean expand = true; // Boolean | When true, expands the region and country data into a "lookup" entity set.
        try {
            inline_response_200_1 result = apiInstance.searchByIATA(apiecoKey, nameIATAorGeoNamesID, expand);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BasicSearchApi#searchByIATA");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

String *apiecoKey = apiecoKey_example; // 
String *nameIATAorGeoNamesID = nameIATAorGeoNamesID_example; // The IP address to find the geolocation for
Boolean *expand = true; // When true, expands the region and country data into a "lookup" entity set. (optional)

BasicSearchApi *apiInstance = [[BasicSearchApi alloc] init];

[apiInstance searchByIATAWith:apiecoKey
    nameIATAorGeoNamesID:nameIATAorGeoNamesID
    expand:expand
              completionHandler: ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OurAirportDataSearchApi = require('our_airport_data_search_api');
var defaultClient = OurAirportDataSearchApi.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new OurAirportDataSearchApi.BasicSearchApi()

var apiecoKey = apiecoKey_example; // {String} 

var nameIATAorGeoNamesID = nameIATAorGeoNamesID_example; // {String} The IP address to find the geolocation for

var opts = { 
  'expand': true // {Boolean} When true, expands the region and country data into a "lookup" entity set.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.searchByIATA(apiecoKey, nameIATAorGeoNamesID, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class searchByIATAExample
    {
        public void main()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new BasicSearchApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var nameIATAorGeoNamesID = nameIATAorGeoNamesID_example;  // String | The IP address to find the geolocation for
            var expand = true;  // Boolean | When true, expands the region and country data into a "lookup" entity set. (optional) 

            try
            {
                inline_response_200_1 result = apiInstance.searchByIATA(apiecoKey, nameIATAorGeoNamesID, expand);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BasicSearchApi.searchByIATA: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\BasicSearchApi();
$apiecoKey = apiecoKey_example; // String | 
$nameIATAorGeoNamesID = nameIATAorGeoNamesID_example; // String | The IP address to find the geolocation for
$expand = true; // Boolean | When true, expands the region and country data into a "lookup" entity set.

try {
    $result = $api_instance->searchByIATA($apiecoKey, $nameIATAorGeoNamesID, $expand);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BasicSearchApi->searchByIATA: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::BasicSearchApi;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::BasicSearchApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $nameIATAorGeoNamesID = nameIATAorGeoNamesID_example; # String | The IP address to find the geolocation for
my $expand = true; # Boolean | When true, expands the region and country data into a "lookup" entity set.

eval { 
    my $result = $api_instance->searchByIATA(apiecoKey => $apiecoKey, nameIATAorGeoNamesID => $nameIATAorGeoNamesID, expand => $expand);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BasicSearchApi->searchByIATA: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.BasicSearchApi()
apiecoKey = apiecoKey_example # String | 
nameIATAorGeoNamesID = nameIATAorGeoNamesID_example # String | The IP address to find the geolocation for
expand = true # Boolean | When true, expands the region and country data into a "lookup" entity set. (optional)

try: 
    api_response = api_instance.search_by_iata(apiecoKey, nameIATAorGeoNamesID, expand=expand)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BasicSearchApi->searchByIATA: %s\n" % e)

Parameters

Path parameters
Name Description
nameIATAorGeoNamesID*
String
The IP address to find the geolocation for
Required
Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
expand
Boolean
When true, expands the region and country data into a "lookup" entity set.

Responses

Status: 200 - Succesfull

Status: 401 - wrong code

Status: 405 - Invalid input


searchForRegion

Search for a region in the regions.csv dataset using one of the following: The GeoNames ID for the region (eg: "306124" that is Washington State, USA's ID) or The name of the region (eg: "Washington") or A keyword to search for the region (the final column in the regions.csv ...


/region/{nameOrIdOrKeyword}

Usage and SDK Samples

curl -X GET -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/ourairport/region/{nameOrIdOrKeyword}?expand="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.BasicSearchApi;

import java.io.File;
import java.util.*;

public class BasicSearchApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        BasicSearchApi apiInstance = new BasicSearchApi();
        String apiecoKey = apiecoKey_example; // String | 
        String nameOrIdOrKeyword = nameOrIdOrKeyword_example; // String | The name of the province/state, or its GeoNames database ID or a keyword
        Boolean expand = true; // Boolean | Provides the details of the countries (and their matched continents) in a separate "lookup" structure in the results.
        try {
            inline_response_200_1 result = apiInstance.searchForRegion(apiecoKey, nameOrIdOrKeyword, expand);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BasicSearchApi#searchForRegion");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.BasicSearchApi;

public class BasicSearchApiExample {

    public static void main(String[] args) {
        BasicSearchApi apiInstance = new BasicSearchApi();
        String apiecoKey = apiecoKey_example; // String | 
        String nameOrIdOrKeyword = nameOrIdOrKeyword_example; // String | The name of the province/state, or its GeoNames database ID or a keyword
        Boolean expand = true; // Boolean | Provides the details of the countries (and their matched continents) in a separate "lookup" structure in the results.
        try {
            inline_response_200_1 result = apiInstance.searchForRegion(apiecoKey, nameOrIdOrKeyword, expand);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BasicSearchApi#searchForRegion");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

String *apiecoKey = apiecoKey_example; // 
String *nameOrIdOrKeyword = nameOrIdOrKeyword_example; // The name of the province/state, or its GeoNames database ID or a keyword
Boolean *expand = true; // Provides the details of the countries (and their matched continents) in a separate "lookup" structure in the results.

BasicSearchApi *apiInstance = [[BasicSearchApi alloc] init];

[apiInstance searchForRegionWith:apiecoKey
    nameOrIdOrKeyword:nameOrIdOrKeyword
    expand:expand
              completionHandler: ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OurAirportDataSearchApi = require('our_airport_data_search_api');
var defaultClient = OurAirportDataSearchApi.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new OurAirportDataSearchApi.BasicSearchApi()

var apiecoKey = apiecoKey_example; // {String} 

var nameOrIdOrKeyword = nameOrIdOrKeyword_example; // {String} The name of the province/state, or its GeoNames database ID or a keyword

var expand = true; // {Boolean} Provides the details of the countries (and their matched continents) in a separate "lookup" structure in the results.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.searchForRegion(apiecoKey, nameOrIdOrKeyword, expand, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class searchForRegionExample
    {
        public void main()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new BasicSearchApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var nameOrIdOrKeyword = nameOrIdOrKeyword_example;  // String | The name of the province/state, or its GeoNames database ID or a keyword
            var expand = true;  // Boolean | Provides the details of the countries (and their matched continents) in a separate "lookup" structure in the results.

            try
            {
                inline_response_200_1 result = apiInstance.searchForRegion(apiecoKey, nameOrIdOrKeyword, expand);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BasicSearchApi.searchForRegion: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\BasicSearchApi();
$apiecoKey = apiecoKey_example; // String | 
$nameOrIdOrKeyword = nameOrIdOrKeyword_example; // String | The name of the province/state, or its GeoNames database ID or a keyword
$expand = true; // Boolean | Provides the details of the countries (and their matched continents) in a separate "lookup" structure in the results.

try {
    $result = $api_instance->searchForRegion($apiecoKey, $nameOrIdOrKeyword, $expand);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BasicSearchApi->searchForRegion: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::BasicSearchApi;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::BasicSearchApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $nameOrIdOrKeyword = nameOrIdOrKeyword_example; # String | The name of the province/state, or its GeoNames database ID or a keyword
my $expand = true; # Boolean | Provides the details of the countries (and their matched continents) in a separate "lookup" structure in the results.

eval { 
    my $result = $api_instance->searchForRegion(apiecoKey => $apiecoKey, nameOrIdOrKeyword => $nameOrIdOrKeyword, expand => $expand);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BasicSearchApi->searchForRegion: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.BasicSearchApi()
apiecoKey = apiecoKey_example # String | 
nameOrIdOrKeyword = nameOrIdOrKeyword_example # String | The name of the province/state, or its GeoNames database ID or a keyword
expand = true # Boolean | Provides the details of the countries (and their matched continents) in a separate "lookup" structure in the results.

try: 
    api_response = api_instance.search_for_region(apiecoKey, nameOrIdOrKeyword, expand)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BasicSearchApi->searchForRegion: %s\n" % e)

Parameters

Path parameters
Name Description
nameOrIdOrKeyword*
String
The name of the province/state, or its GeoNames database ID or a keyword
Required
Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
expand*
Boolean
Provides the details of the countries (and their matched continents) in a separate "lookup" structure in the results.
Required

Responses

Status: 200 - Succesfull

Status: 401 - wrong code

Status: 405 - Invalid input


searchFroCountry

SSearch for a country in the countries.csv dataset using one of the following: The GeoNames ID for the country (eg: "302634" that is India's ID) or The name of the country (eg: "India") or A keyword to search for the country (the final column in the countries.csv file).


/country/{nameOrIdOrKeyword}

Usage and SDK Samples

curl -X GET -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/ourairport/country/{nameOrIdOrKeyword}?expand="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.BasicSearchApi;

import java.io.File;
import java.util.*;

public class BasicSearchApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        BasicSearchApi apiInstance = new BasicSearchApi();
        String apiecoKey = apiecoKey_example; // String | 
        String nameOrIdOrKeyword = nameOrIdOrKeyword_example; // String | The name of the country, or its ID from the GeoNames database or a keyword
        Boolean expand = true; // Boolean | When true, expands the region and country data into a "lookup" entity set.
        try {
            inline_response_200_1 result = apiInstance.searchFroCountry(apiecoKey, nameOrIdOrKeyword, expand);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BasicSearchApi#searchFroCountry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.BasicSearchApi;

public class BasicSearchApiExample {

    public static void main(String[] args) {
        BasicSearchApi apiInstance = new BasicSearchApi();
        String apiecoKey = apiecoKey_example; // String | 
        String nameOrIdOrKeyword = nameOrIdOrKeyword_example; // String | The name of the country, or its ID from the GeoNames database or a keyword
        Boolean expand = true; // Boolean | When true, expands the region and country data into a "lookup" entity set.
        try {
            inline_response_200_1 result = apiInstance.searchFroCountry(apiecoKey, nameOrIdOrKeyword, expand);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BasicSearchApi#searchFroCountry");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

String *apiecoKey = apiecoKey_example; // 
String *nameOrIdOrKeyword = nameOrIdOrKeyword_example; // The name of the country, or its ID from the GeoNames database or a keyword
Boolean *expand = true; // When true, expands the region and country data into a "lookup" entity set. (optional)

BasicSearchApi *apiInstance = [[BasicSearchApi alloc] init];

[apiInstance searchFroCountryWith:apiecoKey
    nameOrIdOrKeyword:nameOrIdOrKeyword
    expand:expand
              completionHandler: ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OurAirportDataSearchApi = require('our_airport_data_search_api');
var defaultClient = OurAirportDataSearchApi.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new OurAirportDataSearchApi.BasicSearchApi()

var apiecoKey = apiecoKey_example; // {String} 

var nameOrIdOrKeyword = nameOrIdOrKeyword_example; // {String} The name of the country, or its ID from the GeoNames database or a keyword

var opts = { 
  'expand': true // {Boolean} When true, expands the region and country data into a "lookup" entity set.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.searchFroCountry(apiecoKey, nameOrIdOrKeyword, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class searchFroCountryExample
    {
        public void main()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new BasicSearchApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var nameOrIdOrKeyword = nameOrIdOrKeyword_example;  // String | The name of the country, or its ID from the GeoNames database or a keyword
            var expand = true;  // Boolean | When true, expands the region and country data into a "lookup" entity set. (optional) 

            try
            {
                inline_response_200_1 result = apiInstance.searchFroCountry(apiecoKey, nameOrIdOrKeyword, expand);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BasicSearchApi.searchFroCountry: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\BasicSearchApi();
$apiecoKey = apiecoKey_example; // String | 
$nameOrIdOrKeyword = nameOrIdOrKeyword_example; // String | The name of the country, or its ID from the GeoNames database or a keyword
$expand = true; // Boolean | When true, expands the region and country data into a "lookup" entity set.

try {
    $result = $api_instance->searchFroCountry($apiecoKey, $nameOrIdOrKeyword, $expand);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BasicSearchApi->searchFroCountry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::BasicSearchApi;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::BasicSearchApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $nameOrIdOrKeyword = nameOrIdOrKeyword_example; # String | The name of the country, or its ID from the GeoNames database or a keyword
my $expand = true; # Boolean | When true, expands the region and country data into a "lookup" entity set.

eval { 
    my $result = $api_instance->searchFroCountry(apiecoKey => $apiecoKey, nameOrIdOrKeyword => $nameOrIdOrKeyword, expand => $expand);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BasicSearchApi->searchFroCountry: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.BasicSearchApi()
apiecoKey = apiecoKey_example # String | 
nameOrIdOrKeyword = nameOrIdOrKeyword_example # String | The name of the country, or its ID from the GeoNames database or a keyword
expand = true # Boolean | When true, expands the region and country data into a "lookup" entity set. (optional)

try: 
    api_response = api_instance.search_fro_country(apiecoKey, nameOrIdOrKeyword, expand=expand)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BasicSearchApi->searchFroCountry: %s\n" % e)

Parameters

Path parameters
Name Description
nameOrIdOrKeyword*
String
The name of the country, or its ID from the GeoNames database or a keyword
Required
Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
expand
Boolean
When true, expands the region and country data into a "lookup" entity set.

Responses

Status: 200 - Succesfull

Status: 401 - wrong code

Status: 405 - Invalid input


Geolocate

geolocate

Translate the provided IP address to a Latitude,Longitude coordinates pair


/geolocate/{ipAddress}

Usage and SDK Samples

curl -X GET -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/ourairport/geolocate/{ipAddress}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.GeolocateApi;

import java.io.File;
import java.util.*;

public class GeolocateApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        GeolocateApi apiInstance = new GeolocateApi();
        String apiecoKey = apiecoKey_example; // String | 
        String ipAddress = ipAddress_example; // String | The IP address to find the geolocation for
        try {
            inline_response_200 result = apiInstance.geolocate(apiecoKey, ipAddress);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GeolocateApi#geolocate");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.GeolocateApi;

public class GeolocateApiExample {

    public static void main(String[] args) {
        GeolocateApi apiInstance = new GeolocateApi();
        String apiecoKey = apiecoKey_example; // String | 
        String ipAddress = ipAddress_example; // String | The IP address to find the geolocation for
        try {
            inline_response_200 result = apiInstance.geolocate(apiecoKey, ipAddress);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GeolocateApi#geolocate");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

String *apiecoKey = apiecoKey_example; // 
String *ipAddress = ipAddress_example; // The IP address to find the geolocation for

GeolocateApi *apiInstance = [[GeolocateApi alloc] init];

[apiInstance geolocateWith:apiecoKey
    ipAddress:ipAddress
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OurAirportDataSearchApi = require('our_airport_data_search_api');
var defaultClient = OurAirportDataSearchApi.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new OurAirportDataSearchApi.GeolocateApi()

var apiecoKey = apiecoKey_example; // {String} 

var ipAddress = ipAddress_example; // {String} The IP address to find the geolocation for


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.geolocate(apiecoKey, ipAddress, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class geolocateExample
    {
        public void main()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new GeolocateApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var ipAddress = ipAddress_example;  // String | The IP address to find the geolocation for

            try
            {
                inline_response_200 result = apiInstance.geolocate(apiecoKey, ipAddress);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GeolocateApi.geolocate: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\GeolocateApi();
$apiecoKey = apiecoKey_example; // String | 
$ipAddress = ipAddress_example; // String | The IP address to find the geolocation for

try {
    $result = $api_instance->geolocate($apiecoKey, $ipAddress);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GeolocateApi->geolocate: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::GeolocateApi;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::GeolocateApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $ipAddress = ipAddress_example; # String | The IP address to find the geolocation for

eval { 
    my $result = $api_instance->geolocate(apiecoKey => $apiecoKey, ipAddress => $ipAddress);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GeolocateApi->geolocate: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.GeolocateApi()
apiecoKey = apiecoKey_example # String | 
ipAddress = ipAddress_example # String | The IP address to find the geolocation for

try: 
    api_response = api_instance.geolocate(apiecoKey, ipAddress)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GeolocateApi->geolocate: %s\n" % e)

Parameters

Path parameters
Name Description
ipAddress*
String
The IP address to find the geolocation for
Required
Header parameters
Name Description
apieco-key*
String
Required

Responses

Status: 200 - Succesfull

Status: 401 - wrong code

Status: 405 - Invalid input


HelpfulEndpoints

allAirportsinRegion

Returns all the airports with the provided country and region


/airports-in/{country}/{region}

Usage and SDK Samples

curl -X GET -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/ourairport/airports-in/{country}/{region}?expand="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.HelpfulEndpointsApi;

import java.io.File;
import java.util.*;

public class HelpfulEndpointsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        HelpfulEndpointsApi apiInstance = new HelpfulEndpointsApi();
        String apiecoKey = apiecoKey_example; // String | 
        String country = country_example; // String | Country, 2-letter ISO code, or name of the country
        String region = region_example; // String | (Optional) State or Province, 5-letter ISO code, or full name of the region. When omitted, will return ALL the airports in the provided Country.
        Boolean expand = true; // Boolean | If set, will return expanded information about the country and the region
        try {
            inline_response_200_1 result = apiInstance.allAirportsinRegion(apiecoKey, country, region, expand);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HelpfulEndpointsApi#allAirportsinRegion");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.HelpfulEndpointsApi;

public class HelpfulEndpointsApiExample {

    public static void main(String[] args) {
        HelpfulEndpointsApi apiInstance = new HelpfulEndpointsApi();
        String apiecoKey = apiecoKey_example; // String | 
        String country = country_example; // String | Country, 2-letter ISO code, or name of the country
        String region = region_example; // String | (Optional) State or Province, 5-letter ISO code, or full name of the region. When omitted, will return ALL the airports in the provided Country.
        Boolean expand = true; // Boolean | If set, will return expanded information about the country and the region
        try {
            inline_response_200_1 result = apiInstance.allAirportsinRegion(apiecoKey, country, region, expand);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HelpfulEndpointsApi#allAirportsinRegion");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

String *apiecoKey = apiecoKey_example; // 
String *country = country_example; // Country, 2-letter ISO code, or name of the country
String *region = region_example; // (Optional) State or Province, 5-letter ISO code, or full name of the region. When omitted, will return ALL the airports in the provided Country.
Boolean *expand = true; // If set, will return expanded information about the country and the region

HelpfulEndpointsApi *apiInstance = [[HelpfulEndpointsApi alloc] init];

[apiInstance allAirportsinRegionWith:apiecoKey
    country:country
    region:region
    expand:expand
              completionHandler: ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OurAirportDataSearchApi = require('our_airport_data_search_api');
var defaultClient = OurAirportDataSearchApi.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new OurAirportDataSearchApi.HelpfulEndpointsApi()

var apiecoKey = apiecoKey_example; // {String} 

var country = country_example; // {String} Country, 2-letter ISO code, or name of the country

var region = region_example; // {String} (Optional) State or Province, 5-letter ISO code, or full name of the region. When omitted, will return ALL the airports in the provided Country.

var expand = true; // {Boolean} If set, will return expanded information about the country and the region


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.allAirportsinRegion(apiecoKey, country, region, expand, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class allAirportsinRegionExample
    {
        public void main()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new HelpfulEndpointsApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var country = country_example;  // String | Country, 2-letter ISO code, or name of the country
            var region = region_example;  // String | (Optional) State or Province, 5-letter ISO code, or full name of the region. When omitted, will return ALL the airports in the provided Country.
            var expand = true;  // Boolean | If set, will return expanded information about the country and the region

            try
            {
                inline_response_200_1 result = apiInstance.allAirportsinRegion(apiecoKey, country, region, expand);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling HelpfulEndpointsApi.allAirportsinRegion: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\HelpfulEndpointsApi();
$apiecoKey = apiecoKey_example; // String | 
$country = country_example; // String | Country, 2-letter ISO code, or name of the country
$region = region_example; // String | (Optional) State or Province, 5-letter ISO code, or full name of the region. When omitted, will return ALL the airports in the provided Country.
$expand = true; // Boolean | If set, will return expanded information about the country and the region

try {
    $result = $api_instance->allAirportsinRegion($apiecoKey, $country, $region, $expand);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling HelpfulEndpointsApi->allAirportsinRegion: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::HelpfulEndpointsApi;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::HelpfulEndpointsApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $country = country_example; # String | Country, 2-letter ISO code, or name of the country
my $region = region_example; # String | (Optional) State or Province, 5-letter ISO code, or full name of the region. When omitted, will return ALL the airports in the provided Country.
my $expand = true; # Boolean | If set, will return expanded information about the country and the region

eval { 
    my $result = $api_instance->allAirportsinRegion(apiecoKey => $apiecoKey, country => $country, region => $region, expand => $expand);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling HelpfulEndpointsApi->allAirportsinRegion: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.HelpfulEndpointsApi()
apiecoKey = apiecoKey_example # String | 
country = country_example # String | Country, 2-letter ISO code, or name of the country
region = region_example # String | (Optional) State or Province, 5-letter ISO code, or full name of the region. When omitted, will return ALL the airports in the provided Country.
expand = true # Boolean | If set, will return expanded information about the country and the region

try: 
    api_response = api_instance.all_airportsin_region(apiecoKey, country, region, expand)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling HelpfulEndpointsApi->allAirportsinRegion: %s\n" % e)

Parameters

Path parameters
Name Description
country*
String
Country, 2-letter ISO code, or name of the country
Required
region*
String
(Optional) State or Province, 5-letter ISO code, or full name of the region. When omitted, will return ALL the airports in the provided Country.
Required
Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
expand*
Boolean
If set, will return expanded information about the country and the region
Required

Responses

Status: 200 - Succesfull

Status: 401 - wrong code

Status: 405 - Invalid input


NearestAirport

nearestAirportByIPV4

Get the nearest airport by IP Address


/nearest/{ipv4_address}

Usage and SDK Samples

curl -X GET -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/ourairport/nearest/{ipv4_address}?iataOnly=&expand=&maxResults="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NearestAirportApi;

import java.io.File;
import java.util.*;

public class NearestAirportApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        NearestAirportApi apiInstance = new NearestAirportApi();
        String apiecoKey = apiecoKey_example; // String | 
        String ipv4Address = ipv4Address_example; // String | Geographical coordinates (Latitude & Longitude) separated by comma
        Boolean expand = true; // Boolean | When TRUE, the regions, countries and continents are expanded into a "lookup" extension element.
        BigDecimal maxResults = 8.14; // BigDecimal | Maximum number of airports to return. With increasing number, airports further away are returned (1 - only the most nearest airport, 100 - even airports hundreds of Km away are returned)
        Boolean iataOnly = true; // Boolean | When TRUE, only returns airports that have an IATA code (private and special purpose airports and heliports/etc may not have an IATA code)
        try {
            inline_response_200_1 result = apiInstance.nearestAirportByIPV4(apiecoKey, ipv4Address, expand, maxResults, iataOnly);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NearestAirportApi#nearestAirportByIPV4");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NearestAirportApi;

public class NearestAirportApiExample {

    public static void main(String[] args) {
        NearestAirportApi apiInstance = new NearestAirportApi();
        String apiecoKey = apiecoKey_example; // String | 
        String ipv4Address = ipv4Address_example; // String | Geographical coordinates (Latitude & Longitude) separated by comma
        Boolean expand = true; // Boolean | When TRUE, the regions, countries and continents are expanded into a "lookup" extension element.
        BigDecimal maxResults = 8.14; // BigDecimal | Maximum number of airports to return. With increasing number, airports further away are returned (1 - only the most nearest airport, 100 - even airports hundreds of Km away are returned)
        Boolean iataOnly = true; // Boolean | When TRUE, only returns airports that have an IATA code (private and special purpose airports and heliports/etc may not have an IATA code)
        try {
            inline_response_200_1 result = apiInstance.nearestAirportByIPV4(apiecoKey, ipv4Address, expand, maxResults, iataOnly);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NearestAirportApi#nearestAirportByIPV4");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

String *apiecoKey = apiecoKey_example; // 
String *ipv4Address = ipv4Address_example; // Geographical coordinates (Latitude & Longitude) separated by comma
Boolean *expand = true; // When TRUE, the regions, countries and continents are expanded into a "lookup" extension element.
BigDecimal *maxResults = 8.14; // Maximum number of airports to return. With increasing number, airports further away are returned (1 - only the most nearest airport, 100 - even airports hundreds of Km away are returned)
Boolean *iataOnly = true; // When TRUE, only returns airports that have an IATA code (private and special purpose airports and heliports/etc may not have an IATA code) (optional)

NearestAirportApi *apiInstance = [[NearestAirportApi alloc] init];

[apiInstance nearestAirportByIPV4With:apiecoKey
    ipv4Address:ipv4Address
    expand:expand
    maxResults:maxResults
    iataOnly:iataOnly
              completionHandler: ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OurAirportDataSearchApi = require('our_airport_data_search_api');
var defaultClient = OurAirportDataSearchApi.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new OurAirportDataSearchApi.NearestAirportApi()

var apiecoKey = apiecoKey_example; // {String} 

var ipv4Address = ipv4Address_example; // {String} Geographical coordinates (Latitude & Longitude) separated by comma

var expand = true; // {Boolean} When TRUE, the regions, countries and continents are expanded into a "lookup" extension element.

var maxResults = 8.14; // {BigDecimal} Maximum number of airports to return. With increasing number, airports further away are returned (1 - only the most nearest airport, 100 - even airports hundreds of Km away are returned)

var opts = { 
  'iataOnly': true // {Boolean} When TRUE, only returns airports that have an IATA code (private and special purpose airports and heliports/etc may not have an IATA code)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.nearestAirportByIPV4(apiecoKey, ipv4Address, expand, maxResults, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class nearestAirportByIPV4Example
    {
        public void main()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new NearestAirportApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var ipv4Address = ipv4Address_example;  // String | Geographical coordinates (Latitude & Longitude) separated by comma
            var expand = true;  // Boolean | When TRUE, the regions, countries and continents are expanded into a "lookup" extension element.
            var maxResults = 8.14;  // BigDecimal | Maximum number of airports to return. With increasing number, airports further away are returned (1 - only the most nearest airport, 100 - even airports hundreds of Km away are returned)
            var iataOnly = true;  // Boolean | When TRUE, only returns airports that have an IATA code (private and special purpose airports and heliports/etc may not have an IATA code) (optional) 

            try
            {
                inline_response_200_1 result = apiInstance.nearestAirportByIPV4(apiecoKey, ipv4Address, expand, maxResults, iataOnly);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NearestAirportApi.nearestAirportByIPV4: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\NearestAirportApi();
$apiecoKey = apiecoKey_example; // String | 
$ipv4Address = ipv4Address_example; // String | Geographical coordinates (Latitude & Longitude) separated by comma
$expand = true; // Boolean | When TRUE, the regions, countries and continents are expanded into a "lookup" extension element.
$maxResults = 8.14; // BigDecimal | Maximum number of airports to return. With increasing number, airports further away are returned (1 - only the most nearest airport, 100 - even airports hundreds of Km away are returned)
$iataOnly = true; // Boolean | When TRUE, only returns airports that have an IATA code (private and special purpose airports and heliports/etc may not have an IATA code)

try {
    $result = $api_instance->nearestAirportByIPV4($apiecoKey, $ipv4Address, $expand, $maxResults, $iataOnly);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NearestAirportApi->nearestAirportByIPV4: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NearestAirportApi;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::NearestAirportApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $ipv4Address = ipv4Address_example; # String | Geographical coordinates (Latitude & Longitude) separated by comma
my $expand = true; # Boolean | When TRUE, the regions, countries and continents are expanded into a "lookup" extension element.
my $maxResults = 8.14; # BigDecimal | Maximum number of airports to return. With increasing number, airports further away are returned (1 - only the most nearest airport, 100 - even airports hundreds of Km away are returned)
my $iataOnly = true; # Boolean | When TRUE, only returns airports that have an IATA code (private and special purpose airports and heliports/etc may not have an IATA code)

eval { 
    my $result = $api_instance->nearestAirportByIPV4(apiecoKey => $apiecoKey, ipv4Address => $ipv4Address, expand => $expand, maxResults => $maxResults, iataOnly => $iataOnly);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NearestAirportApi->nearestAirportByIPV4: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.NearestAirportApi()
apiecoKey = apiecoKey_example # String | 
ipv4Address = ipv4Address_example # String | Geographical coordinates (Latitude & Longitude) separated by comma
expand = true # Boolean | When TRUE, the regions, countries and continents are expanded into a "lookup" extension element.
maxResults = 8.14 # BigDecimal | Maximum number of airports to return. With increasing number, airports further away are returned (1 - only the most nearest airport, 100 - even airports hundreds of Km away are returned)
iataOnly = true # Boolean | When TRUE, only returns airports that have an IATA code (private and special purpose airports and heliports/etc may not have an IATA code) (optional)

try: 
    api_response = api_instance.nearest_airport_by_ipv4(apiecoKey, ipv4Address, expand, maxResults, iataOnly=iataOnly)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NearestAirportApi->nearestAirportByIPV4: %s\n" % e)

Parameters

Path parameters
Name Description
ipv4_address*
String
Geographical coordinates (Latitude & Longitude) separated by comma
Required
Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
iataOnly
Boolean
When TRUE, only returns airports that have an IATA code (private and special purpose airports and heliports/etc may not have an IATA code)
expand*
Boolean
When TRUE, the regions, countries and continents are expanded into a "lookup" extension element.
Required
maxResults*
BigDecimal
Maximum number of airports to return. With increasing number, airports further away are returned (1 - only the most nearest airport, 100 - even airports hundreds of Km away are returned)
Required

Responses

Status: 200 - Succesfull

Status: 401 - wrong code

Status: 405 - Invalid input


nearestAirportByLatLon

Finds the nearest airport to the provided coordinates


/nearest/{LatLon}

Usage and SDK Samples

curl -X GET -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/ourairport/nearest/{LatLon}?iataOnly=&expand=&maxResults="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NearestAirportApi;

import java.io.File;
import java.util.*;

public class NearestAirportApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        NearestAirportApi apiInstance = new NearestAirportApi();
        String apiecoKey = apiecoKey_example; // String | 
        String latLon = latLon_example; // String | Geographical coordinates (Latitude & Longitude) separated by comma
        Boolean expand = true; // Boolean | When TRUE, the regions, countries and continents are expanded into a "lookup" extension element.
        BigDecimal maxResults = 8.14; // BigDecimal | Maximum number of airports to return. With increasing number, airports further away are returned (1 - only the most nearest airport, 100 - even airports hundreds of Km away are returned)
        Boolean iataOnly = true; // Boolean | When TRUE, only returns airports that have an IATA code (private and special purpose airports and heliports/etc may not have an IATA code)
        try {
            inline_response_200_1 result = apiInstance.nearestAirportByLatLon(apiecoKey, latLon, expand, maxResults, iataOnly);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NearestAirportApi#nearestAirportByLatLon");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NearestAirportApi;

public class NearestAirportApiExample {

    public static void main(String[] args) {
        NearestAirportApi apiInstance = new NearestAirportApi();
        String apiecoKey = apiecoKey_example; // String | 
        String latLon = latLon_example; // String | Geographical coordinates (Latitude & Longitude) separated by comma
        Boolean expand = true; // Boolean | When TRUE, the regions, countries and continents are expanded into a "lookup" extension element.
        BigDecimal maxResults = 8.14; // BigDecimal | Maximum number of airports to return. With increasing number, airports further away are returned (1 - only the most nearest airport, 100 - even airports hundreds of Km away are returned)
        Boolean iataOnly = true; // Boolean | When TRUE, only returns airports that have an IATA code (private and special purpose airports and heliports/etc may not have an IATA code)
        try {
            inline_response_200_1 result = apiInstance.nearestAirportByLatLon(apiecoKey, latLon, expand, maxResults, iataOnly);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NearestAirportApi#nearestAirportByLatLon");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

String *apiecoKey = apiecoKey_example; // 
String *latLon = latLon_example; // Geographical coordinates (Latitude & Longitude) separated by comma
Boolean *expand = true; // When TRUE, the regions, countries and continents are expanded into a "lookup" extension element.
BigDecimal *maxResults = 8.14; // Maximum number of airports to return. With increasing number, airports further away are returned (1 - only the most nearest airport, 100 - even airports hundreds of Km away are returned)
Boolean *iataOnly = true; // When TRUE, only returns airports that have an IATA code (private and special purpose airports and heliports/etc may not have an IATA code) (optional)

NearestAirportApi *apiInstance = [[NearestAirportApi alloc] init];

[apiInstance nearestAirportByLatLonWith:apiecoKey
    latLon:latLon
    expand:expand
    maxResults:maxResults
    iataOnly:iataOnly
              completionHandler: ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OurAirportDataSearchApi = require('our_airport_data_search_api');
var defaultClient = OurAirportDataSearchApi.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new OurAirportDataSearchApi.NearestAirportApi()

var apiecoKey = apiecoKey_example; // {String} 

var latLon = latLon_example; // {String} Geographical coordinates (Latitude & Longitude) separated by comma

var expand = true; // {Boolean} When TRUE, the regions, countries and continents are expanded into a "lookup" extension element.

var maxResults = 8.14; // {BigDecimal} Maximum number of airports to return. With increasing number, airports further away are returned (1 - only the most nearest airport, 100 - even airports hundreds of Km away are returned)

var opts = { 
  'iataOnly': true // {Boolean} When TRUE, only returns airports that have an IATA code (private and special purpose airports and heliports/etc may not have an IATA code)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.nearestAirportByLatLon(apiecoKey, latLon, expand, maxResults, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class nearestAirportByLatLonExample
    {
        public void main()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new NearestAirportApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var latLon = latLon_example;  // String | Geographical coordinates (Latitude & Longitude) separated by comma
            var expand = true;  // Boolean | When TRUE, the regions, countries and continents are expanded into a "lookup" extension element.
            var maxResults = 8.14;  // BigDecimal | Maximum number of airports to return. With increasing number, airports further away are returned (1 - only the most nearest airport, 100 - even airports hundreds of Km away are returned)
            var iataOnly = true;  // Boolean | When TRUE, only returns airports that have an IATA code (private and special purpose airports and heliports/etc may not have an IATA code) (optional) 

            try
            {
                inline_response_200_1 result = apiInstance.nearestAirportByLatLon(apiecoKey, latLon, expand, maxResults, iataOnly);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NearestAirportApi.nearestAirportByLatLon: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\NearestAirportApi();
$apiecoKey = apiecoKey_example; // String | 
$latLon = latLon_example; // String | Geographical coordinates (Latitude & Longitude) separated by comma
$expand = true; // Boolean | When TRUE, the regions, countries and continents are expanded into a "lookup" extension element.
$maxResults = 8.14; // BigDecimal | Maximum number of airports to return. With increasing number, airports further away are returned (1 - only the most nearest airport, 100 - even airports hundreds of Km away are returned)
$iataOnly = true; // Boolean | When TRUE, only returns airports that have an IATA code (private and special purpose airports and heliports/etc may not have an IATA code)

try {
    $result = $api_instance->nearestAirportByLatLon($apiecoKey, $latLon, $expand, $maxResults, $iataOnly);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NearestAirportApi->nearestAirportByLatLon: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NearestAirportApi;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::NearestAirportApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $latLon = latLon_example; # String | Geographical coordinates (Latitude & Longitude) separated by comma
my $expand = true; # Boolean | When TRUE, the regions, countries and continents are expanded into a "lookup" extension element.
my $maxResults = 8.14; # BigDecimal | Maximum number of airports to return. With increasing number, airports further away are returned (1 - only the most nearest airport, 100 - even airports hundreds of Km away are returned)
my $iataOnly = true; # Boolean | When TRUE, only returns airports that have an IATA code (private and special purpose airports and heliports/etc may not have an IATA code)

eval { 
    my $result = $api_instance->nearestAirportByLatLon(apiecoKey => $apiecoKey, latLon => $latLon, expand => $expand, maxResults => $maxResults, iataOnly => $iataOnly);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NearestAirportApi->nearestAirportByLatLon: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.NearestAirportApi()
apiecoKey = apiecoKey_example # String | 
latLon = latLon_example # String | Geographical coordinates (Latitude & Longitude) separated by comma
expand = true # Boolean | When TRUE, the regions, countries and continents are expanded into a "lookup" extension element.
maxResults = 8.14 # BigDecimal | Maximum number of airports to return. With increasing number, airports further away are returned (1 - only the most nearest airport, 100 - even airports hundreds of Km away are returned)
iataOnly = true # Boolean | When TRUE, only returns airports that have an IATA code (private and special purpose airports and heliports/etc may not have an IATA code) (optional)

try: 
    api_response = api_instance.nearest_airport_by_lat_lon(apiecoKey, latLon, expand, maxResults, iataOnly=iataOnly)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NearestAirportApi->nearestAirportByLatLon: %s\n" % e)

Parameters

Path parameters
Name Description
LatLon*
String
Geographical coordinates (Latitude & Longitude) separated by comma
Required
Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
iataOnly
Boolean
When TRUE, only returns airports that have an IATA code (private and special purpose airports and heliports/etc may not have an IATA code)
expand*
Boolean
When TRUE, the regions, countries and continents are expanded into a "lookup" extension element.
Required
maxResults*
BigDecimal
Maximum number of airports to return. With increasing number, airports further away are returned (1 - only the most nearest airport, 100 - even airports hundreds of Km away are returned)
Required

Responses

Status: 200 - Succesfull

Status: 401 - wrong code

Status: 405 - Invalid input