Overview
The User Collections endpoints allow you to scrape and retrieve a user’s kit collection from FootballKitArchive. Collections are cached for 1 week after scraping.User collections can contain large amounts of data. The API supports pagination to efficiently retrieve collection data.
Scrape User Collection
Path Parameters
integer
required
User ID from FootballKitArchive (found in the user’s profile URL)
Query Parameters
boolean
default:"false"
Force a fresh scrape by invalidating existing cache. Useful for getting updated collection data.
Response Codes
- 200 OK - Collection found in cache, data returned immediately
- 202 Accepted - Scraping started, use task_id to check status
Response (200 OK - Cached)
string
Status of the response: “cached”
object
Collection data object
boolean
Whether the scraping was successful
array
Array of kit entries in the collection
integer
Total number of kits in the collection
integer
Number of pages scraped from FootballKitArchive
object
Pagination information
Response (202 Accepted - Processing)
string
Status of the response: “processing”
string
Celery task ID for tracking the scraping job
string
Instructions for checking status
Usage Flow
- POST
/api/user-collection/{userid}/scrapeto start scraping - If you receive 202 Accepted, wait approximately 60 seconds (scraping time depends on collection size)
- GET
/api/user-collection/{userid}to retrieve paginated data
Get User Collection
Path Parameters
integer
required
User ID from FootballKitArchive
Query Parameters
integer
default:"1"
Page number for pagination (minimum: 1)
integer
default:"20"
Number of items per page (minimum: 1, maximum: 100)
Response Codes
- 200 OK - Collection found in cache, returns paginated data
- 404 Not Found - Collection not found, suggest starting scraping first
Response (200 OK)
string
Status of the response: “ready”
object
Collection data object
boolean
Whether the scraping was successful
array
Array of kit entries for the current page
integer
Kit ID
string
Full name of the kit
string
URL-friendly slug for the kit
string
Club/team name
string
Season year
string
URL to the kit image
integer
Total number of kits in the collection
integer
Number of pages scraped from FootballKitArchive
object
User information (if available from scraping)
string
User’s display name
string
URL to user’s profile image
string
Twitter handle
string
Instagram handle
string
User’s profile description
integer
User’s points on FootballKitArchive
object
Pagination information
integer
Current page number
integer
Total number of pages
integer
Total number of kits
integer
Number of items per page
boolean
Whether there is a next page
boolean
Whether there is a previous page
integer
Next page number (null if no next page)
integer
Previous page number (null if no previous page)
string
ISO 8601 timestamp indicating when the cache expires
Response (404 Not Found)
string
Status of the response: “not_found”
string
Error message with instructions
Complete Example Workflow
Force Re-scrape
force=true parameter. This invalidates the existing cache and performs a fresh scrape.
Cache Duration
User collections are cached for 1 week (604,800 seconds) after scraping. After this period, a fresh scrape will be required.
Finding User IDs
To find a user’s ID on FootballKitArchive:- Visit the user’s profile on FootballKitArchive
- Look at the URL:
https://www.footballkitarchive.com/user/{userid}/ - The number in the URL is the user ID
https://www.footballkitarchive.com/user/148184/ → User ID is 148184
Rate Limiting
Ethical Considerations
This endpoint is designed for personal use and respects FootballKitArchive’s robots.txt and rate limits. Do not abuse this endpoint or scrape excessively.