New to API - So Confused

9 replies
Edit: I figured out what to do.

I'm trying to use API to pull a lawyer search box from Avvo.com, a legal directory. The API page is Avvo API.

I'm new to API's and have no idea what to do. They give you a URL, example request, and example response, but I have no idea what to do with this.

Can someone help me? Do I need to create a php file or something?

Brandon
#api #confused
  • Profile picture of the author jasong714
    That is not going to be a simple task for a new programmer. Start looking into basic PHP tutorials.

    You need to create a web application that interacts with their API. You communicate with the API using JSON - google JSON


    If you go with PHP, look at the JSON extension for PHP
    {{ DiscussionBoard.errors[5355835].message }}
    • Profile picture of the author Don Art
      Well, first they seem to have no documentation. My best guess is you would do best by retrieving the data via javascript. Use jquery to make that much easier. Search on jQuery.getJSON(). Because this will be a cross domain request you will need to use jsonp. (look for that on the jquery jsonp page and also look up jsonp in wikipedia).

      You can go thru the results using the jquery $.each (jQuery.each())

      Note you will have to log into the site prior to making the requests.

      Like was mentioned this can be complicated but jquery has tons of examples all around the web. If nothing else goto a freelance site and ask for a script. I bet it would cost like $10.
      {{ DiscussionBoard.errors[5357444].message }}
  • Profile picture of the author SteveJohnson
    There is plenty of documentation, but this kind of thing is not easy for a person new to programming. The API is straightforward - make an HTTP GET request, and the result is returned in json object format.

    Retrieving with javascript may not be the best solution, especially if Avvo requires that you cache query results for a certain time period.

    For more information on talking to a REST API with PHP, see this: Create a REST API with PHP « Gen X Design | Ian Selby

    And I doubt you'll find anyone willing to do this for $10...
    Signature

    The 2nd Amendment, 1789 - The Original Homeland Security.

    Gun control means never having to say, "I missed you."

    {{ DiscussionBoard.errors[5358424].message }}
  • Profile picture of the author wayfarer
    Steve's right, you need an experienced programmer that knows not only how to interact with a remote server, but deal with different data types. The most common return response formats are JSON and XML. I prefer JSON, but XML is the old norm.

    A good programmer is also an expert at reading documentation.

    Personally, I don't take on jobs that have a budget of $10, or even $200, but it's possible to find short-term help on the cheap if you know how to work resources. I'm not saying it's a $10 job (it's probably not), but it isn't necessarily a hard one in the right hands.
    Signature
    I build web things, server things. I help build the startup Veenome. | Remote Programming Jobs
    {{ DiscussionBoard.errors[5360658].message }}
  • Profile picture of the author infinitewp
    If you wanna take a simple path try finding SDK it should have some basic example to start with.

    Thanks
    {{ DiscussionBoard.errors[5388537].message }}
  • Profile picture of the author rushindo
    Thanks everyone! The concept of API sounded so easy at first. Boy was I wrong.
    {{ DiscussionBoard.errors[5391691].message }}
  • Profile picture of the author jcwebhole
    APIs are awesome! You got to love it first to harness it powers... By love i mean study about it, practice on it, find others who love it...

    Anyway going back to your problem... I really havent read through the API you are looking at using, but if its a free access API i will try to make a simple integration so i can send you the codes... Dont expect too much - I said I will try
    {{ DiscussionBoard.errors[5393374].message }}
  • Profile picture of the author jcwebhole
    can you lend me your access? it takes forever for the website to reply to my access request... im thinking that this is really easy with some PHP and jQuery.. fun to do
    {{ DiscussionBoard.errors[5394107].message }}
    • Profile picture of the author rushindo
      Originally Posted by jcwebhole View Post

      can you lend me your access? it takes forever for the website to reply to my access request... im thinking that this is really easy with some PHP and jQuery.. fun to do
      Awesome! I'm sending you a PM...
      {{ DiscussionBoard.errors[5406399].message }}

Trending Topics