JSON RESPONSE EXAMPLES OF API V3
Advice: Please take a look at the Best practice section too.
Worth a read: How the hyScore single URL analysis works.
Response example [1]:Status "message": "New URL, analysis in progress", "type": "No data yet". "No data yet" shows usually the initial and first request of an unknown URL. If this URL was never seen before by hyScore and we're not able to deliver an answer within 100ms, we’ll always send this response. Usually, with the 2nd or 3rd request to the same URL we’ve provided a proper result - see Response example [3] |
Response Header: HTTP/1.1 200 OK Response Body:
|
|
{ |
Response example [3]: Full response – A full response looks like this: |
Response Header: HTTP/1.1 200 OK Response Body:
{ "url": "https://www.theguardian.com/us-news/2018/apr/06/trump-russia-sanctions-election-meddling-latest", "status": { "message": "All seems well.", "code": "1", "type": "Ok" }, "result": { "weightedKeywords": [ { "surface_form": [ "Trump" ], "frequency": 5, "type": "President", "name": "Donald Trump", "weight": 5.312048192771084 }, { "surface_form": [ "Russian", "Russia" ], "frequency": 12, "type": "Country", "name": "Russia", "weight": 4.02289156626506 }, { "surface_form": [ "White House", "Trump administration" ], "frequency": 4, "type": "Keyword", "name": "Presidency of Donald Trump", "weight": 3.6060240963855423 }, { "surface_form": [ "circle" ], "frequency": 3, "type": "Keyword", "name": "Social group", "weight": 3.003614457831325 }, { "surface_form": [ "Russians" ], "frequency": 3, "type": "Country", "name": "Soviet Union", "weight": 3.003614457831325 }, { "surface_form": [ "Russian oligarchs", "oligarchs" ], "frequency": 3, "type": "Keyword", "name": "Russian oligarch", "weight": 2.603614457831325 }, { "surface_form": [ "trump" ], "frequency": 1, "type": "Keyword", "name": "Glossary of contract bridge terms", "weight": 2.3012048192771086 }, { "surface_form": [ "Moscow" ], "frequency": 2, "type": "AdministrativeRegion", "name": "Moscow", "weight": 2.0024096385542167 }, { "surface_form": [ "Congress" ], "frequency": 2, "type": "Legislature", "name": "United States Congress", "weight": 2.0024096385542167 }, { "surface_form": [ "Europe" ], "frequency": 1, "type": "Country", "name": "European Union", "weight": 1.952409638554217 }, { "surface_form": [ "Syria" ], "frequency": 1, "type": "Country", "name": "Syria", "weight": 1.002409638554217 }, { "surface_form": [ "democracy" ], "frequency": 1, "type": "Keyword", "name": "Democracy", "weight": 1.0012048192771084 }, { "surface_form": [ "Kirill" ], "frequency": 1, "type": "ChristianBishop", "name": "Patriarch Kirill of Moscow", "weight": 1.0012048192771084 }, { "surface_form": [ "Crimea" ], "frequency": 1, "type": "MilitaryConflict", "name": "Annexation of Crimea by the Russian Federation", "weight": 1.0012048192771084 }, { "surface_form": [ "Iran" ], "frequency": 1, "type": "Keyword", "name": "Politics of Iran", "weight": 1.0012048192771084 }, { "surface_form": [ "missile" ], "frequency": 1, "type": "Keyword", "name": "Intercontinental ballistic missile", "weight": 1.0012048192771084 }, { "surface_form": [ "wind" ], "frequency": 1, "type": "Keyword", "name": "Wind power", "weight": 1.0012048192771084 }, { "surface_form": [ "US politics" ], "frequency": 1, "type": "Keyword", "name": "US politics", "weight": 1 }, { "surface_form": [ "US news" ], "frequency": 1, "type": "Keyword", "name": "US news", "weight": 1 }, { "surface_form": [ "World news" ], "frequency": 1, "type": "Keyword", "name": "World news", "weight": 1 }, { "surface_form": [ "purest form" ], "frequency": 1, "type": "Band", "name": "Purest Form", "weight": 0.6012048192771083 }, { "surface_form": [ "Rosoboronexport" ], "frequency": 1, "type": "Company", "name": "Rosoboronexport", "weight": 0.6012048192771083 }, { "surface_form": [ "energy" ], "frequency": 1, "type": "Keyword", "name": "Energy industry", "weight": 0.6012048192771083 }, { "surface_form": [ "Interfax" ], "frequency": 1, "type": "Company", "name": "Interfax", "weight": 0.6012048192771083 }, { "surface_form": [ "Reuters" ], "frequency": 1, "type": "Company", "name": "Reuters", "weight": 0.6012048192771083 }, { "surface_form": [ "Middle East" ], "frequency": 1, "type": "Keyword", "name": "Middle East", "weight": 0.6012048192771083 }, { "surface_form": [ "Putin", "Vladimir Putin" ], "frequency": 1, "type": "President", "name": "Vladimir Putin", "weight": 0.6012048192771083 }, { "surface_form": [ "Paul Manafort" ], "frequency": 1, "type": "Politician", "name": "Paul Manafort", "weight": 0.6012048192771083 }, { "surface_form": [ "Steven Mnuchin" ], "frequency": 1, "type": "OfficeHolder", "name": "Steven Mnuchin", "weight": 0.6012048192771083 }, { "surface_form": [ "Gazprom" ], "frequency": 1, "type": "Company", "name": "Gazprom", "weight": 0.6012048192771083 }, { "surface_form": [ "civil war" ], "frequency": 1, "type": "Keyword", "name": "Syrian Civil War", "weight": 0.6012048192771083 }, { "surface_form": [ "Oleg Deripaska" ], "frequency": 1, "type": "Person", "name": "Oleg Deripaska", "weight": 0.6012048192771083 }, { "surface_form": [ "upper house" ], "frequency": 1, "type": "Keyword", "name": "Upper house", "weight": 0.6012048192771083 }, { "surface_form": [ "unfair competition" ], "frequency": 1, "type": "Keyword", "name": "Unfair competition", "weight": 0.6012048192771083 }, { "surface_form": [ "Konstantin Kosachev" ], "frequency": 1, "type": "OfficeHolder", "name": "Konstantin Kosachev", "weight": 0.6012048192771083 }, { "surface_form": [ "2016 US election" ], "frequency": 1, "type": "Election", "name": "United States presidential election, 2016", "weight": 0.6012048192771083 }, { "surface_form": [ "treasury department" ], "frequency": 1, "type": "GovernmentAgency", "name": "United States Department of the Treasury", "weight": 0.6012048192771083 }, { "surface_form": [ "North Korea" ], "frequency": 1, "type": "Country", "name": "North Korea", "weight": 0.6012048192771083 }, { "surface_form": [ "aluminum" ], "frequency": 1, "type": "Keyword", "name": "Aluminium", "weight": 0.6012048192771083 }, { "surface_form": [ "Robert Mueller" ], "frequency": 1, "type": "OfficeHolder", "name": "Robert Mueller", "weight": 0.6012048192771083 }, { "surface_form": [ "economic sanctions" ], "frequency": 1, "type": "Keyword", "name": "International sanctions during the Ukrainian crisis", "weight": 0.6012048192771083 }, { "surface_form": [ "politics Europe" ], "frequency": 1, "type": "TelevisionShow", "name": "Daily Politics", "weight": 0.6012048192771083 }, { "surface_form": [ "Syrian government" ], "frequency": 1, "type": "OfficeHolder", "name": "Bashar al-Assad", "weight": 0.6012048192771083 } ], "sentiment": 0.047616314661769216, "language": "en", "textLength": 5129, "image": "https://i.guim.co.uk/img/media/6fb4855daf274e0889194256b065eb6bdf8fab4c/0_162_4000_2400/master/4000.jpg?w=300&q=55&auto=format&usm=12&fit=max&s=41dd9a854c3ece3af6ba3ffed5e93bc4", "customData": "Some data here", "headings": [ { "content": "Trump administration hits 24 Russians with sanctions over 'malign activity'", "tag": "h1" }, { "content": "Russia retaliates with vow to expel dozens of western diplomats", "tag": "h1" }, { "content": "Most viewed", "tag": "h2" } ], "debug": "Text field deactivated. ", "metaKeywords": "US news, Russia, US politics, Europe, World news", "categories": { "hyscore": [ { "name": "politics", "weight": 36.659 }, { "name": "politics_misc", "weight": 23.869 }, { "name": "politics_american", "weight": 16.058 }, { "name": "interest_frequent_travelers", "weight": 8.434 }, { "name": "business", "weight": 6.654 }, { "name": "business_misc", "weight": 5.217 } ], "iab": [ { "category": "Law, Government, & Politics", "v1": "IAB11", "weight": 36.659 }, { "category": "Law, Government, & Politics", "v1": "IAB11", "weight": 23.869 }, { "category": "Law, Government, & Politics", "v1": "IAB11-3", "weight": 16.058 }, { "category": "category not supported by IAB" }, { "category": "Business", "v1": "IAB3", "weight": 6.654 }, { "category": "Business", "v1": "IAB3", "weight": 5.217 } ] }, "description": "Government officials and oligarchs are among those sanctioned, in US retaliation for alleged election meddling and other actions" }, "tld": "theguardian.com" } |
Response example [4]: Error response – an error response, e.g. Target URL not reachable" (DNS error, etc.) looks like this: |
Response Header:
|
Comments
0 comments
Article is closed for comments.