Has anyone managed to enrich their table with the Semrush API using the HTTP API enrichment (The Clay integration isn’t sufficient for this use case)? I’m getting the 200 response, but not getting any data. https://app.clay.com/workspaces/199589/tables/t_SKUKe78Qf6SA/views/gv_pJfiXIedvanm
Hey Joel, thanks for reaching out! Taking a look
hey Joel S.! this is caused by how semrush sends back a response. our http api action expects a json response. but semrush sends back responses as a csv (technically not a standard csv; they use semicolons as separators and don't count semicolons within double quotation marks as separators) because CSVs / how to parse them is not generalizable across any http api call, our backend doesn't know how to process them, so it returns empty data. why isn't it clear how to process them? here's a sample response:
target;rank;visits;desktop_visits;mobile_visits;users;desktop_users;mobile_users;desktop_hits;mobile_hits;direct;search_organic;search_paid;social_organic;social_paid;referral;mail;display_ad;search;social;paid;unknown_channel;time_on_site;desktop_time_on_site;mobile_time_on_site;pages_per_visit;desktop_pages_per_visit;mobile_pages_per_visit;bounce_rate;desktop_bounce_rate;mobile_bounce_rate;desktop_share;mobile_share;accuracy;display_date;country;device_type;categories
google.com;1;179671815104;30998624324;148673190780;10520550445;1990366482;8530183963;146703578527;496560998745;163595645062;751815859;6320867;2875977756;532758;11833538924;565979760;42004118;751815859;2876510514;6320867;0;1321;1755;1223;3.5802;4.7326;3.3399;0.3935;0.3508;0.4024;0.17252914;0.82747086;3;2023-01-01;GLOBAL;all;"online_services;mass_media;publishing"
clay.com;1405903;18677;18677;0;12862;12862;0;44897;0;8919;3060;0;1278;0;5289;131;0;3060;1278;0;0;195;195;0;2.4039;2.4039;0;0.4212;0.4212;0;1;0;3;2023-01-01;GLOBAL;all;n/a
it's not clear how to handle this in the general case. how do we know that the first row is headers and not data? how do we know that quotation marks mean we're supposed to ignore semicolons? how do we know that separate rows refer to separate entries? in the semrush case, the answers here are clear (hence why we built the semrush integration, which is the best way to tackle this one). but in the general case, we don't have clear answers to the above questions, so we can't reliably output data from this type of http response. maybe something that would be more helpful - what are the data points you're trying to get with this http api call that you can't get with the dedicated semrush integration? would love to help troubleshoot that!
Joel S. update for you - we now have many more datapoints available within the Semrush enrichment: https://clayrunhq.slack.com/archives/C0260Q708KD/p1706277720325229