Concursuri Pescuit for developers

A public, versioned, read-only JSON API plus signed webhooks, feeds and embeddable widgets for fishing competitions. Base URL: https://api.concursuripescuit.ro/v1. OpenAPI 3.1: openapi.json.

Quick start

No key is needed to try it (25 items per page, 30 requests/minute per IP):

curl -s 'https://api.concursuripescuit.ro/v1/competitions?country=RO&status=published&per_page=5' \
  -H 'Authorization: Bearer cp_your_key_here'

PHP

<?php
$ch = curl_init('https://api.concursuripescuit.ro/v1/competitions?country=RO&per_page=5');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer cp_your_key_here'], // optional
]);
$response = json_decode(curl_exec($ch), true);
foreach ($response['data'] as $c) {
    echo $c['starts_at'] . '  ' . $c['title'] . PHP_EOL;
}

JavaScript

const res = await fetch('https://api.concursuripescuit.ro/v1/competitions?country=RO&per_page=5', {
  headers: { Authorization: 'Bearer cp_your_key_here' }, // optional
});
if (!res.ok) throw new Error((await res.json()).error.message);
const { data, meta } = await res.json();
data.forEach((c) => console.log(c.starts_at, c.title));

Python

import requests

r = requests.get(
    "https://api.concursuripescuit.ro/v1/competitions",
    params={"country": "RO", "per_page": 5},
    headers={"Authorization": "Bearer cp_your_key_here"},  # optional
    timeout=10,
)
r.raise_for_status()
for c in r.json()["data"]:
    print(c["starts_at"], c["title"])

Authentication

Organizers create API keys in the organizer area (Organization → API keys & webhooks). Send the key as Authorization: Bearer cp_… or X-API-Key: cp_…. A key raises the rate limit (per your plan) and the page size to 100. Keys are shown once and stored only as hashes; revoke them any time. An invalid key is rejected with 401, it is never silently treated as anonymous.

Responses

Lists: {"data": [...], "meta": {"page","per_page","total","total_pages"}, "links": {"self","first","last","prev","next"}}. Single resources: {"data": {...}}.

Weights are integer grams (weight_g) plus an exact decimal string in the competition's unit (weight); money amounts are decimal strings. Times are ISO 8601 with the competition's time zone, and UTC variants (*_utc). Responses carry an ETag: send If-None-Match to receive 304 and save bandwidth.

Errors

{
    "error": {
        "code": "validation_failed",
        "message": "One or more query parameters are invalid.",
        "details": [
            {
                "parameter": "per_page",
                "message": "Must be an integer between 1 and 25."
            }
        ],
        "request_id": "3f9c1a7e5b2d4c60"
    }
}
HTTPerror.codeMeaning
401invalid_api_keyKey missing/malformed, revoked or unknown.
404not_foundUnknown endpoint, or the resource does not exist or is not public.
405method_not_allowedThe API is read-only; use GET.
422validation_failedInvalid or unknown query parameter (see details).
429rate_limitedToo many requests; wait Retry-After seconds.

Quote request_id (also the X-Request-Id header) when asking for support.

Rate limits

Fixed one-minute windows per key (or per IP without a key). Every response has X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (Unix time). On 429 honour Retry-After. Prefer webhooks or feeds over frequent polling; cache using ETag.

Versioning

The major version is in the path (/v1). Within v1 we only add fields, endpoints and optional parameters; clients must ignore unknown fields. Breaking changes ship as /v2 with a long overlap, announced in advance. Webhook payloads carry api_version.

Data and privacy

Only public data is returned: no drafts, private competitions, e-mail addresses or phone numbers of participants. Participant lists contain confirmed participants (name, club, country, team) as published by the organizer; competition contacts appear only if the organizer marked them public. Please respect personal-data law when re-publishing.