now i have another api which is this https://datafeed.togwe.com/api/v1/getMatchSquardApi that will be accessed as const axios = require('axios'); let data = JSON.stringify({ "match_id": 65 }); let config = { method: 'get', maxBodyLength: Infinity, url: 'https://datafeed.togwe.com/api/v1/getMatchSquardApi', headers: { 'Authorization': 'Bearer e4vzg9dmuzgpcnrzo7z3huzwxr6qa83j', 'Content-Type': 'application/json' }, data : data }; axios.request(config) .then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); }); will receive the match_id as from webhook or for via request for now we are building it for request based later we will build it for webhook based so first check if maych_id in subcategory table is active or also you can say live i.e status 2 if yes the access the api and then you will get a response something like this { "status": "ok", "response": { "items": [ { "playerKey": 1, "teamName": "Sydney Sixers", "playing11": "no", "fullname": "Sophie Ecclestone", "name": "Sophie Ecclestone", "card_name": "Sophie Ecclestone", "identified_roles": "{\"keeper\":false,\"batsman\":false,\"bowler\":true}", "gender": "female", "nationality": "United Kingdom", "date_of_birth": "1999-05-05T18:30:00.000Z", "batting_style": "[\"Right-Hand Bat\"]", "bowling_style": "[\"Slow Left-Arm Orthodox\"]" }, { "playerKey": 2, "teamName": "Sydney Sixers", "playing11": "no", "fullname": "Erin Burns", "name": "Erin Burns", "card_name": "Erin Burns", "identified_roles": "{\"keeper\":false,\"batsman\":true,\"bowler\":true}", "gender": "female", "nationality": "Australia", "date_of_birth": "1988-06-21T18:30:00.000Z", "batting_style": "[\"Right-Hand Bat\"]", "bowling_style": "[\"OffBreak\"]" }, { "playerKey": 3, "teamName": "Sydney Sixers", "playing11": "no", "fullname": "Isabella Malgioglio", "name": "Isabella Malgioglio", "card_name": "Isabella Malgioglio", "identified_roles": "{\"keeper\":false,\"batsman\":false,\"bowler\":true}", "gender": "female", "nationality": "Australia", "date_of_birth": "2002-03-21T18:30:00.000Z", "batting_style": "[\"Right-Hand Bat\"]", "bowling_style": "[null]" }, { "playerKey": 4, "teamName": "Sydney Sixers", "playing11": "no", "fullname": "Alyssa Healy", "name": "Alyssa Healy", "card_name": "Alyssa Healy", "identified_roles": "{\"keeper\":true,\"batsman\":true,\"bowler\":false}", "gender": "female", "nationality": "Australia", "date_of_birth": "1990-03-23T18:30:00.000Z", "batting_style": "[\"Right-Hand Bat\"]", "bowling_style": "null" }, { "playerKey": 5, "teamName": "Sydney Sixers", "playing11": "yes", "fullname": "Amelia Kerr", "name": "Amelia Kerr", "card_name": "Amelia Kerr", "identified_roles": "{\"keeper\":false,\"batsman\":true,\"bowler\":true}", "gender": "female", "nationality": "New Zealand", "date_of_birth": "2000-10-12T18:30:00.000Z", "batting_style": "[\"Right-Hand Bat\"]", "bowling_style": "[\"LegBreak\"]" }, { "playerKey": 6, "teamName": "Sydney Sixers", "playing11": "yes", "fullname": "Courtney Sippel", "name": "Courtney Sippel", "card_name": "Courtney Sippel", "identified_roles": "{\"keeper\":false,\"batsman\":true,\"bowler\":true}", "gender": "female", "nationality": "Australia", "date_of_birth": "2001-04-26T18:30:00.000Z", "batting_style": "[\"Left-Hand Bat\"]", "bowling_style": "[\"Right-Arm Medium\"]" }, { "playerKey": 7, "teamName": "Sydney Sixers", "playing11": "no", "fullname": "Frankie Nicklin", "name": "Frankie Nicklin", "card_name": "Frankie Nicklin", "identified_roles": "{\"keeper\":false,\"batsman\":true,\"bowler\":true}", "gender": "female", "nationality": "Australia", "date_of_birth": "2005-01-19T18:30:00.000Z", "batting_style": "null", "bowling_style": "null" }, { "playerKey": 8, "teamName": "Sydney Sixers", "playing11": "yes", "fullname": "Sarah Bryce", "name": "Sarah Bryce", "card_name": "Sarah Bryce", "identified_roles": "{\"keeper\":true,\"batsman\":true,\"bowler\":false}", "gender": "female", "nationality": "United Kingdom", "date_of_birth": "2000-01-07T18:30:00.000Z", "batting_style": "null", "bowling_style": "null" }, { "playerKey": 9, "teamName": "Sydney Sixers", "playing11": "yes", "fullname": "Ashleigh Gardner", "name": "Ashleigh Gardner", "card_name": "Ashleigh Gardner", "identified_roles": "{\"keeper\":false,\"batsman\":true,\"bowler\":true}", "gender": "female", "nationality": "Australia", "date_of_birth": "1997-04-14T18:30:00.000Z", "batting_style": "[\"Right-Hand Bat\"]", "bowling_style": "[\"OffBreak\"]" }, { "playerKey": 10, "teamName": "Sydney Sixers", "playing11": "yes", "fullname": "Elsa Hunter", "name": "Elsa Hunter", "card_name": "Elsa Hunter", "identified_roles": "{\"keeper\":false,\"batsman\":true,\"bowler\":false}", "gender": "female", "nationality": "Malaysia", "date_of_birth": "2005-02-19T18:30:00.000Z", "batting_style": "[\"Right-Hand Bat\"]", "bowling_style": "[\"Right-Arm Medium\"]" }, { "playerKey": 11, "teamName": "Sydney Sixers", "playing11": "yes", "fullname": "Lauren Cheatle", "name": "Lauren Cheatle", "card_name": "Lauren Cheatle", "identified_roles": "{\"keeper\":false,\"batsman\":false,\"bowler\":true}", "gender": "female", "nationality": "Australia", "date_of_birth": "1998-11-05T18:30:00.000Z", "batting_style": "[\"Left-Hand Bat\"]", "bowling_style": "[\"Left-Arm Fast medium\"]" }, { "playerKey": 12, "teamName": "Sydney Sixers", "playing11": "no", "fullname": "Kate Pelle ", "name": "Kate Pelle ", "card_name": "Kate Pelle ", "identified_roles": "{\"keeper\":true,\"batsman\":true,\"bowler\":false}", "gender": "female", "nationality": "Australia", "date_of_birth": "2006-01-16T18:30:00.000Z", "batting_style": "[\"Right-Hand Bat\"]", "bowling_style": "[null]" }, { "playerKey": 13, "teamName": "Sydney Sixers", "playing11": "yes", "fullname": "Ellyse Perry", "name": "Ellyse Perry", "card_name": "Ellyse Perry", "identified_roles": "{\"keeper\":false,\"batsman\":true,\"bowler\":true}", "gender": "female", "nationality": "Australia", "date_of_birth": "1990-11-02T18:30:00.000Z", "batting_style": "[\"Right-Hand Bat\"]", "bowling_style": "[\"Right-Arm Fast medium\"]" }, { "playerKey": 14, "teamName": "Sydney Sixers", "playing11": "no", "fullname": "Kate Peterson", "name": "Kate Peterson", "card_name": "Kate Peterson", "identified_roles": "{\"keeper\":false,\"batsman\":true,\"bowler\":true}", "gender": "female", "nationality": "Australia", "date_of_birth": "2002-12-02T18:30:00.000Z", "batting_style": "[\"Right-Hand Bat\"]", "bowling_style": "[\"Right-Arm Medium\"]" }, { "playerKey": 15, "teamName": "Sydney Sixers", "playing11": "yes", "fullname": "Hollie Armitage", "name": "Hollie Armitage", "card_name": "Hollie Armitage", "identified_roles": "{\"keeper\":false,\"batsman\":true,\"bowler\":false}", "gender": "female", "nationality": "United Kingdom", "date_of_birth": "1997-06-13T18:30:00.000Z", "batting_style": "[\"Right-Hand Bat\"]", "bowling_style": "[\"Right-Arm Slow\"]" }, { "playerKey": 16, "teamName": "Sydney Sixers", "playing11": "yes", "fullname": "Maitlan Brown", "name": "Maitlan Brown", "card_name": "Maitlan Brown", "identified_roles": "{\"keeper\":false,\"batsman\":false,\"bowler\":true}", "gender": "female", "nationality": "Australia", "date_of_birth": "1997-06-04T18:30:00.000Z", "batting_style": "[\"Right-Hand Bat\"]", "bowling_style": "[\"Right-Arm Medium\"]" }, { "playerKey": 17, "teamName": "Sydney Sixers", "playing11": "yes", "fullname": "Mathilda Carmichael", "name": "Mathilda Carmichael", "card_name": "Mathilda Carmichael", "identified_roles": "{\"keeper\":false,\"batsman\":true,\"bowler\":false}", "gender": "female", "nationality": "Australia", "date_of_birth": "1994-04-03T18:30:00.000Z", "batting_style": "[\"Right-Hand Bat\"]", "bowling_style": "[\"Right-Arm Fast medium\"]" }, { "playerKey": 18, "teamName": "Sydney Sixers", "playing11": "yes", "fullname": "Caoimhe Bray", "name": "Caoimhe Bray", "card_name": "Caoimhe Bray", "identified_roles": "{\"keeper\":false,\"batsman\":true,\"bowler\":true}", "gender": "female", "nationality": "Australia", "date_of_birth": "2009-09-22T18:30:00.000Z", "batting_style": "[\"Right-Hand Bat\"]", "bowling_style": "[null]" }, { "playerKey": 19, "teamName": "Perth Scorchers", "playing11": "yes", "fullname": "Ebony Hoskin", "name": "Ebony Hoskin", "card_name": "Ebony Hoskin", "identified_roles": "{\"keeper\":false,\"batsman\":false,\"bowler\":true}", "gender": "female", "nationality": "Australia", "date_of_birth": "2003-03-22T18:30:00.000Z", "batting_style": "null", "bowling_style": "null" }, first you need to filter out the player from key playing11 and only pick with yes then identify roles identified_roles in which pick 1 bastmans from a teaamaan creat aquestion that will that bastman score a score of 50+ or not, pick another random batsmen and create a question will that bastman hot 6 fours or more pick third random bastamne and create that will he hot 3 or more sixes then pick bowler can pick 3 or more wickets if