Documentation API
Référence technique pour intégrer EventsDatas

Exemples API

Exemples prêts à copier

Utilisez ces exemples pour intégrer rapidement l’API EventsDatas dans vos applications, sites web et plateformes.

curl

curl -H "X-API-Key: VOTRE_CLE_API" \
"https://api.eventsdatas.cloud/api/v1/events?per_page=5"

PHP

<?php

$response = file_get_contents(
    'https://api.eventsdatas.cloud/api/v1/events?per_page=5',
    false,
    stream_context_create([
        'http' => [
            'header' => "X-API-Key: VOTRE_CLE_API\r\n"
        ]
    ])
);

$data = json_decode($response, true);

print_r($data);

JavaScript Fetch

fetch('https://api.eventsdatas.cloud/api/v1/events?per_page=5', {
    headers: {
        'X-API-Key': 'VOTRE_CLE_API'
    }
})
.then(response => response.json())
.then(data => {
    console.log(data);
});

Exemple filtré

https://api.eventsdatas.cloud/api/v1/events?city=Paris&category=concert