{"openapi":"3.1.0","info":{"title":"Offers4U Public API","version":"1.0.0","description":"The verified discovery and aggregation API for software offers, student benefits, developer cloud credits, and Saudi Arabia deals.","termsOfService":"https://offers4u.xyz/terms","contact":{"name":"Offers4U API Support","url":"https://offers4u.xyz","email":"api@offers4u.xyz"},"license":{"name":"CC BY-NC 4.0","url":"https://creativecommons.org/licenses/by-nc/4.0/"}},"servers":[{"url":"https://offers4u.xyz","description":"Production Server"}],"paths":{"/api/v1/offers":{"get":{"summary":"Search & filter verified offers","operationId":"getOffers","parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Full-text search query"},{"name":"category","in":"query","schema":{"type":"string"},"description":"Category slug (e.g. ai-machine-learning)"},{"name":"deal","in":"query","schema":{"type":"string","enum":["free","discount","credits","trial","cashback","referral"]}},{"name":"eligibility","in":"query","schema":{"type":"string","enum":["everyone","students","developers","startups"]}},{"name":"country","in":"query","schema":{"type":"string"},"description":"ISO 2-letter country code (e.g. SA, US)"},{"name":"saudi","in":"query","schema":{"type":"boolean"},"description":"Saudi Arabia specific deals"},{"name":"free","in":"query","schema":{"type":"boolean"},"description":"100% free deals"},{"name":"student","in":"query","schema":{"type":"boolean"},"description":"Student deals"},{"name":"sort","in":"query","schema":{"type":"string","enum":["trending","newest","ending_soon","recently_verified","most_popular"]}},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":20}}],"responses":{"200":{"description":"Paginated array of offers with meta info","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Offer"}},"meta":{"type":"object","properties":{"total":{"type":"integer"},"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"}}}}}}}}}}},"/api/v1/offers/by-slug/{slug}":{"get":{"summary":"Retrieve single offer by slug","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Offer details"},"404":{"description":"Offer not found"}}}},"/api/v1/categories":{"get":{"summary":"List categories with active count","responses":{"200":{"description":"List of categories"}}}},"/api/v1/stats":{"get":{"summary":"Aggregate metrics and verification stats","responses":{"200":{"description":"Live platform stats"}}}},"/api/v1/submissions":{"post":{"summary":"Submit a new offer for editorial review","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["provider_name","offer_title","offer_value","claim_url","description"],"properties":{"provider_name":{"type":"string"},"offer_title":{"type":"string"},"offer_value":{"type":"string"},"claim_url":{"type":"string","format":"uri"},"description":{"type":"string"},"category_slug":{"type":"string"},"eligibility":{"type":"string"},"country_code":{"type":"string"}}}}}},"responses":{"201":{"description":"Submission received"},"400":{"description":"Validation error"}}}},"/api/v1/corrections":{"post":{"summary":"Report an expired deal or propose a correction","responses":{"201":{"description":"Correction accepted"}}}}},"components":{"schemas":{"Offer":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"provider_name":{"type":"string"},"offer_value":{"type":"string"},"short_description":{"type":"string"},"offer_type":{"type":"string"},"eligibility_type":{"type":"string"},"student_required":{"type":"boolean"},"region_type":{"type":"string"},"claim_url":{"type":"string"},"verification_status":{"type":"string"},"last_verified_at":{"type":"string"},"clicks_count":{"type":"integer"},"categories":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}}}}}}}