Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was wondering if there is a feature in the API that I could use to retrieve various features of a question on the Stack Exchange network when I know the actual URL of the question.

share|improve this question
up vote 2 down vote accepted

The API allows you to get question data based on ID, so since all forms of question URLs for Stack Exchange sites have an ID in them, you can pull that value out and pass it to the /questions/{ids} route.

Likewise, if you don't know the specific site in advance, you can pull out the hostname and pass that in dynamically.

As an example, I parse out similar information in a userscript I maintain.

share|improve this answer
Thanks @TimStone. That pretty much solved my problem! – Sid Nov 13 '12 at 0:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .