Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 538527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:02:28+00:00 2026-05-13T10:02:28+00:00

It isn’t clear if this API is even capable of searching by URL, searched

  • 0

It isn’t clear if this API is even capable of searching by URL, searched through G, without much success.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:02:28+00:00Added an answer on May 13, 2026 at 10:02 am

    Services_Digg2 is just a client library in PHP that forwards all calls to the API and the API does support searching by urls. What you need to pass is the md5 hash of the url instead of the actual url. PHP has a md5 function that you can use to get the md5 hash of a url.

    The API call then would be for story.getAll and you pass the previously calculated md5 hash as a parameter link_hash.

    http://services.digg.com/1.0/endpoint?method=story.getAll&link_hash=a23658a0828e2fb388b7c83f61e235e6
    

    This hash above is for the URL http://www.nytimes.com/2010/01/05/health/05docs.html and the response from the API is:

    <stories timestamp="1262740374" total="1" offset="0" count="1"> 
     <story link="http://www.nytimes.com/2010/01/05/health/05docs.html" submit_date="1262729293" diggs="70" id="18288654" comments="6" href="http://digg.com/health/For_F_D_R_Sleuths_New_Focus_on_an_Odd_Spot" promote_date="1262739603" status="popular" media="news"> 
      <description>Look closely at Roosevelt’s portraits over his 12-year presidency. In his first two terms, there is a dark spot over his left eyebrow. It seems to grow and then mysteriously vanishes sometime around 1940, leaving a small scar.  </description> 
      <title>For F.D.R. Sleuths, New Focus on an Odd Spot</title> 
      <user name="leaprinces" registered="1227624484" profileviews="23186" fullname="Princess Leia" icon="http://digg.com/users/leaprinces/l.png" /> 
      <topic name="Health" short_name="health" /> 
      <container name="Lifestyle" short_name="lifestyle" /> 
      <thumbnail originalwidth="190" originalheight="126" contentType="image/jpeg" src="http://digg.com/health/For_F_D_R_Sleuths_New_Focus_on_an_Odd_Spot/t.jpg" width="80" height="80" /> 
      <shorturl short_url="http://digg.com/d31EjiI" view_count="192" /> 
     </story> 
    </stories>
    

    The story element in this response has an attribute called diggs which is what you need.

    To get this through the PHP library, the code should look something like:

    $url = "...";
    
    $api = new Services_Digg2;
    $stories = $api->story->getAll(array('link_hash' => md5($url)))->stories;
    
    foreach($stories as $story) {
        // I am not sure how to access the diggs attribute
        // Maybe this works. If not, just
        // var_dump the $story object and 
        // see how to access the digg count information.
        echo $story['diggs'];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This isn't so much a programming issue, but i'm not sure where else to
Isn't it much slower concerning development time ? What are the advantages of of
Isn't visual studio supposed to automatically generate this file for each webservice creation ?
Isn't this / ? Why is there a constant for it? It's not like
Isn't Makefile syntax is target: require_files cmd... Why I got this problem? Makefile MXMLC
Isn't there a better way to accomplish this?: (RegionID is a Flex ComboBox) RegionID.selectedItem=value.Region;
This isn't homework for me , it's a task given to students from some
This isn't exactly a singleton, but it's close, so I imagine it's common. I
Isn't this a simpler as well as safe (and hence better) way to implement
Isn't this a client side control? What will happen if the user has disabled

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.