Getting Started


API Access Key & Authentication

To make an API request, you will need an API access key and authenticate with the API by attaching the access_key GET parameter to the base URL and set it to your unique access key. Find below an example request.

Example API Request:

Sign Up to Run API Request


A unique API access key is generated for each mediastack account, and it usually never changes. There can only ever be one API access key at a time per account. If you need to re-generate your key, you can do so by logging in to your account dashboard.

Keep your key safe: To avoid abuse of your mediastack account, please keep your API access key safe, do not use it in client-side applications and do not publish it anywhere.

256-bit HTTPS Encryption 

To connect to the mediastack API using 256-bit HTTPS (SSL) encryption, you will simply need to use HTTPS protocol instead of HTTP. You can do so by simply attaching s to HTTP, resulting in https://.

Example API Request:

API Errors

If your API request was unsuccessful, you will receive a JSON error in the format outlined below, carrying code, message and context response objects in order to communicate the type of error that occurred and details to go with it. The API will also return HTTP status codes in accordance with the type of API response sent.

Below you will find an example API error that occurs if an unknown value is set for the API's date parameter.

Example Error:

Common API Errors:

TypeDescription
invalid_access_keyAn invalid API access key was supplied.
missing_access_keyNo API access key was supplied.
inactive_userThe given user account is inactive.
function_access_restrictedThe given API endpoint is not supported on the current subscription plan.
invalid_api_functionThe given API endpoint does not exist.
404_not_foundResource not found.
usage_limit_reachedThe given user account has reached its monthly allowed request volume.
rate_limit_reachedThe given user account has reached the rate limit.
internal_errorAn internal error occurred.

 

Questions? Contact Sales .
Need help? Contact Support .
© 2025 APILayer. All rights reserved.