Instead of ‘login’ and ‘password’ use your credentials from https://app.dataforseo.com/api-dashboard
<?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-dashboard $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.20210818", "status_code": 20000, "status_message": "Ok.", "time": "0.0193 sec.", "cost": 0, "tasks_count": 1, "tasks_error": 0, "tasks": [ { "id": "09011800-1535-0139-0000-1315bf0fc600", "status_code": 20000, "status_message": "Ok.", "time": "0.0193 sec.", "cost": 0, "result_count": 1, "path": [ "v3", "serp", "google", "events", "task_get", "advanced" ], "data": { "api": "serp", "function": "task_get", "se": "google", "se_type": "events", "keyword": "concerts", "location_name": "Los Angeles,California,United States", "date_range": "today", "device": "desktop", "os": "windows" }, "result": [ { "keyword": "concerts", "type": "events", "se_domain": "google.com", "location_code": 1013962, "language_code": "", "check_url": "https://www.google.com/search?q=concerts&ibp=htl;events&hl=en#htivrt=events&&uule=w+CAIQIFISCRPaJ9xdx8KAEfQIRiVv3y_i&htichips=date:today", "datetime": "2021-09-01 15:00:36 +00:00", "spell": 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": "/div[1]/div[1]/div[1]/ul[1]/li[1]", "title": "Megadeth and Lamb of God", "description": "Two of the biggest bands in heavy metal – Megadeth and Lamb of God – will be joining forces on a co-headline tour across North America this year. And to add to the firepower of this already... Read more on Destination Irvine", "url": "https://www.destinationirvine.com/event/megadeth-%26-lamb-of-god/28415/", "image_url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcT4MZql7dr1Mlg7F_qpbvQogk5gjbhtxyUpJ364Vh1DUQ&s", "event_dates": { "start_datetime": "2021-09-01T18:00:00+00:00", "end_datetime": "2021-09-01T22:00:00+00:00", "displayed_dates": "Wed, Sep 1, 18:00 – 22:00" }, "location_info": { "name": "FivePoint Amphitheatre", "address": "14800 Chinon, Irvine, CA, United States", "url": "https://www.google.com/maps/place//data=!4m2!3m1!1s0x80dcc2bd45a996af:0x267639d5797295a6?sa=X&hl=en", "cid": "2771466209721488806", "feature_id": "0x80dcc2bd45a996af:0x267639d5797295a6" }, "information_and_tickets": [ { "type": "information_and_tickets_element", "title": "Ticketmaster.com", "description": "TICKETS", "url": "https://www.ticketmaster.com/event/09005846AEEC4957" }, { "type": "information_and_tickets_element", "title": "Evyy.net", "description": "TICKETS", "url": "https://ticketmaster.evyy.net/c/1387536/264167/4272?u=https%3A%2F%2Fwww.ticketmaster.com%2Fevent%2F09005846AEEC4957&SHAREDID=9xFggXhA" }, { "type": "information_and_tickets_element", "title": "Tunestub.com", "description": "TICKETS", "url": "https://www.tunestub.com/events/314128" }, { "type": "information_and_tickets_element", "title": "Destination Irvine", "description": "MORE INFO", "url": "https://www.destinationirvine.com/event/megadeth-%26-lamb-of-god/28415/" }, { "type": "information_and_tickets_element", "title": "Community calendar | KTLA", "description": "MORE INFO", "url": "https://ktla.com/community-calendar-ktla/?/calendar/#!/details/Lamb-of-God-Five-Point/9176202/2021-09-01T18" } ] }, { "type": "event_item", "rank_group": 2, "rank_absolute": 2, "position": "right", "xpath": "/div[1]/div[1]/div[1]/ul[1]/li[2]", "title": "Olivia O’Brien à Los Angeles (LA) à Fonda Theatre", "description": "Buy Olivia O'Brien tickets at the The Fonda Theatre in Los Angeles, CA for Sep 01, 2021 at Ticketmaster. Read more on Ticketmaster", "url": "https://www.ticketmaster.com/olivia-obrien-los-angeles-09-01-2021/event/Z7r9jZ1AdkZ0P", "image_url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS7kjwGBcBIcXRKB2Fe0H4DyXAdRfJZgjS-4EJlcWgRyw&s=10", "event_dates": { "start_datetime": "2021-09-01T20:00:00+00:00", "end_datetime": "2021-09-01T22:00:00+00:00", "displayed_dates": "Wed, Sep 1, 20:00 – 22:00" }, "location_info": { "name": "The Fonda Theatre", "address": "6126 Hollywood Blvd, Los Angeles, CA, United States", "url": "https://www.google.com/maps/place//data=!4m2!3m1!1s0x80c2bf387b884131:0x8f02ec38fce98388?sa=X&hl=en", "cid": "10305058626882601864", "feature_id": "0x80c2bf387b884131:0x8f02ec38fce98388" }, "information_and_tickets": [ { "type": "information_and_tickets_element", "title": "Axs.com", "description": "TICKETS", "url": "https://www.axs.com/events/404801/olivia-o-brien-tickets" }, { "type": "information_and_tickets_element", "title": "Axs.com", "description": "TICKETS", "url": "http://www.axs.com/events/404801%3Fcid%3Dusaff_youtube&ved=2ahUKEwjWhYGghd7yAhUbfX0KHWoEAucQ2cMDegQIARBm" }, { "type": "information_and_tickets_element", "title": "Ticketmaster", "description": "MORE INFO", "url": "https://www.ticketmaster.com/olivia-obrien-los-angeles-09-01-2021/event/Z7r9jZ1AdkZ0P" }, { "type": "information_and_tickets_element", "title": "Facebook", "description": "MORE INFO", "url": "https://m.facebook.com/events/811592619476404" }, { "type": "information_and_tickets_element", "title": "The Scenestar - TypePad", "description": "MORE INFO", "url": "https://thescenestar.typepad.com/ss/2021/06/olivia-obrien-books-a-show-at-the-fonda-theatre.html" } ] }, { "type": "event_item", "rank_group": 3, "rank_absolute": 3, "position": "right", "xpath": "/div[1]/div[1]/div[1]/ul[1]/li[3]", "title": "George Lopez", "description": "George Lopez’s multi-faceted career encompasses television, film, standup comedy and late-night television. Read more on San Jose Theaters", "url": "https://sanjosetheaters.org/event/george-lopez-nov21/", "image_url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQqAZBvC8o7BQaIVc0gTIDeNM8TQJyO8fIwirfrZkBcUA&s=10", "event_dates": { "start_datetime": "2021-04-15T20:00:00+00:00", "end_datetime": "2021-10-17T00:00:00+00:00", "displayed_dates": "Apr 15, 20:00 – Oct 17, 00:00" }, "location_info": { "name": "135 W San Carlos St, San Jose, CA, USA", "address": null, "url": "https://www.google.com/maps/place//data=!4m2!3m1!1s0x808fccbab987bc27:0x662b81896cb0ea97?sa=X&hl=en", "cid": "7362120443101244055", "feature_id": "0x808fccbab987bc27:0x662b81896cb0ea97" }, "information_and_tickets": [ { "type": "information_and_tickets_element", "title": "Axs.com", "description": "TICKETS", "url": "https://www.axs.com/events/405849/george-lopez-tickets" }, { "type": "information_and_tickets_element", "title": "Bit.ly", "description": "TICKETS", "url": "https://bit.ly/2Vv1MMe" }, { "type": "information_and_tickets_element", "title": "Nightout.com", "description": "TICKETS", "url": "https://nightout.com/events/a/george-lopez-103/go" }, { "type": "information_and_tickets_element", "title": "Ticketsmarter.com", "description": "TICKETS", "url": "https://www.ticketsmarter.com/4395381/george-lopez" }, { "type": "information_and_tickets_element", "title": "Evyy.net", "description": "TICKETS", "url": "https://ticketmaster.evyy.net/c/253520/271177/4272?u=https%3A%2F%2Fwww.ticketmaster.com%2Fgeorge-lopez-anaheim-california-10-16-2021%2Fevent%2F0900579EA76F3B5B" } ] }, { "type": "event_item", "rank_group": 4, "rank_absolute": 4, "position": "right", "xpath": "/div[1]/div[1]/div[1]/ul[1]/li[4]", "title": "Gracie Abrams", "description": "Check out Gracie Abrams at The Constellation Room at The Observatory in Santa Ana on September 01, 2021 and get detailed info for the event - tickets, photos, video and reviews. Read more on DoLA", "url": "https://dola.com/events/2021/9/1/gracie-abrams-tickets", "image_url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTkMVk0f_uz6Zy46x_Fj3FrFcVlOnICfZdKPzjJsHTP2XLO-YvLFZVCq1cU7A&s=10", "event_dates": { "start_datetime": "2021-09-01T18:30:00+00:00", "end_datetime": "2021-09-02T00:30:00+00:00", "displayed_dates": "Wed, Sep 1, 18:30 – Thu, Sep 2, 00:30" }, "location_info": { "name": "Constellation Room", "address": "3503 S Harbor Blvd, Santa Ana, CA, United States", "url": "https://www.google.com/maps/place//data=!4m2!3m1!1s0x80dcd8ac695bcc35:0x883444370d02c2fc?sa=X&hl=en", "cid": "9814544491179328252", "feature_id": "0x80dcd8ac695bcc35:0x883444370d02c2fc" }, "information_and_tickets": [ { "type": "information_and_tickets_element", "title": "Nightout.com", "description": "TICKETS", "url": "https://nightout.com/events/a/gracie-abrams-3/go" }, { "type": "information_and_tickets_element", "title": "Ticketsmarter.com", "description": "TICKETS", "url": "https://www.ticketsmarter.com/4771198/gracie-abrams" }, { "type": "information_and_tickets_element", "title": "Festivaly.eu", "description": "TICKETS", "url": "https://festivaly.eu/en/gracie-abrams-constellation-room-santa-ana-2021" }, { "type": "information_and_tickets_element", "title": "Allevents.in", "description": "TICKETS", "url": "https://allevents.in/santa%20ana/gracie-abrams/210005694370649" }, { "type": "information_and_tickets_element", "title": "Community calendar | KTLA", "description": "MORE INFO", "url": "https://ktla.com/community-calendar-ktla/?/calendar/&EventID=5602520#!/details/Gracie-Abrams/9329660/2021-09-01T18" } ] }, { "type": "event_item", "rank_group": 5, "rank_absolute": 5, "position": "right", "xpath": "/div[1]/div[1]/div[1]/ul[1]/li[5]", "title": "BlueBucksClan", "description": "Concerts BlueBucksClan Wed Sep 1st, 2021 at 7:00PM hr The Roxy Theatre 9009 W. Sunset Blvd. West Hollywood , CA Read more on Visit West Hollywood", "url": "https://www.visitwesthollywood.com/events/bluebucksclan-09-01-2021/", "image_url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcT7Abp1xaPMl8N-MFDtUloyq4puFJG-Fhzh3D0Q3dIumg&s=10", "event_dates": { "start_datetime": "2021-09-01T19:00:00+00:00", "end_datetime": "2021-09-01T23:00:00+00:00", "displayed_dates": "Wed, Sep 1, 19:00 – 23:00" }, "location_info": { "name": "The Roxy Theatre", "address": "9009 Sunset Blvd, West Hollywood, CA, United States", "url": "https://www.google.com/maps/place//data=!4m2!3m1!1s0x80c2bea177da9d47:0x3887e41e6eea636?sa=X&hl=en", "cid": null, "feature_id": "0x80c2bea177da9d47:0x3887e41e6eea636?" }, "information_and_tickets": [ { "type": "information_and_tickets_element", "title": "Axs.com", "description": "TICKETS", "url": "https://www.axs.com/events/409352/bluebucksclan-tickets" }, { "type": "information_and_tickets_element", "title": "Ticketsmarter.com", "description": "TICKETS", "url": "https://www.ticketsmarter.com/4801154/bluebucks-clan" }, { "type": "information_and_tickets_element", "title": "Boxofficeticketsales.com", "description": "TICKETS", "url": "https://www.boxofficeticketsales.com/4801154/bluebucks-clan" }, { "type": "information_and_tickets_element", "title": "Redzonetickets.com", "description": "TICKETS", "url": "https://www.redzonetickets.com/4801154/BlueBucks-Clan" }, { "type": "information_and_tickets_element", "title": "Visit West Hollywood", "description": "MORE INFO", "url": "https://www.visitwesthollywood.com/events/bluebucksclan-09-01-2021/" } ] }, { "type": "event_item", "rank_group": 6, "rank_absolute": 6, "position": "right", "xpath": "/div[1]/div[1]/div[1]/ul[1]/li[6]", "title": "Apocalyptica - Cell-0 Tour", "description": "Buy your tickets and see show schedules for Mayan Theatre, Los Angeles, CA from Los Angeles Theater. Upcoming events include - Apocalyptica. Read more on Los Angeles Theater", "url": "https://www.los-angeles-theatre.com/theaters/mayan-theatre/sports", "image_url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQReZZiTtOThPhQp8t0SKVTXYBtcKDTdx0BntdrHXm3oQ&s=10", "event_dates": { "start_datetime": null, "end_datetime": null, "displayed_dates": "Aug 25, 2021, 19:00 – Apr 17, 2022, 00:00" }, "location_info": { "name": "The Mayan", "address": "1038 S Hill St, Los Angeles, CA, United States", "url": "https://www.google.com/maps/place//data=!4m2!3m1!1s0x80c2c7c97a2afe63:0xad368894d57170a1?sa=X&hl=en", "cid": "12481313590121427105", "feature_id": "0x80c2c7c97a2afe63:0xad368894d57170a1" }, "information_and_tickets": [ { "type": "information_and_tickets_element", "title": "Ticketsmarter.com", "description": "TICKETS", "url": "https://www.ticketsmarter.com/4288099/apocalyptica-and-lacuna-coil" }, { "type": "information_and_tickets_element", "title": "Eseats.com", "description": "TICKETS", "url": "https://www.eseats.com/production/1828222/apocalyptica_tickets.html" }, { "type": "information_and_tickets_element", "title": "Festivaly.eu", "description": "TICKETS", "url": "https://festivaly.eu/en/apocalyptica-cell-0-tour-mayan-theater-los-angeles-2021" }, { "type": "information_and_tickets_element", "title": "Boxofficeticketsales.com", "description": "TICKETS", "url": "https://www.boxofficeticketsales.com/4288099/apocalyptica-and-lacuna-coil" }, { "type": "information_and_tickets_element", "title": "Community calendar | KTLA", "description": "MORE INFO", "url": "https://ktla.com/community-calendar-ktla/?%2Fcalendar%2F&EventID=6747694&fbclid=IwAR0sTDLa-BaXLDGrKh6ILq0DXX_ticBMNpWsSgViMYqsoilXoudGWLCD4R4#!/details/Apocalyptica-Cell-0-Tour/7657051/2021-08-25T19" } ] }, { "type": "event_item", "rank_group": 7, "rank_absolute": 7, "position": "right", "xpath": "/div[1]/div[1]/div[1]/ul[1]/li[7]", "title": "Facebook & YouTube stream /Glendale Noon Concerts/Pianist Nancy Fierro", "description": "Wednesday September 1, 2021: Streaming on FB & YouTube: Glendale Noon Concerts/Pianist Nancy Fierro: Works by Scarlatti, Szymanowska, Debussy,... Read more on Patch", "url": "https://patch.com/california/montrose/calendar/event/20210901/1198081/facebook-youtube-stream-glendale-noon-concerts-pianist-nancy-fierro", "image_url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSDtO9AQJtqM9abKjAM7-NmJUMKjLjDmtnzJO-AZjklaADVs6k5hKzlWM-Uvw&s=10", "event_dates": { "start_datetime": "2021-09-01T09:00:00+00:00", "end_datetime": null, "displayed_dates": "Wed, Sep 1, 09:00" }, "location_info": { "name": "Glendale City Seventh-day Adventist Church", "address": "610 E California Ave, Glendale, CA, United States", "url": "https://www.google.com/maps/place//data=!4m2!3m1!1s0x80c2c1aa6c5d91c9:0xd17afbb2b8c1f7e4?sa=X&hl=en", "cid": "15094653846108108772", "feature_id": "0x80c2c1aa6c5d91c9:0xd17afbb2b8c1f7e4" }, "information_and_tickets": [ { "type": "information_and_tickets_element", "title": "Patch", "description": "MORE INFO", "url": "https://patch.com/california/montrose/calendar/event/20210901/1198081/facebook-youtube-stream-glendale-noon-concerts-pianist-nancy-fierro" } ] }, { "type": "event_item", "rank_group": 8, "rank_absolute": 8, "position": "right", "xpath": "/div[1]/div[1]/div[1]/ul[1]/li[8]", "title": "I Matter 2 Youth Fashion Show and Musical Concert", "description": "Event listing from Long Beach Area Chamber of Commerce : Wednesday, September 1 from 7:00 PM to 9:00 PM California Families in Focus in partnership with New York Life, Lions Club and the Port of... Read more on Patch", "url": "https://patch.com/california/longbeach-ca/calendar/event/20210901/1217668/i-matter-2-youth-fashion-show-and-musical-concert", "image_url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRRorFFsRJhDN_h_MpJw8ICDA0APX-462uiFMcO-FRFT3HRIfcOO2uochYtIQ&s=10", "event_dates": { "start_datetime": "2021-09-01T16:00:00+00:00", "end_datetime": null, "displayed_dates": "Wed, Sep 1, 16:00" }, "location_info": { "name": "Long Beach Area Chamber of Commerce", "address": "1 World Trade Center Suite 1650, Long Beach, CA, United States", "url": "https://www.google.com/maps/place//data=!4m2!3m1!1s0x80dd3136831288e9:0x4aad3d3a3adff0dc?sa=X&hl=en", "cid": "5381024450082762972", "feature_id": "0x80dd3136831288e9:0x4aad3d3a3adff0dc" }, "information_and_tickets": [ { "type": "information_and_tickets_element", "title": "Patch", "description": "MORE INFO", "url": "https://patch.com/california/longbeach-ca/calendar/event/20210901/1217668/i-matter-2-youth-fashion-show-and-musical-concert" } ] }, { "type": "event_item", "rank_group": 9, "rank_absolute": 9, "position": "right", "xpath": "/div[1]/div[1]/div[1]/ul[1]/li[9]", "title": "Summer Concerts in the Park - Stone Soul", "description": "Stone Soul is an 8 piece, horn-blowing, foot-stomping Classic Soul & Motown tribute band that has built a reputation as one of the hardest-working, most entertaining Classic Soul & Motown bands... Read more on Temple City, CA", "url": "https://www.ci.temple-city.ca.us/Calendar.aspx?EID=3202", "image_url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS-_a0u5IniBNL4HxCLrkwolN_OJmo3tYb_6IyMsvzWxQtVZZjM6f6TZZaGmQ&s=10", "event_dates": { "start_datetime": "2021-09-01T19:00:00+00:00", "end_datetime": "2021-09-01T21:00:00+00:00", "displayed_dates": "Wed, Sep 1, 19:00 – 21:00" }, "location_info": { "name": "Temple City Park", "address": "5939 Golden West Ave, Temple City, CA, United States", "url": "https://www.google.com/maps/place//data=!4m2!3m1!1s0x80c2da510d32dc61:0xe029eb19c7177b9a?sa=X&hl=en", "cid": "16152700034487909274", "feature_id": "0x80c2da510d32dc61:0xe029eb19c7177b9a" }, "information_and_tickets": [ { "type": "information_and_tickets_element", "title": "Temple City, CA", "description": "MORE INFO", "url": "https://www.ci.temple-city.ca.us/Calendar.aspx?EID=3202" }, { "type": "information_and_tickets_element", "title": "AARP Near You", "description": "MORE INFO", "url": "https://local.aarp.org/event/concerts-in-the-park-stone-soul-2021-09-01-temple-city-ca.html" } ] }, { "type": "event_item", "rank_group": 10, "rank_absolute": 10, "position": "right", "xpath": "/div[1]/div[1]/div[1]/ul[1]/li[10]", "title": "UPSAHL", "description": "0 Current Fuels • 0 Total Fuels • 1 Features | September 1, 2021 @ 11:00pm EDT | 6126 Hollywood Blvd, Los Angeles, CA 90028, USA | UPSAHL live at The Fonda Theatre. Read more on Hottspot", "url": "https://hottspot.co/events/2021-09-01-upsahl-175408", "image_url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSsUAC3YDbvazr4Qbxzt57zrBRtUP9eUmT-MKUQ4ygK0pLukkDychEgRw88Ow&s=10", "event_dates": { "start_datetime": "2021-09-01T20:00:00+00:00", "end_datetime": null, "displayed_dates": "Wed, Sep 1, 20:00" }, "location_info": { "name": "The Fonda Theatre", "address": "6126 Hollywood Blvd, Los Angeles, CA, United States", "url": "https://www.google.com/maps/place//data=!4m2!3m1!1s0x80c2bf387b884131:0x8f02ec38fce98388?sa=X&hl=en", "cid": "10305058626882601864", "feature_id": "0x80c2bf387b884131:0x8f02ec38fce98388" }, "information_and_tickets": [ { "type": "information_and_tickets_element", "title": "EventCrazy.com", "description": "MORE INFO", "url": "https://www.eventcrazy.com/Los-Angeles-CA/events/details/819304-UPSAHL" }, { "type": "information_and_tickets_element", "title": "Hottspot", "description": "MORE INFO", "url": "https://hottspot.co/events/2021-09-01-upsahl-175408" } ] } ] } ] } ] }
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.
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 |
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 in the UTC format: “yyyy-mm-ddThh-mm-ss+00:00” example: 2019-11-15T12:57:46+00:00 |
end_datetime |
string | date and time when the event ends in the UTC format: “yyyy-mm-ddThh-mm-ss+00:00” example: 2019-11-15T12:57:46+00:00 |
displayed_dates |
string | date or date range as it is displayed in SERP |
location_info |
object | information about the event’s venue if there is none, equals null |
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 unique id of a local establishment; 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 if there is none, equals null |
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 |