Skip to content

Authentication

Let’s get you set up with Anyparser! 🔑 This guide walks you through getting your API credentials and setting up authentication securely in your application.

Getting Your API Key

First things first - you’ll need an API key to start using Anyparser. Head over to Anyparser Studio to create your account and generate your key.

Setting Up Authentication

You have two ways to configure authentication. Let’s look at both:

Environment Variables (Easiest)

The easiest way to use your API key is through environment variables. This method is:

  • ✅ Easy to set up
  • ✅ DevOps-friendly
  • ❌ Less secure
Terminal window
export ANYPARSER_API_URL=https://anyparserapi.com
export ANYPARSER_API_KEY=your-api-key

Direct Configuration

You can also provide your API key in code. However:

from anyparser_core import Anyparser, AnyparserOption
options = AnyparserOption(
api_url="https://anyparserapi.com",
api_key="your-api-key"
)
parser = Anyparser(options)

Regional Endpoints

Choose the API endpoint closest to your application for optimal performance:

Global 🌍

https://anyparserapi.com

  • Default endpoint
  • USA optimized
  • Global load balancing

Europe 🇪🇺

https://eu.anyparserapi.com

  • GDPR compliant
  • EU data residency
  • Lower latency for EU

Next Steps

Now that you’re authenticated:

  1. Parse your first document
  2. Explore OCR capabilities
  3. Try web crawling
  4. Check out AI integrations