WhitePages Web Developer Portal Forums

Questions

RSS Feed

Questions on how to use the API or integrate with other APIs? Ask other developers here.

  1. Message edited by willywonka 5 years ago

  2. johnydoe5 years ago

    Is anybody tried to implement this API in PHP code and if so. Can I see a sample of it? I am interested mostly in the reverse phone look up example.

    thank you

  3. Dan_WhitePages5 years ago

    Hi Johny,

    Thanks for your interest. We don't have any PHP samples at this time but I would suggest taking a look at these libraries to help you get started.

    First you could use the cURL library[1] to make the http call back to api.whitepages.com.

    I'd also suggest using the JSON outputtype parameter as the JSON[2] decoder[3] is native to PHP since version 5.2.

    Thanks for trying our API out!

    Dan

    [1] http://www.php.net/manual/en/ref.curl.php
    [2] http://us.php.net/json
    [3] http://us.php.net/manual/en/function.json-decode.php

  4. ds5 years ago

    Hello, I'm currently just testing out the functionality of the new API. I'm interested in the reverse address search, but notice that the API only returns a maximum of 5 listings when querying for a street name without a specific address. This makes sense since the API documentation states as limitations for the reverse_address method "A reverse_address search will return at most 5 listings using the WPAPI. Additional listings may be available by following one of the URLs returned as links with a successful search."

    If "additional listings may be available by following one of the URLS returned as links with a successful search" are we allowed to programatically follow returned links (I assume this would be outside the scope of the API at that point)?

    Thanks for your reply!

  5. Scott_WhitePages5 years ago

    (Answered in General category: here's a repost

    Great question, ds.

    You're right, programmatically following links is outside the scope of the API, and is generally something we frown upon, since it's usually related to people scraping our site for data collection. We certainly don't promise that the site's links or structure will stay the same.

    You can approximate what you want by providing ranges of house numbers and then aggregating the results, though I can understand that this might be more painful than you want to do.

    What's your scenario, BTW? We've started with these limits but they're not set in stone - if we see compelling reasons to change them without breaking other goals, we certainly could do so.

  6. ds5 years ago

    Scenario: I'm not really sure yet, but I'm thinking of integrating this API with the google maps API to be able to select a street and retrieve all of the listed names / phone numbers on the whole street (in one list).

    "You can approximate what you want by providing ranges of house numbers and then aggregating the results, though I can understand that this might be more painful than you want to do."

    Do you mean: querying for the street name and retrieving the first address (n), then performing multiple queries of
    n = [n - (n+4)] until you receive a not found error? E.g:
    street=mulberry%20st;house=1001-1005;city=smalltown;state=az;api_key=MYAPIKEY
    street=mulberry%20st;house=1006-1010;city=smalltown;state=az;api_key=MYAPIKEY
    ... etc.

    BTW: Thanks for your quick response :)

  7. Scott_WhitePages5 years ago

    That's sort of the idea, except that in general there won't be a house at every integer between 1001-1005, so you'll end up with more empty queries then you might want.

    Another scheme could be to start with a very large range, then as you get results, increment the bottom of the range: i.e. search for [100-1000], you get back 101,105,109,113,121, then do [122-1000]. You could do other binary search-style queries.

    You could also use information about the cross-streets to try to find the right starting point (I believe one of the samples gives you an example of doing this).

    Enjoy, and we'll be around!

  8. Dan_WhitePages5 years ago

    I should also point out that the syntax for range searches encloses the range in [ ].

    Taking your second example, the new query would look like this:
    street=mulberry%20st;house=[1006-1010];city=smalltown;state=az;api_key=MYAPIKEY

  9. bluegirl5 years ago

    How do I use this program to do a reverse phone search?

  10. Dan_WhitePages5 years ago

    If you are just looking to make a couple of reverse phone searches or to just do it for yourself I would recommend bookmarking
    http://whitepages.com/reverse_phone/

    If you would like some tips on integrating this API with your app the documentation for reverse_phone query is here:
    http://developer.whitepages.com/docs/Methods/reverse_phone

    If you have a specific question about the API please post a follow up question here and I'd be happy to answer it.

  11. bpantherndc5 years ago

    how do I integrate this code into an existing web site to make ti work like the master site?

  12. BaldPenguin5 years ago

    johnydoe -- see http://php-whitepages.googlecode.com for a php module implementation

  13. Scott_WhitePages5 years ago

    bpantherndc, I don't understand your question. What are you trying to do?

  14. lms2pts5 years ago

    how /where do i get my api key? I already registered but I don't know where to go to get my key.

  15. Dan_WhitePages5 years ago

    lms2pts
    You'll need to request an API key from this link while you are signed in.

    http://developer.whitepages.com/apps/registration

    After you fill out the form found there, the key should be emailed to the email address you provided when you signed up.

  16. Watermeloncat5 years ago

    Um.. do you HAVE to have PHP and CURL to use the API??
    Because I don't have neither.. I just have a website operating off of XML and I was wanting to add this as a widget/application for my website users to use accordingly. Any Comments?

    Thanks-
    Sara

  17. Scott_WhitePages5 years ago

    Hi Sara -

    You absolutely don't need to use PHP and CURL. You can make XML requests to the API and get XML results back. The documentation and samples should give you some examples of doing just that, especially the first single-page sample.

  18. Dan_WhitePages5 years ago

    Hi Sara -
    As long as you can craft a URL and process the XML results then you can make a call to the API.

  19. Arnita5 years ago

    once you've registered, received your API key and sign in, where do you go from there?

  20. Dan_WhitePages5 years ago

    Arnita,

    The best place to begin your development is by reading the documentation and looking at the sample applications

    http://developer.whitepages.com/docs
    http://developer.whitepages.com/api_gallery

    Then you'll want to sit down and figure out what you want your application to do. After that it's just coding.

  21. Tasha5 years ago

    Is there another way just to show specifically or tell how to retrieve the info that's needed?

  22. Bruce_WhitePages5 years ago

    To show specifically or tell how to retrieve just the info that's needed would depend on what you are trying to do. The documentation and example applications are usually the best place to start. You can find them at:

    http://developer.whitepages.com/docs
    http://developer.whitepages.com/api_gallery

    If you just have some names or numbers and want to quickly get contact information without programming an application of your own, then the best source is www.whitepages.com which provides access to the same data in an easy to use web site.

  23. jessica5 years ago

    how can i look someone up by their phone number without cost to me

  24. Jody Millbern Vinet5 years ago

    Yes! How can I look someone up by their phone number without cost to me.

  25. Dan_WhitePages5 years ago

    jessica / Jody

    Try http://www.whitepages.com/reverse_phone

[ Page 1 of 2 | Next ]