{"openapi":"3.0.3","info":{"title":"Compare Phone Market live phone deals API","version":"1.0","description":"Read-only feed of live UK mobile phone deals (contracts, pay as you go and SIM-free) compared by Compare Phone Market. No key is needed. Prices include VAT, are in GBP and can change: confirm on comparison_url and link to it when presenting a deal."},"servers":[{"url":"https://www.comparephonemarket.co.uk/"}],"paths":{"/api/deals":{"get":{"operationId":"listPhoneDeals","summary":"Search live UK phone deals","description":"Returns in-stock phone deals sorted cheapest first. Use brand and model slugs from https://www.comparephonemarket.co.uk/phones/ URLs, for example brand=apple&model=iphone-17.","parameters":[{"name":"brand","in":"query","required":false,"description":"Brand slug, such as apple, samsung or google.","schema":{"type":"string"}},{"name":"model","in":"query","required":false,"description":"Model slug within the brand, such as iphone-17 or galaxy-s25. Requires brand.","schema":{"type":"string"}},{"name":"network","in":"query","required":false,"description":"Network slug, such as o2, vodafone, three or giffgaff.","schema":{"type":"string"}},{"name":"contract","in":"query","required":false,"description":"Deal type.","schema":{"type":"string","enum":["contract","pay_as_you_go","sim_free"]}},{"name":"condition","in":"query","required":false,"description":"Phone condition.","schema":{"type":"string","enum":["new","refurbished","used"]}},{"name":"storage_gb","in":"query","required":false,"description":"Exact storage size in GB.","schema":{"type":"integer","minimum":1}},{"name":"term_months","in":"query","required":false,"description":"Exact contract length in months (0 to 60), or \"any\". By default contracts are limited to the standard 24 or 36 months; pay as you go and SIM-free deals are never filtered by length.","schema":{"type":"string","default":"standard"}},{"name":"max_monthly","in":"query","required":false,"description":"Highest monthly cost in pounds.","schema":{"type":"number","minimum":0}},{"name":"max_upfront","in":"query","required":false,"description":"Highest upfront cost in pounds.","schema":{"type":"number","minimum":0}},{"name":"max_total","in":"query","required":false,"description":"Highest total cost in pounds.","schema":{"type":"number","minimum":0}},{"name":"min_data_gb","in":"query","required":false,"description":"Smallest monthly data allowance in GB. Unlimited plans always qualify.","schema":{"type":"integer","minimum":0}},{"name":"unlimited_data","in":"query","required":false,"description":"Only unlimited-data plans.","schema":{"type":"boolean"}},{"name":"sort","in":"query","required":false,"description":"Sort order, cheapest first.","schema":{"type":"string","enum":["total_cost","monthly_cost","upfront_cost"],"default":"total_cost"}},{"name":"page","in":"query","required":false,"description":"Page number. Results are capped at the first 10000.","schema":{"type":"integer","minimum":1,"default":1}},{"name":"per_page","in":"query","required":false,"description":"Results per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}],"responses":{"200":{"description":"Matching deals","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealList"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"param":{"type":"string","nullable":true}}}}},"DealList":{"type":"object","properties":{"api_version":{"type":"string"},"data_last_updated":{"type":"string","description":"When the deal data was last refreshed.","format":"date-time","nullable":true},"notes":{"type":"string"},"query":{"type":"object","description":"The filters applied."},"pagination":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"total_results":{"type":"integer"},"total_pages":{"type":"integer"},"next":{"type":"string","format":"uri","nullable":true},"previous":{"type":"string","format":"uri","nullable":true}}},"deals":{"type":"array","items":{"$ref":"#/components/schemas/Deal"}}}},"Deal":{"type":"object","properties":{"id":{"type":"integer"},"phone":{"type":"object","properties":{"name":{"type":"string"},"brand":{"type":"string"},"storage_gb":{"type":"integer","nullable":true},"colour":{"type":"string","nullable":true},"condition":{"type":"string","nullable":true},"condition_grade":{"type":"string","nullable":true},"url":{"type":"string","description":"Phone comparison page.","format":"uri"}}},"deal_type":{"type":"string","enum":["contract","pay_as_you_go","sim_free"]},"deal_summary":{"type":"string","description":"Plain-English deal type, such as 24-month contract."},"network":{"type":"string","description":"Network; null for SIM-free phones.","nullable":true},"retailer":{"type":"string"},"contract_length_months":{"type":"integer","nullable":true},"monthly_cost":{"type":"number","description":"Monthly cost today, in pounds including VAT."},"upfront_cost":{"type":"number","description":"Upfront cost, in pounds including VAT."},"total_cost":{"type":"number","description":"Total cost over the contract, including any scheduled price rises."},"currency":{"type":"string","enum":["GBP"]},"price_rises":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"date"},"monthly_cost":{"type":"number"}}}},"data":{"type":"object","properties":{"unlimited":{"type":"boolean"},"gb":{"type":"number","nullable":true},"speed":{"type":"string","nullable":true},"label":{"type":"string"}},"nullable":true},"minutes":{"type":"string","nullable":true},"texts":{"type":"string","nullable":true},"pre_order":{"type":"boolean"},"last_checked":{"type":"string","description":"When this deal was last seen in the retailer feed.","format":"date-time","nullable":true},"comparison_url":{"type":"string","description":"Deal page on Compare Phone Market. Link here when presenting the deal.","format":"uri"}}}}}}