MetaURI is a free service that follows all redirects for a given URI and then gives you back meta information about that final URI in a variety of formats.
About MetaURI
Parameters
- uri: the URI you want meta info for
- timeout: number of seconds to wait before timing out when trying to retrieve the page, this relates to transfer time only (default: 10)
- connect_timeout: number of seconds to wait while trying to connect to a host (default 10)
- max_redirects: number of redirects to follow before pulling out (default: 10)
- headers: 0 or 1, boolean for whether you want headers in your response (default: 0)
Formats
Examples
-
http://metauri.com/show.js?uri=http%3A%2F%2Fwww.google.com%2F
{ "last_effective_uri": "http:\/\/www.google.com\/", "content_type": "text\/html", "charset": "UTF-8", "title": "Google", "last_modified": null, "status": 200, "uri": "http:\/\/www.google.com\/", "feed": null } -
http://metauri.com/show.xml?headers=1&uri=http%3A%2F%2Fwww.google.com%2F
<location> <last_effective_uri>http://www.google.com/asdf</last_effective_uri> <content_type>text/html</content_type> <charset>UTF-8</charset> <title>404 - Page Not Found</title> <last_modified type="datetime"/> <status type="integer">404</status> <uri>http://www.google.com/asdf</uri> <feed /> <headers type="datamapper::types::text"> HTTP/1.1 404 Not Found Cache-Control: private, max-age=0 Date: Tue, 18 Aug 2009 06:32:58 GMT Expires: -1 Content-Type: text/html; charset=UTF-8 Server: gws Transfer-Encoding: chunked </headers> </location>
Developer Keys
In order to keep our service running at a reasonable speed, the free service is rate limited to 200 requests over a 10 minute period. You will start receiving an over limit response once you go over this limit. If you feel you need more than the default offers, then shoot us an email and we will sort something out.
Known Issues
- Does not follow all redirects, eg. javascript
- Does not pass framed redirects. As these are techincally full pages it could be difficult to know that it's not really the end URI.
- Some sites may not like lots of requests from the same machine, so this may lead to getting blocked by that site.
Cache Clearing
If for any reason you need to remove entries from metauri.com's internal caching (e.g. testing) then this is also possible by hitting http://www.metauri.com/delete?uri=... instead. Standard examples of needing to do this are if you have uri FOO which ends up at BAR after a series of redirects, and metauri.com has all those redirects cached, but then you want to test the max_redirects functionality.