Get Countries Info By Code Scraper avatar

Get Countries Info By Code Scraper

Try for free

1 day trial then $45.00/month - No credit card required now

Go to Store
Get Countries Info By Code Scraper

Get Countries Info By Code Scraper

dev_bodex/get-countries-info-by-code-scraper
Try for free

1 day trial then $45.00/month - No credit card required now

This scraper is designed to retrieve detailed information about countries by their respective ISO country codes (e.g., "US" for the United States) or by their currency codes (e.g., "USD" for US Dollar).

This Apify actor is designed to retrieve detailed country information based on either ISO country codes (alpha-2 or alpha-3) or ISO currency codes. The scraper collects essential data about each country, such as country name, capital, population, area, official languages, currency information, and much more.

Features

  • Input Types: Accepts ISO country codes (e.g., US, GB, USA) or currency codes (e.g., USD, EUR).

  • Batch Processing: Supports processing multiple country or currency codes in one run.

  • Comprehensive Data: Retrieves extensive information about countries, including: Country name, Capital city, Official languages, Continent, International olympic committee, Federal information processing standards, Domain, Currency name, code, and symbol, Country calling code, Latitude and longitude, Fraction unit, Numeric currency code, Country flag (URL to the image),

  • Output Formats: Results are available in JSON.

How It Works

This actor scrapes or pulls data from reliable sources to gather accurate country information based on the input codes provided. It can also fall back on APIs if necessary to ensure complete and up-to-date data.

Input

The input is a JSON object containing the following fields:

1{
2  "codes": ["US"],
3
4}

codes: An array of ISO country or currency codes (either alpha-2, alpha-3 for country codes, or currency codes).

Output

The output is an array of country objects in the selected format. For example:

1[
2  {
3    "codes": [
4      "US",
5    ],
6    "info": [
7      {
8        "flag": "//upload.wikimedia.org/wikipedia/en/thumb/a/a4/Flag_of_the_United_States.svg/23px-Flag_of_the_United_States.svg.png",
9        "country": "United States",
10        "capital": "Washington D.C.",
11        "continent": "America",
12        "language": "English",
13        "alpha2Code": "US",
14        "alpha3Code": "USA",
15        "dialingCode": "+1",
16        "currencyName": "United States Dollar",
17        "currencyCode": "USD",
18        "currencySymbol": "$",
19        "latitude": "37.09024",
20        "longitude": "-95.712891",
21        "ioc": "USA",
22        "domain": ".us",
23        "fips": "US",
24        "fractionalUnit": "Cent[A]",
25        "numericCurrencyCode": "840"
26      }
27    ]
28  }
29]

Example Use Cases

** E-commerce platforms **: Ensure valid country or currency codes for international transactions. ** Currency Exchange Systems **: Validate country and currency codes. ** Travel Agencies **: Display country-specific information such as capital, population, and time zones. ** Data Analysts **: Use the data for demographic or geopolitical analysis.

Output Formats

The output can be exported in the JSON formats:

Usage

On the Apify Platform Go to the Get Countries Info By Code Scraper actor on Apify. Provide your input (country or currency codes). Run the actor and wait for it to complete.

Locally via Apify CLI Install Apify CLI. Run the actor locally using the following command: bash Copy code apify run your-username/get-countries-info-by-code-scraper --input='{"codes": ["US", "GB", "EUR"]}' Input Example

1{
2  "codes": ["US", "GB", "EUR"]
3}

This input will fetch the country information for the United States, United Kingdom And all countries with EUR currencies.

For any issues, suggestions, or feature requests, please open an issue or contact us via Apify's support.

Developer
Maintained by Community

Actor Metrics

  • 1 monthly user

  • 1 star

  • >99% runs succeeded

  • Created in Oct 2024

  • Modified 2 months ago