Adding a string to URL accessing someone else's API
Posted on 2012-03-12
I'm currently using a search API provided by another website where I can add parameters in my URL string in order to return certain results in an XML file.
Right now, my URL string looks like such:
api.mydomain.com/search?source=CRAIG&category=VAUT&authID=<my authorization id>
This returns a very large xml file worth of data. One of the pieces of data that is returned in my XML is subcategory_2 = "cars & trucks - by owner". How would I go about adding that to my URL to filter my results by it. Basically, what I'm looking for is the equivalent to:
api.mydomain.com/search?source=CRAIG&category=VAUT&subcategory_2=cars+&+trucks+-+by+owner&authid=<my authorization id>.
Obviously, my URL doesn't work correctly, but if someone can tell me how to accomplish what I'm showing above properly that would be awesome!