Getting Started with the Fetching Company API
Quick Start
Getting started with the Fetching Company API takes about 5 minutes. This guide walks you through setup, authentication, and your first API call.
Step 1: Create an Account
Sign up for a free account. No credit card required. The free plan includes 50 credits per month.
Step 2: Generate an API Key
After signing in, go to your dashboard and create a new API token. Copy the token immediately, as it will only be shown once.
Step 3: Make Your First Request
cURL
curl -X POST https://api.fetching.company/v1/analyze \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://github.com"}'
JavaScript (Fetch)
const response = await fetch('https://api.fetching.company/v1/analyze', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
url: 'https://github.com',
}),
});
const brand = await response.json();
console.log(brand);
PHP (Laravel Http)
use Illuminate\Support\Facades\Http;
$response = Http::withToken('YOUR_API_KEY')
->post('https://api.fetching.company/v1/analyze', [
'url' => 'https://github.com',
]);
$brand = $response->json();
Python (requests)
import requests
response = requests.post(
'https://api.fetching.company/v1/analyze',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
json={'url': 'https://github.com'},
)
brand = response.json()
print(brand)
Understanding the Response
The API returns a JSON object with the following top-level keys:
{
"domain": "github.com",
"url": "https://github.com",
"logos": [...],
"colors": {...},
"fonts": {...},
"contact": {...},
"socials": [...],
"meta": {...}
}
Logos
An array of logo objects, each with a URL, format, dimensions, and source:
{
"url": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png",
"format": "png",
"width": 560,
"height": 560,
"source": "meta"
}
Colors
An object with semantic color roles:
{
"primary": "#24292f",
"secondary": "#0969da",
"accent": "#1f883d",
"background": "#ffffff",
"text": "#1f2328"
}
Fonts
Heading and body font information with CDN links:
{
"heading": {
"family": "Mona Sans",
"weights": [400, 600, 700],
"source": "self-hosted"
},
"body": {
"family": "Mona Sans",
"weights": [400, 500],
"source": "self-hosted"
}
}
Error Handling
The API uses standard HTTP status codes:
| Status | Meaning |
|---|---|
| 200 | Success |
| 401 | Invalid or missing API key |
| 422 | Invalid URL provided |
| 429 | Rate limit exceeded |
| 500 | Server error (retry with backoff) |
Always check the status code before processing the response:
if (!response.ok) {
const error = await response.json();
console.error(`API error ${response.status}: ${error.message}`);
return;
}
Rate Limits
Rate limits depend on your plan:
- Free: 10 requests per minute
- Starter: 30 requests per minute
- Pro: 60 requests per minute
- Business: 120 requests per minute
Rate limit headers are included in every response:
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 29
X-RateLimit-Reset: 1706745600
AI Enhancement
Pro plans and above include access to AI Enhancement, which adds brand descriptions, color corrections, and confidence scores:
curl -X POST https://api.fetching.company/v1/analyze \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"url": "https://github.com", "enhance": true}'
AI Enhancement costs 2 credits per call instead of 1.
Next Steps
- Read the full API documentation for all available endpoints and options
- Explore the pricing page to find the right plan for your usage
- Join the community to share use cases and get help
Happy fetching!