Skip to content

Commit 5d3890c

Browse files
rahulkeerthiclaude
andcommitted
docs: overhaul openapi.yaml — add batch endpoints, fix schema gaps
- Add /batch/lookup and /batch/resolve endpoint definitions - Add count to LookupResponse, current_team_qid + custom_ids_count to schemas - Expand resolve provider enum to all 35 providers - Fix search description (prefix matching, not fuzzy) - Point server URL to RapidAPI - Add BatchLookupResponse/BatchResolveResponse with oneOf error shapes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 016ac23 commit 5d3890c

1 file changed

Lines changed: 146 additions & 17 deletions

File tree

openapi.yaml

Lines changed: 146 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,39 @@ info:
55
The football entity register. Resolve player, team, and coach IDs across
66
Transfermarkt, FBref, Sofascore, Understat, WhoScored, and 30+ data providers.
77
8-
475,000+ entities with cross-provider ID mappings sourced from Wikidata
8+
435,000+ entities with cross-provider ID mappings sourced from Wikidata
99
and custom verified sources. Updated weekly.
1010
11+
People who are both players and coaches (e.g. Pep Guardiola) have separate
12+
records with type-specific provider IDs. Use the `type` parameter to filter.
13+
1114
All data is open source: https://github.com/withqwerty/reep
1215
version: 1.1.0
1316
contact:
1417
name: withqwerty
1518
url: https://github.com/withqwerty/reep
1619

1720
servers:
18-
- url: https://reep-api.rahulkeerthi2-95d.workers.dev
21+
- url: https://the-reep-register.p.rapidapi.com
22+
description: RapidAPI (requires API key)
1923

2024
paths:
2125
/search:
2226
get:
2327
operationId: searchEntities
2428
summary: Search entities by name
25-
description: Fuzzy search across players, teams, and coaches by name or alias.
29+
description: |
30+
Full-text search across players, teams, and coaches by name or alias.
31+
Uses prefix matching with BM25 relevance ranking (e.g. "Cole Palm" matches "Cole Palmer").
32+
Diacritics-insensitive ("Muller" matches "Müller").
2633
parameters:
2734
- name: name
2835
in: query
2936
required: true
3037
schema:
3138
type: string
3239
example: Cole Palmer
33-
description: Name to search for (matches name and aliases)
40+
description: Name to search for (prefix matching on name and aliases)
3441
- name: type
3542
in: query
3643
required: false
@@ -48,7 +55,7 @@ paths:
4855
description: Maximum results to return
4956
responses:
5057
'200':
51-
description: Search results
58+
description: Search results ranked by relevance
5259
content:
5360
application/json:
5461
schema:
@@ -94,7 +101,7 @@ paths:
94101
description: Filter by entity type (returns all types if omitted)
95102
responses:
96103
'200':
97-
description: Entity details
104+
description: Entity details (may contain multiple records for dual-role people)
98105
content:
99106
application/json:
100107
schema:
@@ -129,12 +136,25 @@ paths:
129136
- worldfootball
130137
- soccerbase
131138
- kicker
139+
- uefa
140+
- lequipe
141+
- fff_fr
142+
- serie_a
143+
- besoccer
144+
- footballdatabase_eu
145+
- eu_football_info
146+
- hugman
147+
- german_fa
148+
- statmuse_pl
149+
- sofifa
150+
- soccerdonna
151+
- dongqiudi
152+
- playmakerstats
132153
- understat
133154
- whoscored
134155
- clubelo
135156
- sportmonks
136157
- api_football
137-
- sofifa
138158
- fotmob
139159
example: transfermarkt
140160
description: Source provider name
@@ -153,6 +173,78 @@ paths:
153173
schema:
154174
$ref: '#/components/schemas/LookupResponse'
155175

176+
/batch/lookup:
177+
post:
178+
operationId: batchLookup
179+
summary: Look up multiple QIDs in one request
180+
description: |
181+
Batch lookup by Wikidata QIDs. Returns all matching entities.
182+
A single QID may return multiple records if the person is both a player and coach.
183+
Results are flattened into a single array — use the qid and type fields to correlate.
184+
Maximum 100 QIDs per request.
185+
requestBody:
186+
required: true
187+
content:
188+
application/json:
189+
schema:
190+
type: object
191+
required: [qids]
192+
properties:
193+
qids:
194+
type: array
195+
items:
196+
type: string
197+
maxItems: 100
198+
description: Array of Wikidata QIDs
199+
example:
200+
qids: ["Q99760796", "Q11893"]
201+
responses:
202+
'200':
203+
description: Batch lookup results
204+
content:
205+
application/json:
206+
schema:
207+
$ref: '#/components/schemas/BatchLookupResponse'
208+
209+
/batch/resolve:
210+
post:
211+
operationId: batchResolve
212+
summary: Resolve multiple provider IDs in one request
213+
description: |
214+
Batch resolve provider IDs to entities. Maximum 100 items per request.
215+
requestBody:
216+
required: true
217+
content:
218+
application/json:
219+
schema:
220+
type: object
221+
required: [items]
222+
properties:
223+
items:
224+
type: array
225+
items:
226+
type: object
227+
required: [provider, id]
228+
properties:
229+
provider:
230+
type: string
231+
id:
232+
type: string
233+
maxItems: 100
234+
example:
235+
items:
236+
- provider: transfermarkt
237+
id: "568177"
238+
- provider: fbref
239+
id: dea698d9
240+
responses:
241+
'200':
242+
description: Batch resolve results
243+
content:
244+
application/json:
245+
schema:
246+
$ref: '#/components/schemas/BatchResolveResponse'
247+
156248
/stats:
157249
get:
158250
operationId: getStats
@@ -165,16 +257,6 @@ paths:
165257
application/json:
166258
schema:
167259
$ref: '#/components/schemas/StatsResponse'
168-
example:
169-
total_entities: 475017
170-
by_type:
171-
player: 386025
172-
team: 45349
173-
coach: 43643
174-
by_provider:
175-
transfermarkt: 320000
176-
fbref: 180000
177-
soccerway: 160000
178260

179261
components:
180262
schemas:
@@ -204,6 +286,11 @@ components:
204286
position:
205287
type: string
206288
nullable: true
289+
description: For players only
290+
current_team_qid:
291+
type: string
292+
nullable: true
293+
description: Wikidata QID of current team (players only)
207294
height_cm:
208295
type: number
209296
nullable: true
@@ -242,6 +329,46 @@ components:
242329
type: array
243330
items:
244331
$ref: '#/components/schemas/Entity'
332+
count:
333+
type: integer
334+
335+
BatchLookupResponse:
336+
type: object
337+
properties:
338+
results:
339+
type: array
340+
items:
341+
oneOf:
342+
- $ref: '#/components/schemas/Entity'
343+
- type: object
344+
properties:
345+
qid:
346+
type: string
347+
error:
348+
type: string
349+
enum: [not_found]
350+
count:
351+
type: integer
352+
353+
BatchResolveResponse:
354+
type: object
355+
properties:
356+
results:
357+
type: array
358+
items:
359+
oneOf:
360+
- $ref: '#/components/schemas/Entity'
361+
- type: object
362+
properties:
363+
provider:
364+
type: string
365+
id:
366+
type: string
367+
error:
368+
type: string
369+
enum: [not_found, missing_fields]
370+
count:
371+
type: integer
245372

246373
StatsResponse:
247374
type: object
@@ -256,3 +383,5 @@ components:
256383
type: object
257384
additionalProperties:
258385
type: integer
386+
custom_ids_count:
387+
type: integer

0 commit comments

Comments
 (0)