Instead of ‘login’ and ‘password’ use your credentials from https://app.dataforseo.com/api-access
<?php // You can download this file from here https://cdn.dataforseo.com/v3/examples/php/php_RestClient.zip require('RestClient.php'); $api_url = 'https://api.dataforseo.com/'; try { // Instead of 'login' and 'password' use your credentials from https://app.dataforseo.com/api-access $client = new RestClient($api_url, null, 'login', 'password'); } catch (RestClientException $e) { echo "n"; print "HTTP code: {$e->getHttpCode()}n"; print "Error code: {$e->getCode()}n"; print "Message: {$e->getMessage()}n"; print $e->getTraceAsString(); echo "n"; exit(); } try { $result = array(); // #1 - using this method you can get a list of completed tasks // GET /v3/serp/google/events/tasks_ready // in addition to '{{low_se_name}}' and '{{low_se_type}}' you can also set other search engine and type parameters // the full list of possible parameters is available in documentation $tasks_ready = $client->get('/v3/serp/google/events/tasks_ready'); // you can find the full list of the response codes here https://docs.dataforseo.com/v3/appendix/errors if (isset($tasks_ready['status_code']) AND $tasks_ready['status_code'] === 20000) { foreach ($tasks_ready['tasks'] as $task) { if (isset($task['result'])) { foreach ($task['result'] as $task_ready) { // #2 - using this method you can get results of each completed task // GET /v3/serp/google/events/task_get/advanced/$id if (isset($task_ready['endpoint_advanced'])) { $result[] = $client->get($task_ready['endpoint_advanced']); } // #3 - another way to get the task results by id // GET /v3/serp/google/events/task_get/advanced/$id /* if (isset($task_ready['id'])) { $result[] = $client->get('/v3/serp/google/events/task_get/advanced/' . $task_ready['id']); } */ } } } } print_r($result); // do something with result } catch (RestClientException $e) { echo "n"; print "HTTP code: {$e->getHttpCode()}n"; print "Error code: {$e->getCode()}n"; print "Message: {$e->getMessage()}n"; print $e->getTraceAsString(); echo "n"; } $client = null; ?>
The above command returns JSON structured like this:
{ "version": "0.1.20241101", "status_code": 20000, "status_message": "Ok.", "time": "0.0518 sec.", "cost": 0, "tasks_count": 1, "tasks_error": 0, "tasks": [ { "id": "11071149-1535-0066-0000-04277357960b", "status_code": 20000, "status_message": "Ok.", "time": "0.0255 sec.", "cost": 0, "result_count": 1, "path": [ "v3", "serp", "google", "events", "task_get", "advanced", "11071149-1535-0066-0000-04277357960b" ], "data": { "api": "serp", "function": "task_get", "se": "google", "se_type": "events", "language_code": "en", "location_name": "Los Angeles,California,United States", "keyword": "concerts", "device": "desktop", "os": "windows", "date_range": "today" }, "result": [ { "keyword": "concerts", "type": "events", "se_domain": "google.com", "location_code": 1013962, "language_code": "en", "check_url": "https://www.google.com/search?q=concerts&hl=en&gl=US&uule=w+CAIQIFISCRPaJ9xdx8KAEfQIRiVv3y_i&ibp=htl;events&chips=date:today", "datetime": "2024-11-07 09:49:43 +00:00", "spell": null, "refinement_chips": null, "item_types": [ "event_item" ], "se_results_count": 0, "items_count": 10, "items": [ { "type": "event_item", "rank_group": 1, "rank_absolute": 1, "position": "right", "xpath": "/html[1]/body[1]/div[3]/div[2]/div[2]/div[2]/div[2]/div[3]/div[2]/ul[1]/li[1]", "title": "USC Thornton Winds Concert", "description": "USC Thornton Winds Concert | Opera | Cast and Crew | Performances, schedule and tickets | View more information on Operabase", "url": "https://www.operabase.com/productions/usc-thornton-winds-concert-288717/en", "image_url": "https://api.dataforseo.com/cdn/i/11071149-1535-0066-0000-04277357960b:0", "event_dates": { "start_datetime": "2024-11-07T16:00:00", "end_datetime": null, "displayed_dates": "Thu, Nov 7, 4 PM" }, "location_info": { "name": "Bovard Auditorium", "address": "Bovard Administration Building, 3551 Trousdale Pkwy, Los Angeles, CA", "url": "https://www.google.com/maps/place//data=!4m2!3m1!1s0x80c2c7e19c55535f:0x40cc3d456c923735?sa=X&ved=2ahUKEwiAtK_t-MmJAxXJEFkFHb4NJ48QqJACegQICRAA&hl=en&gl=US", "cid": "4669174282059921205", "feature_id": "0x80c2c7e19c55535f:0x40cc3d456c923735" }, "information_and_tickets": [ { "type": "information_and_tickets_element", "title": "Usc.edu", "description": "TICKETS", "url": "https://music.usc.edu/events/details/?event-id=45067922754800", "domain": "music.usc.edu" }, { "type": "information_and_tickets_element", "title": "Operabase", "description": "MORE INFO", "url": "https://www.operabase.com/productions/usc-thornton-winds-concert-288717/en", "domain": "www.operabase.com" } ] }, { "type": "event_item", "rank_group": 2, "rank_absolute": 2, "position": "right", "xpath": "/html[1]/body[1]/div[3]/div[2]/div[2]/div[2]/div[2]/div[3]/div[2]/ul[1]/li[2]", "title": "Porches", "description": "Find tickets for Porches with sweet93 at Fonda Theatre in Los Angeles on 11/7/2024 at 8:30 PM", "url": "https://open.spotify.com/concert/4QRbanGpEaLc4SPxtof43l", "image_url": "https://api.dataforseo.com/cdn/i/11071149-1535-0066-0000-04277357960b:1", "event_dates": { "start_datetime": "2024-11-07T20:00:00", "end_datetime": "2024-11-07T22:00:00", "displayed_dates": "Thu, Nov 7, 8 – 10 PM" }, "location_info": { "name": "The Fonda Theatre", "address": "6126 Hollywood Blvd, Los Angeles, CA", "url": "https://www.google.com/maps/place//data=!4m2!3m1!1s0x80c2bf387b884131:0x8f02ec38fce98388?sa=X&ved=2ahUKEwiAtK_t-MmJAxXJEFkFHb4NJ48QqJACegQIERAA&hl=en&gl=US", "cid": "10305058626882601864", "feature_id": "0x80c2bf387b884131:0x8f02ec38fce98388" }, "information_and_tickets": [ { "type": "information_and_tickets_element", "title": "Spotify.com", "description": "TICKETS", "url": "https://open.spotify.com/concert/2XmgoLlCVFyAgs638rr1Nx", "domain": "open.spotify.com" }, { "type": "information_and_tickets_element", "title": "Axs.com", "description": "TICKETS", "url": "https://www.axs.com/events/564014/porches-tickets?skin=thefonda?cid=usaffdostuff", "domain": "www.axs.com" }, { "type": "information_and_tickets_element", "title": "Bandsintown.com", "description": "TICKETS", "url": "https://www.bandsintown.com/e/105528603?app_id=ggl_feed&came_from=289&utm_medium=web&utm_source=ggl_feed&utm_campaign=event", "domain": "www.bandsintown.com" }, { "type": "information_and_tickets_element", "title": "Seatgeek.com", "description": "TICKETS", "url": "https://seatgeek.com/porches-tickets/los-angeles-california-the-fonda-theatre-2024-11-07-8-pm/concert/17193050?gclsrc=%7BGOOGLE-ADS-CLICK-SOURCE%7D&refob=mta", "domain": "seatgeek.com" }, { "type": "information_and_tickets_element", "title": "Stubhub.com", "description": "TICKETS", "url": "https://www.stubhub.com/_C-64832?pcid=PSUSAEVECONALLEF426C5CF9E&ps_p=8&ps_placement=eventfeed&ps=vn-1841&ps_ev=153571099&ps=cy-4055", "domain": "www.stubhub.com" } ] }, { "type": "event_item", "rank_group": 3, "rank_absolute": 3, "position": "right", "xpath": "/html[1]/body[1]/div[3]/div[2]/div[2]/div[2]/div[2]/div[3]/div[2]/ul[1]/li[3]", "title": "Twanguero concert in Los Angeles", "description": "You can't miss the latest edition of Twanguero concert in Los Angeles 👇 Enter Wegow and find out where to get your ticket!", "url": "https://www.wegow.com/au/concerts/twanguero-concert-in-los-angeles-zebulon", "image_url": "https://api.dataforseo.com/cdn/i/11071149-1535-0066-0000-04277357960b:2", "event_dates": { "start_datetime": "2024-11-07T12:00:00", "end_datetime": null, "displayed_dates": "Thu, Nov 7, 12 PM" }, "location_info": { "name": "Zebulon", "address": "2478 Fletcher Dr, Los Angeles, CA", "url": "https://www.google.com/maps/place//data=!4m2!3m1!1s0x80c2c0d53c93081d:0x8b8f3e09269f95ee?sa=X&ved=2ahUKEwiAtK_t-MmJAxXJEFkFHb4NJ48QqJACegQIGRAA&hl=en&gl=US", "cid": "10056324701965227502", "feature_id": "0x80c2c0d53c93081d:0x8b8f3e09269f95ee" }, "information_and_tickets": [ { "type": "information_and_tickets_element", "title": "Wegow.com", "description": "TICKETS", "url": "https://www.wegow.com/au/concerts/twanguero-concert-in-los-angeles-zebulon", "domain": "www.wegow.com" } ] }, { "type": "event_item", "rank_group": 4, "rank_absolute": 4, "position": "right", "xpath": "/html[1]/body[1]/div[3]/div[2]/div[2]/div[2]/div[2]/div[3]/div[2]/ul[1]/li[4]", "title": "Gouge Away", "description": "Find tickets for Gouge Away at El Cid in Los Angeles on 11/7/2024 at 8:00 PM", "url": "https://open.spotify.com/concert/3cXRZG7StRiWLEh0P2B0mc", "image_url": "https://api.dataforseo.com/cdn/i/11071149-1535-0066-0000-04277357960b:3", "event_dates": { "start_datetime": "2024-11-07T20:00:00", "end_datetime": "2024-11-07T21:30:00", "displayed_dates": "Thu, Nov 7, 8:00 – 9:30 PM" }, "location_info": { "name": "El Cid", "address": "4212 Sunset Blvd, Los Angeles, CA", "url": "https://www.google.com/maps/place//data=!4m2!3m1!1s0x80c2c74ea9342d2f:0xd544d042f6ed6800?sa=X&ved=2ahUKEwiAtK_t-MmJAxXJEFkFHb4NJ48QqJACegQIIRAA&hl=en&gl=US", "cid": "15367636814524147712", "feature_id": "0x80c2c74ea9342d2f:0xd544d042f6ed6800" }, "information_and_tickets": [ { "type": "information_and_tickets_element", "title": "Spotify.com", "description": "TICKETS", "url": "https://open.spotify.com/concert/3cXRZG7StRiWLEh0P2B0mc", "domain": "open.spotify.com" }, { "type": "information_and_tickets_element", "title": "Axs.com", "description": "TICKETS", "url": "https://www.axs.com/uk/events/635984/gouge-away-tickets", "domain": "www.axs.com" }, { "type": "information_and_tickets_element", "title": "Unation.com", "description": "TICKETS", "url": "https://www.unation.com/event/gouge-away-54720232/", "domain": "www.unation.com" }, { "type": "information_and_tickets_element", "title": "Seatgeek.com", "description": "TICKETS", "url": "https://seatgeek.com/gouge-away-tickets/los-angeles-california-el-cid-3-2024-11-07-8-pm/concert/17169203?gclsrc=%7BGOOGLE-ADS-CLICK-SOURCE%7D&refob=mta", "domain": "seatgeek.com" }, { "type": "information_and_tickets_element", "title": "Stubhub.com", "description": "TICKETS", "url": "https://www.stubhub.com/_C-101300?pcid=PSUSAEVECONALLEF426C5CF9E&ps_p=8&ps_placement=eventfeed&ps=vn-97000&ps_ev=155058373&ps=cy-79571", "domain": "www.stubhub.com" } ] }, { "type": "event_item", "rank_group": 5, "rank_absolute": 5, "position": "right", "xpath": "/html[1]/body[1]/div[3]/div[2]/div[2]/div[2]/div[2]/div[3]/div[2]/ul[1]/li[5]", "title": "Sage Armstrong concert in Los Angeles", "description": "You can't miss the latest edition of Sage Armstrong concert in Los Angeles 👇 Enter Wegow and find out where to get your ticket!", "url": "https://www.wegow.com/gb/concerts/sage-armstrong-concert-in-los-angeles-jungle-hollywood", "image_url": "https://api.dataforseo.com/cdn/i/11071149-1535-0066-0000-04277357960b:4", "event_dates": { "start_datetime": "2024-11-07T14:00:00", "end_datetime": null, "displayed_dates": "Thu, Nov 7, 2 PM" }, "location_info": { "name": "Jungle Hollywood", "address": "1640 N Cahuenga Blvd, Los Angeles, CA", "url": "https://www.google.com/maps/place//data=!4m2!3m1!1s0x80c2bfe1bcee2ed5:0x32d95e85554fbe3f?sa=X&ved=2ahUKEwiAtK_t-MmJAxXJEFkFHb4NJ48QqJACegQIKRAA&hl=en&gl=US", "cid": "3664063698597559871", "feature_id": "0x80c2bfe1bcee2ed5:0x32d95e85554fbe3f" }, "information_and_tickets": [ { "type": "information_and_tickets_element", "title": "Wegow", "description": "MORE INFO", "url": "https://www.wegow.com/gb/concerts/sage-armstrong-concert-in-los-angeles-jungle-hollywood", "domain": "www.wegow.com" } ] }, { "type": "event_item", "rank_group": 6, "rank_absolute": 6, "position": "right", "xpath": "/html[1]/body[1]/div[3]/div[2]/div[2]/div[2]/div[2]/div[3]/div[2]/ul[1]/li[6]", "title": "Roisin Murphy", "description": "Find tickets for Róisín Murphy at Shrine Expo Hall in Los Angeles on 11/7/2024 at 9:00 PM", "url": "https://open.spotify.com/concert/5cx8STqrSXVYghxDNRi5ea", "image_url": "https://api.dataforseo.com/cdn/i/11071149-1535-0066-0000-04277357960b:5", "event_dates": { "start_datetime": "2024-11-07T21:00:00", "end_datetime": "2024-11-07T22:30:00", "displayed_dates": "Thu, Nov 7, 9:00 – 10:30 PM" }, "location_info": { "name": "Shrine Auditorium and Expo Hall", "address": "665 W Jefferson Blvd, Los Angeles, CA", "url": "https://www.google.com/maps/place//data=!4m2!3m1!1s0x80c2c7e69596b30d:0x96ef2bf284b9dced?sa=X&ved=2ahUKEwiAtK_t-MmJAxXJEFkFHb4NJ48QqJACegQIMRAA&hl=en&gl=US", "cid": "10875959945731890413", "feature_id": "0x80c2c7e69596b30d:0x96ef2bf284b9dced" }, "information_and_tickets": [ { "type": "information_and_tickets_element", "title": "Spotify.com", "description": "TICKETS", "url": "https://open.spotify.com/concert/5cx8STqrSXVYghxDNRi5ea", "domain": "open.spotify.com" }, { "type": "information_and_tickets_element", "title": "Axs.com", "description": "TICKETS", "url": "https://shop.axs.com/?c=axs&e=154910168856196923", "domain": "shop.axs.com" }, { "type": "information_and_tickets_element", "title": "Bandsintown.com", "description": "TICKETS", "url": "https://www.bandsintown.com/e/1031292878?app_id=ggl_feed&came_from=289&utm_medium=web&utm_source=ggl_feed&utm_campaign=event", "domain": "www.bandsintown.com" }, { "type": "information_and_tickets_element", "title": "Stubhub.com", "description": "TICKETS", "url": "https://www.stubhub.com/_C-10480?pcid=PSUSAEVECONALLEF426C5CF9E&ps_p=8&ps_placement=eventfeed&ps=vn-67209&ps_ev=153233586&ps=cy-79571", "domain": "www.stubhub.com" }, { "type": "information_and_tickets_element", "title": "Viagogo.com", "description": "TICKETS", "url": "https://www.viagogo.com/_C-10480?pcid=PSUSAEVECONALLEF426C5CF9E&ps_p=8&ps_placement=eventfeed&ps=vn-67209&ps_ev=153233586&ps=cy-79571", "domain": "www.viagogo.com" } ] }, { "type": "event_item", "rank_group": 7, "rank_absolute": 7, "position": "right", "xpath": "/html[1]/body[1]/div[3]/div[2]/div[2]/div[2]/div[2]/div[3]/div[2]/ul[1]/li[7]", "title": "Mimi Gilbert concert in Los Angeles", "description": "You can't miss the latest edition of Mimi Gilbert concert in Los Angeles 👇 Enter Wegow and find out where to get your ticket!", "url": "https://www.wegow.com/gb/concerts/mimi-gilbert-concert-in-los-angeles-genghis-cohen", "image_url": "https://api.dataforseo.com/cdn/i/11071149-1535-0066-0000-04277357960b:6", "event_dates": { "start_datetime": "2024-11-07T11:00:00", "end_datetime": null, "displayed_dates": "Thu, Nov 7, 11 AM" }, "location_info": { "name": "Genghis Cohen", "address": "740 N Fairfax Ave, Los Angeles, CA", "url": "https://www.google.com/maps/place//data=!4m2!3m1!1s0x80c2bece826a04cf:0x8961ff1a8aaa1a5f?sa=X&ved=2ahUKEwiAtK_t-MmJAxXJEFkFHb4NJ48QqJACegQIORAA&hl=en&gl=US", "cid": "9899473945397697119", "feature_id": "0x80c2bece826a04cf:0x8961ff1a8aaa1a5f" }, "information_and_tickets": [ { "type": "information_and_tickets_element", "title": "Wegow.com", "description": "TICKETS", "url": "https://www.wegow.com/gb/concerts/mimi-gilbert-concert-in-los-angeles-genghis-cohen", "domain": "www.wegow.com" }, { "type": "information_and_tickets_element", "title": "Music | Bel. - Bandcamp", "description": "MORE INFO", "url": "https://96bel.bandcamp.com/album/mall-muzak", "domain": "96bel.bandcamp.com" } ] }, { "type": "event_item", "rank_group": 8, "rank_absolute": 8, "position": "right", "xpath": "/html[1]/body[1]/div[3]/div[2]/div[2]/div[2]/div[2]/div[3]/div[2]/ul[1]/li[8]", "title": "Okean Elzy", "description": "Find tickets for Okean Elzy at The Novo in Los Angeles on 11/7/2024 at 8:00 PM", "url": "https://open.spotify.com/concert/5zE7k8xAxq9REoZt14b8iD", "image_url": "https://api.dataforseo.com/cdn/i/11071149-1535-0066-0000-04277357960b:7", "event_dates": { "start_datetime": "2024-11-07T20:00:00", "end_datetime": "2024-11-07T21:30:00", "displayed_dates": "Thu, Nov 7, 8:00 – 9:30 PM" }, "location_info": { "name": "The Novo", "address": "800 W Olympic Blvd a335, Los Angeles, CA", "url": "https://www.google.com/maps/place//data=!4m2!3m1!1s0x80c2c7b782019c1b:0xda9785bec3c53630?sa=X&ved=2ahUKEwiAtK_t-MmJAxXJEFkFHb4NJ48QqJACegQIQRAA&hl=en&gl=US", "cid": "15751205276126361136", "feature_id": "0x80c2c7b782019c1b:0xda9785bec3c53630" }, "information_and_tickets": [ { "type": "information_and_tickets_element", "title": "Spotify.com", "description": "TICKETS", "url": "https://open.spotify.com/concert/5zE7k8xAxq9REoZt14b8iD", "domain": "open.spotify.com" }, { "type": "information_and_tickets_element", "title": "Axs.com", "description": "TICKETS", "url": "https://www.axs.com/events/635566/okean-elzy-tickets?skin=novo&src=AEGLIVE_WCLUNLAX030115VEN001?cid=usaffdostuff", "domain": "www.axs.com" }, { "type": "information_and_tickets_element", "title": "Seatgeek.com", "description": "TICKETS", "url": "https://seatgeek.com/okean-elzy-tickets/los-angeles-california-the-novo-2024-11-07-8-pm/concert/17185007?gclsrc=%7BGOOGLE-ADS-CLICK-SOURCE%7D&refob=mta", "domain": "seatgeek.com" }, { "type": "information_and_tickets_element", "title": "Vividseats.com", "description": "TICKETS", "url": "https://www.vividseats.com/okean-elzy-tickets-los-angeles-the-novo-11-7-2024--concerts-rock/production/5150115", "domain": "www.vividseats.com" }, { "type": "information_and_tickets_element", "title": "Gametime.co", "description": "TICKETS", "url": "https://gametime.co/ga/okean-elzy-tickets/11-7-2024-los%20angeles-ca-the-novo/events/66bb7b11815e7fc5880c6467", "domain": "gametime.co" } ] }, { "type": "event_item", "rank_group": 9, "rank_absolute": 9, "position": "right", "xpath": "/html[1]/body[1]/div[3]/div[2]/div[2]/div[2]/div[2]/div[3]/div[2]/ul[1]/li[9]", "title": "Wind Ensemble Concert", "description": "Organized by Department of Music", "url": "https://artelize.com/event/99420-wind-ensemble-concert", "image_url": "https://api.dataforseo.com/cdn/i/11071149-1535-0066-0000-04277357960b:8", "event_dates": { "start_datetime": "2024-11-07T19:30:00", "end_datetime": null, "displayed_dates": "Thu, Nov 7, 7:30 PM" }, "location_info": { "name": "Azusa Pacific University", "address": "901 E Alosta Ave, Azusa, CA", "url": "https://www.google.com/maps/place//data=!4m2!3m1!1s0x80c327c652bf9325:0xdb69be4de88a0731?sa=X&ved=2ahUKEwiAtK_t-MmJAxXJEFkFHb4NJ48QqJACegQISRAA&hl=en&gl=US", "cid": "15810377208683956017", "feature_id": "0x80c327c652bf9325:0xdb69be4de88a0731" }, "information_and_tickets": [ { "type": "information_and_tickets_element", "title": "Artelize", "description": "MORE INFO", "url": "https://artelize.com/event/99420-wind-ensemble-concert", "domain": "artelize.com" } ] }, { "type": "event_item", "rank_group": 10, "rank_absolute": 10, "position": "right", "xpath": "/html[1]/body[1]/div[3]/div[2]/div[2]/div[2]/div[2]/div[3]/div[2]/ul[1]/li[10]", "title": "The Blood Brothers", "description": "Find tickets for The Blood Brothers at The Belasco Theater in Los Angeles on 11/7/2024 at 7:00 PM", "url": "https://open.spotify.com/concert/3v0ZVJ6X3fR7h8l55A6c3J", "image_url": "https://api.dataforseo.com/cdn/i/11071149-1535-0066-0000-04277357960b:9", "event_dates": { "start_datetime": "2024-11-07T19:00:00", "end_datetime": "2024-11-07T23:00:00", "displayed_dates": "Thu, Nov 7, 7 – 11 PM" }, "location_info": { "name": "Los Angeles Theatre", "address": "615 S Broadway, Los Angeles, CA", "url": "https://www.google.com/maps/place//data=!4m2!3m1!1s0x80c2c64ab51dc5ef:0x5c6cd39641d0464a?sa=X&ved=2ahUKEwiAtK_t-MmJAxXJEFkFHb4NJ48QqJACegQIURAA&hl=en&gl=US", "cid": "6659930591276844618", "feature_id": "0x80c2c64ab51dc5ef:0x5c6cd39641d0464a" }, "information_and_tickets": [ { "type": "information_and_tickets_element", "title": "Spotify.com", "description": "TICKETS", "url": "https://open.spotify.com/concert/2kFIO6kIg6ebDzZq3PvqaG", "domain": "open.spotify.com" }, { "type": "information_and_tickets_element", "title": "Ticketmaster.com", "description": "TICKETS", "url": "https://ticketmaster.evyy.net/c/253185/264167/4272?SharedId=DoStuff&u=https%3A%2F%2Fconcerts.livenation.com%2Fthe-blood-brothers-us-tour-2024-los-angeles-california-11-07-2024%2Fevent%2F090060A9CE9D499F", "domain": "ticketmaster.evyy.net" }, { "type": "information_and_tickets_element", "title": "Axs.com", "description": "TICKETS", "url": "https://www.axs.com/events/570706/the-blood-brothers-tickets", "domain": "www.axs.com" }, { "type": "information_and_tickets_element", "title": "Bandsintown.com", "description": "TICKETS", "url": "https://www.bandsintown.com/e/105528157?app_id=ggl_feed&came_from=289&utm_medium=web&utm_source=ggl_feed&utm_campaign=event", "domain": "www.bandsintown.com" }, { "type": "information_and_tickets_element", "title": "Stubhub.com", "description": "TICKETS", "url": "https://www.stubhub.com/_C-1519?pcid=PSUSAEVECONALLEF426C5CF9E&ps_p=8&ps_placement=eventfeed&ps=vn-33266&ps_ev=153573853&ps=cy-4055", "domain": "www.stubhub.com" } ] } ] } ] } ] }
Description of the fields for sending a request:
Field name | Type | Description |
---|---|---|
id |
string | task identifier unique task identifier in our system in the UUID format you will be able to use it within 30 days to request the results of the task at any time |
As a response of the API server, you will receive JSON-encoded data containing a tasks
array with the information specific to the set tasks.
You can also get all available SERP features and possible extra elements by making a request to the following Sandbox URL:
https://sandbox.dataforseo.com/v3/serp/google/events/task_get/advanced/00000000-0000-0000-0000-000000000000
The response will include all available items in the Google Events SERP Advanced endpoint with the fields containing dummy data.
You won’t be charged for using Sandbox endpoints.
Description of the fields in the results array:
Field name | Type | Description |
---|---|---|
version |
string | the current version of the API |
status_code |
integer | general status code you can find the full list of the response codes here Note: we strongly recommend designing a necessary system for handling related exceptional or error conditions |
status_message |
string | general informational message you can find the full list of general informational messages here |
time |
string | execution time, seconds |
cost |
float | total tasks cost, USD |
tasks_count |
integer | the number of tasks in the tasks array |
tasks_error |
integer | the number of tasks in the tasks array returned with an error |
tasks |
array | array of tasks |
id |
string | unique task identifier in our system in the UUID format |
status_code |
integer | status code of the task generated by DataForSEO; can be within the following range: 10000-60000 you can find the full list of the response codes here |
status_message |
string | informational message of the task you can find the full list of general informational messages here |
time |
string | execution time, seconds |
cost |
float | cost of the task, USD |
result_count |
integer | number of elements in the result array |
path |
array | URL path |
data |
object | contains the same parameters that you specified in the POST request |
result |
array | array of results |
keyword |
string | keyword received in a POST array keyword is returned with decoded %## (plus symbol ‘+’ will be decoded to a space character) |
type |
string | search engine type in a POST array |
se_domain |
string | search engine domain in a POST array |
location_code |
integer | location code in a POST array |
language_code |
string | language code in this case, the value will be null |
check_url |
string | direct URL to search engine results |
datetime |
string | date and time when the result was received in the UTC format: “yyyy-mm-dd hh-mm-ss +00:00” example: 2019-11-15 12:57:46 +00:00 |
spell |
object | autocorrection of the search engine if the search engine provided results for a keyword that was corrected, we will specify the keyword corrected by the search engine and the type of autocorrection |
keyword |
string | keyword obtained as a result of search engine autocorrection the results will be provided for the corrected keyword |
type |
string | type of autocorrection possible values: did_you_mean , showing_results_for , no_results_found_for , including_results_for |
refinement_chips |
object | search refinement chips |
type |
string | type of element = ‘refinement_chips’ |
xpath |
string | the XPath of the element |
items |
array | items of the element |
type |
string | type of element = ‘refinement_chips_element’ |
title |
string | title of the element |
url |
string | search URL with refinement parameters |
domain |
string | domain in SERP |
options |
array | further search refinement options |
type |
string | type of element = ‘refinement_chips_option’ |
title |
string | title of the element |
url |
string | search URL with refinement parameters |
domain |
string | domain in SERP |
item_types |
array | types of search results found in SERP possible item types: event_item |
se_results_count |
integer | total number of results in SERP in this case, the value will be 0 this search engine does not indicate the total number of results |
items_count |
integer | the number of results returned in the items array |
items |
array | items in SERP |
‘event_item’ element in SERP | ||
type |
string | type of element = ‘event_item’ |
rank_group |
integer | group rank in SERP position within a group of elements with identical type valuespositions of elements with different type values are omitted from rank_group |
rank_absolute |
integer | absolute rank in SERP absolute position among all the elements in SERP |
position |
string | the alignment of the element in SERP can take the following values: left , right |
xpath |
string | the XPath of the element |
title |
string | title of the result in SERP |
description |
string | description of the results element in SERP |
url |
string | relevant URL |
image_url |
string | URL of the image featured in the element |
event_dates |
object | dates when the event takes place if there are none, equals null |
start_datetime |
string | date and time when the event starts if time zone is specified in the event, value will be returned in the UTC format: “yyyy-mm-ddThh-mm-ss+00:00” example: 2019-11-15T12:57:46+00:00 if time zone is not specified in the event, unspecified local time will be returned in the following format: “yyyy-mm-ddThh-mm-ss” example: 2019-11-15T12:57:46 |
end_datetime |
string | date and time when the event ends if time zone is specified in the event, value will be returned in the UTC format: “yyyy-mm-ddThh-mm-ss+00:00” example: 2019-11-15T12:57:46+00:00 if time zone is not specified in the event, unspecified local time will be returned in the following format: “yyyy-mm-ddThh-mm-ss” example: 2019-11-15T12:57:46 |
displayed_dates |
string | date or date range as it is displayed in SERP |
location_info |
object | information about the event’s venue |
name |
string | name of the event’s venue |
address |
string | address of the event’s venue |
url |
string | URL to the event’s venue on google maps |
cid |
string | google-defined client id can be used with Google Reviews API to get a full list of reviews |
feature_id |
string | the unique identifier of the element in SERP |
information_and_tickets |
array | additional information and ticket purchase options |
type |
string | type of element = ‘information_and_tickets_element’ |
title |
string | title of the element |
description |
string | description of the element |
url |
string | relevant URL |
domain |
string | domain in SERP |