The first thing you need to get started with the Cadmus API is your API key. You can get your API key from here. This key is used when making a call to the API and helps us identify who is making the call. You can also give your API key to third party applications and they can make the calls on your behalf. If at any point you feel that your key is being misused, you can simply reset the key here.
If you are an application developer and are looking to add Cadmus to your application then you can contact us via email or Twitter to get your application key. With this key and the Authentication API you can allow your users to seamlessly sign in with Cadmus and get their API key.
http://thecadmus.com/api/posts?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&format=json&pretty=true
Using the Posts API you can get your filtered stream similar to the way that it is displayed on your homepage.
http://thecadmus.com/api/posts
key
The API key. You can get your API key from here.
count
The number of posts to return. Defaults to 30. Restricted to a maximum of 50.
page
The page number of the results. Defaults to 1 (the first page of posts).
timespan
The posts in the past number of hours; capped at 168 (1 week). Defaults to 24 (the past day of posts).
format
The format of the response (xml or json). Defaults to json.
callback
The JSON callback function. Defaults to no value.
[
{
"id":5127572787,
"text":"Test post content #1.",
"created_at":"Tue Oct 27 18:02:00 +0000 2009",
"link":"http:\/\/twitter.com\/fanjiewang\/status\/5127572787",
"type":"twitter",
"user":{
"screen_name":"fanjiewang",
"name":"Frank Wang",
"profile_image_url":"http:\/\/s.twimg.com\/image_bigger.png",
"profile_url":"http:\/\/twitter.com\/fanjiewang"
},
"comments":[
{
"id":123
"text":"content",
"created_at":"Tue Oct 27 18:04:00 +0000 2009",
"link":"http:\/\/twitter.com\/fanjiewang\/status\/123",
"type":"twitter",
"user":{
"screen_name":"fanjiewang",
"name":"Frank Wang",
"profile_image_url":"http:\/\/s.twimg.com\/image.img",
"profile_url":"http:\/\/twitter.com\/fanjiewang"
}
}
],
"related":[
{
"id":5127572788,
"text":"Test post content #2.",
"created_at":"Tue Oct 27 18:02:00 +0000 2009",
"link":"http:\/\/twitter.com\/fanjiewang\/status\/5127572788",
"type":"twitter",
"user":{
"screen_name":"fanjiewang",
"name":"Frank Wang",
"profile_image_url":"http:\/\/s.twimg.com\/image_bigger.png",
"profile_url":"http:\/\/twitter.com\/fanjiewang"
},
"comments":[
{
"id":1234
"text":"content",
"created_at":"Tue Oct 27 18:04:00 +0000 2009",
"link":"http:\/\/twitter.com\/fanjiewang\/status\/1234",
"type":"twitter",
"user":{
"screen_name":"fanjiewang",
"name":"Frank Wang",
"profile_image_url":"http:\/\/s.twimg.com\/image.img",
"profile_url":"http:\/\/twitter.com\/fanjiewang"
}
}
]
}
]
},
... and so on ...
]
myCallbackFunction([post, post,...]);
<?xml version="1.0" encoding="UTF-8"?>
<posts>
<post>
<id>123</id>
<text>content</text>
<created_at>Tue Oct 27 18:02:00 +0000 2009</created_at>
<service_type>twitter</service_type>
<link>http://twitter.com/fanjiewang/status/123</link>
<user>
<screen_name>fanjiewang</screen_name>
<name>Frank Wang</name>
<profile_image_url>http://s.twimg.com/image.img</profile_image_url>
<profile_url>http://twitter.com/fanjiewang</profile_url>
</user>
<comments>
<comment>
<id>123</id>
<text>content</text>
<created_at>Tue Oct 27 18:02:00 +0000 2009</created_at>
<service_type>twitter</service_type>
<link>http://twitter.com/fanjiewang/status/123</link>
<user>
<screen_name>fanjiewang</screen_name>
<name>Frank Wang</name>
<profile_image_url>http://s.twimg.com/image.img</profile_image_url>
<profile_url>http://twitter.com/fanjiewang</profile_url>
</user>
</comment>
</comments>
<related>
<post>
<id>1234</id>
<text>content</text>
<created_at>Tue Oct 27 18:02:00 +0000 2009</created_at>
<service_type>twitter</service_type>
<link>http://twitter.com/fanjiewang/status/1234</link>
<user>
<screen_name>fanjiewang</screen_name>
<name>Frank Wang</name>
<profile_image_url>http://s.twimg.com/image.img</profile_image_url>
<profile_url>http://twitter.com/fanjiewang</profile_url>
</user>
<comments>
<comment>
<id>123</id>
<text>content</text>
<created_at>Tue Oct 27 18:02:00 +0000 2009</created_at>
<service_type>twitter</service_type>
<link>http://twitter.com/fanjiewang/status/123</link>
<user>
<screen_name>fanjiewang</screen_name>
<name>Frank Wang</name>
<profile_image_url>http://s.twimg.com/image.img</profile_image_url>
<profile_url>http://twitter.com/fanjiewang</profile_url>
</user>
</comment>
</comments>
</post>
</related>
</post>
... and so on ...
</posts>
{"error":true,"code":xxx}
myCallbackFunction({"error":true,"code":xxx});
<?xml version="1.0" encoding="UTF-8"?>
<response>
<error>true</error>
<code>xxx</code>
</response>
Below are the error codes and their descriptions, that are thrown in case something goes wrong. The appropriate HTTP headers are set as well.
400
The request parameters are invalid. Please check the parameters that are being passed in.
401
The API key given is invalid. You can get the right API key from here.
404
The API resource does not exist. Check the API URL for typos.
500
Sorry, something went wrong on our end. In all likelihood we have been emailed about it and are looking into it. You can send me an email or contact me via Twitter for further details.
You can try the examples below in your terminal using cURL or simply put in the URL in your browser and try it out. The '******....' value needs to be replaced with your real API key, which you can find here.
curl http://thecadmus.com/api/posts?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
curl http://thecadmus.com/api/posts?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&count=10
curl http://thecadmus.com/api/posts?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx×pan=10
curl http://thecadmus.com/api/posts?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&page=2
curl http://thecadmus.com/api/posts?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&callback=showPostsFunction
curl http://thecadmus.com/api/posts?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&format=xml
curl http://thecadmus.com/api/posts?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&count=20&page=1×pan=48&format=json&callback=showPostsFunction
Using the Auth API you can allow a user to authenticate with Cadmus and get their API key. We use OAuth echo to verify the user's credentials with Twitter. If the user is successfully authenticated and the user has a Cadmus account we return the user's API key. If the user does not have a Cadmus account then we return a Twitter OAuth authorization URL for Cadmus. Upon completing the OAuth process we return the API key for the new user using the callback URL.
http://thecadmus.com/api/auth/twitter
X-VERIFY-CREDENTIALS-AUTHORIZATION
All the OAuth parameters necessary so we could call https://api.twitter.com/1/account/verify_credentials.json using OAuth in the HTTP header. For example it should look like: OAuth oauth_timestamp="1280175628", oauth_version="1.0", oauth_consumer_key="xxxxxxxxxxx", oauth_token="xxxxxxxxxxxx", oauth_signature="xxxxxxxxxxxxx", oauth_nonce="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", oauth_signature_method="HMAC-SHA1". This needs to be passed in the request header.
appkey
The application key. You can contact us via email or via Twitter for for your application key.
callback_url
For new Cadmus users that go through the Twitter OAuth authorization process we return their API key by calling back on this URL. Defaults to no value
format
The format of the response (xml or json). Defaults to json.
callback
The JSON callback function. Defaults to no value.
{"key":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}
myCallbackFunction({"key":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"});
<?xml version="1.0" encoding="UTF-8"?>
<auth>
<key>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</key>
</auth>
http://example.com/mycallback?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
{
"error":true,
"code":501,
"auth_url""https:\/\/api.twitter.com\/oauth\/authenticate?..."
}
myCallbackFunction({
"error":true,
"code":xxx,
"auth_url""https:\/\/api.twitter.com\/oauth\/authenticate?..."
});
<?xml version="1.0" encoding="UTF-8"?>
<response>
<error>true</error>
<code>xxx</code>
<auth_url>https://api.twitter.com/oauth/authenticate?...</auth_url>
</response>
http://example.com/mycallback?error=true&code=xxx
{"error":true,"code":xxx}
myCallbackFunction({"error":true,"code":xxx});
<?xml version="1.0" encoding="UTF-8"?>
<response>
<error>true</error>
<code>xxx</code>
</response>
Below are the error codes and their descriptions, that are thrown in case something goes wrong. The appropriate HTTP headers are set as well.
400
The request parameters are invalid. Please check the parameters that are being passed in.
401
Authentication has failed. The oauth verification credentials given are invalid.
403
The application key is invalid. Please check the application key and try again.
404
The API resource does not exist. Check the API URL for typos.
500
Sorry, something went wrong on our end. In all likelihood we have been emailed about it and are looking into it. You can send me an email or contact me via Twitter for further details.
501
The given user is not a Cadmus user. Use the auth_url that is returned with the response to direct the user to sign in with Twitter and add Cadmus. After the user goes through the OAuth process we will pass their API key back through to the callback_url that was initially specified.
You can try the examples below in your terminal using cURL. Make sure to replace x_verify_credentials_authorization with the real value. And the '******....' value needs to be replaced with your real application key.
curl -H "X-VERIFY-CREDENTIALS-AUTHORIZATION: x_verify_credentials_authorization" http://thecadmus.com/api/auth/twitter?appkey=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
curl -H "X-VERIFY-CREDENTIALS-AUTHORIZATION: x_verify_credentials_authorization" http://thecadmus.com/api/auth/twitter?appkey=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&callback_url=http%3A%2F%2Fexample.com%2Fmycallback
curl -H "X-VERIFY-CREDENTIALS-AUTHORIZATION: x_verify_credentials_authorization" http://thecadmus.com/api/auth/twitter?appkey=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&callback=handleAuthFunction
curl -H "X-VERIFY-CREDENTIALS-AUTHORIZATION: x_verify_credentials_authorization" http://thecadmus.com/api/auth/twitter?appkey=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
curl -H "X-VERIFY-CREDENTIALS-AUTHORIZATION: x_verify_credentials_authorization" http://thecadmus.com/api/auth/twitter?appkey=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&callback=handleAuthFunction&callback_url=http%3A%2F%2Fexample.com%2Fmycallback
Using the Twitter Statuses API you can get your Twitter home timeline sorted by relevance.
http://thecadmus.com/api/twitter/statuses
key
The API key. You can get your API key from here.
count
The number of posts to return. Defaults to 30. Restricted to a maximum of 50.
page
The page number of the results. Defaults to 1 (the first page of posts).
timespan
The posts in the past number of hours; capped at 168 (1 week). Defaults to 24 (the past day of posts).
format
The format of the response (xml or json). Defaults to json.
callback
The JSON callback function. Defaults to no value.
Note: The related_count and comment_count values are added to the status.
[
{
"created_at":"Tue Oct 27 18:02:00 +0000 2009",
"geo":null,
"in_reply_to_status_id":null,
"place":null,
"truncated":false,
"source":"",
"in_reply_to_user_id":null,
"contributors":null,
"coordinates":null,
"user":{
"profile_background_tile":false,
"created_at":"Wed Mar 07 01:27:09 +0000 2007",
"friends_count":699,
"description":"Breaking Technology News And Opinions From TechCrunch",
"statuses_count":16144,
"profile_link_color":"0084B4",
"following":null,
"favourites_count":29,
"contributors_enabled":false,
"profile_sidebar_fill_color":"DDFFCC",
"url":"http://www.techcrunch.com",
"profile_image_url":"http://a3.twimg.com/bigger_normal.png",
"geo_enabled":false,
"notifications":false,
"time_zone":"Pacific Time (US & Canada)",
"profile_sidebar_border_color":"BDDCAD",
"location":"Silicon Valley",
"screen_name":"TechCrunch",
"verified":false,
"protected":false,
"profile_background_color":"9AE4E8",
"name":"TechCrunch",
"profile_background_image_url":"http://twimg.com/bg.png",
"followers_count":1366685,
"id":816653,
"lang":"en",
"utc_offset":-28800,
"profile_text_color":"333333"
},
"favorited":false,
"id":12468685711,
"in_reply_to_screen_name":null,
"text":"Bill Gates Talks About How To Change The World - http://tcrn.ch/aXhQtZ",
"related_count":9,
"comment_count":0
},
... and so on ...
]
myCallbackFunction([status, status,...]);
<?xml version="1.0" encoding="UTF-8"?>
<statuses>
<status>
<created_at>Mon Apr 19 18:11:29 +0000 2010</created_at>
<geo></geo>
<in_reply_to_status_id></in_reply_to_status_id>
<place></place>
<truncated></truncated>
<source></source>
<in_reply_to_user_id></in_reply_to_user_id>
<contributors></contributors>
<coordinates></coordinates>
<user>
<profile_background_tile></profile_background_tile>
<created_at>Wed Mar 07 01:27:09 +0000 2007</created_at>
<friends_count>699</friends_count>
<description>Breaking Technology News And Opinions From TechCrunch</description>
<statuses_count>16144</statuses_count>
<profile_link_color>0084B4</profile_link_color>
<following></following>
<favourites_count>29</favourites_count>
<contributors_enabled></contributors_enabled>
<profile_sidebar_fill_color>DDFFCC</profile_sidebar_fill_color>
<url>http://www.techcrunch.com</url>
<profile_image_url>http://a3.twimg.com/bigger_normal.png</profile_image_url>
<geo_enabled></geo_enabled>
<notifications></notifications>
<time_zone>Pacific Time (US & Canada)</time_zone>
<profile_sidebar_border_color>BDDCAD</profile_sidebar_border_color>
<location>Silicon Valley</location>
<screen_name>TechCrunch</screen_name>
<verified></verified>
<protected></protected>
<profile_background_color>9AE4E8</profile_background_color>
<name>TechCrunch</name>
<profile_background_image_url>http://twimg.com/bg.png</profile_background_image_url>
<followers_count>1366685</followers_count>
<id>816653</id>
<lang>en</lang>
<utc_offset>-28800</utc_offset>
<profile_text_color>333333</profile_text_color>
</user>
<favorited></favorited>
<id>12468685711</id>
<in_reply_to_screen_name></in_reply_to_screen_name>
<text>Bill Gates Talks About How To Change The World - http://tcrn.ch/aXhQtZ</text>
<related_count>9</related_count>
<comment_count>0</comment_count>
</status>
... and so on ...
</statuses>
{"error":true,"code":xxx}
myCallbackFunction({"error":true,"code":xxx});
<?xml version="1.0" encoding="UTF-8"?>
<response>
<error>true</error>
<code>xxx</code>
</response>
Below are the error codes and their descriptions, that are thrown in case something goes wrong. The appropriate HTTP headers are set as well.
400
The request parameters are invalid. Please check the parameters that are being passed in.
401
The API key given is invalid. You can get the right API key from here.
404
The API resource does not exist. Check the API URL for typos.
500
Sorry, something went wrong on our end. In all likelihood we have been emailed about it and are looking into it. You can send me an email or contact me via Twitter for further details.
You can try the examples below in your terminal using cURL or simply put in the URL in your browser and try it out. The '******....' value needs to be replaced with your real API key, which you can find here.
curl http://thecadmus.com/api/twitter/statuses?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
curl http://thecadmus.com/api/twitter/statuses?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&count=10
curl http://thecadmus.com/api/twitter/statuses?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx×pan=10
curl http://thecadmus.com/api/twitter/statuses?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&page=2
curl http://thecadmus.com/api/twitter/statuses?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&callback=showPostsFunction
curl http://thecadmus.com/api/twitter/statuses?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&format=xml
curl http://thecadmus.com/api/twitter/statuses?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&count=20&page=1×pan=48&format=json&callback=showPostsFunction
Using the Twitter Comment Statuses API you can get a list of all the comment statuses for a given status id. The URL is made up of the Twitter status id (:status).
http://thecadmus.com/api/twitter/comments/:status
key
The API key. You can get your API key from here.
count
The number of posts to return. Defaults to 30. Restricted to a maximum of 50.
page
The page number of the results. Defaults to 1 (the first page of posts).
format
The format of the response (xml or json). Defaults to json.
callback
The JSON callback function. Defaults to no value.
Note: The related_count and comment_count values are added to the status. For comment statuses the related_count and comment_count is always 0.
[
{
"created_at":"Tue Oct 27 18:02:00 +0000 2009",
"geo":null,
"in_reply_to_status_id":null,
"place":null,
"truncated":false,
"source":"",
"in_reply_to_user_id":null,
"contributors":null,
"coordinates":null,
"user":{
"profile_background_tile":false,
"created_at":"Wed Mar 07 01:27:09 +0000 2007",
"friends_count":699,
"description":"Breaking Technology News And Opinions From TechCrunch",
"statuses_count":16144,
"profile_link_color":"0084B4",
"following":null,
"favourites_count":29,
"contributors_enabled":false,
"profile_sidebar_fill_color":"DDFFCC",
"url":"http://www.techcrunch.com",
"profile_image_url":"http://a3.twimg.com/bigger_normal.png",
"geo_enabled":false,
"notifications":false,
"time_zone":"Pacific Time (US & Canada)",
"profile_sidebar_border_color":"BDDCAD",
"location":"Silicon Valley",
"screen_name":"TechCrunch",
"verified":false,
"protected":false,
"profile_background_color":"9AE4E8",
"name":"TechCrunch",
"profile_background_image_url":"http://twimg.com/bg.png",
"followers_count":1366685,
"id":816653,
"lang":"en",
"utc_offset":-28800,
"profile_text_color":"333333"
},
"favorited":false,
"id":12468685711,
"in_reply_to_screen_name":null,
"text":"Bill Gates Talks About How To Change The World - http://tcrn.ch/aXhQtZ",
"related_count":0,
"comment_count":0
},
... and so on ...
]
myCallbackFunction([status, status,...]);
<?xml version="1.0" encoding="UTF-8"?>
<statuses>
<status>
<created_at>Mon Apr 19 18:11:29 +0000 2010</created_at>
<geo></geo>
<in_reply_to_status_id></in_reply_to_status_id>
<place></place>
<truncated></truncated>
<source></source>
<in_reply_to_user_id></in_reply_to_user_id>
<contributors></contributors>
<coordinates></coordinates>
<user>
<profile_background_tile></profile_background_tile>
<created_at>Wed Mar 07 01:27:09 +0000 2007</created_at>
<friends_count>699</friends_count>
<description>Breaking Technology News And Opinions From TechCrunch</description>
<statuses_count>16144</statuses_count>
<profile_link_color>0084B4</profile_link_color>
<following></following>
<favourites_count>29</favourites_count>
<contributors_enabled></contributors_enabled>
<profile_sidebar_fill_color>DDFFCC</profile_sidebar_fill_color>
<url>http://www.techcrunch.com</url>
<profile_image_url>http://a3.twimg.com/bigger_normal.png</profile_image_url>
<geo_enabled></geo_enabled>
<notifications></notifications>
<time_zone>Pacific Time (US & Canada)</time_zone>
<profile_sidebar_border_color>BDDCAD</profile_sidebar_border_color>
<location>Silicon Valley</location>
<screen_name>TechCrunch</screen_name>
<verified></verified>
<protected></protected>
<profile_background_color>9AE4E8</profile_background_color>
<name>TechCrunch</name>
<profile_background_image_url>http://twimg.com/bg.png</profile_background_image_url>
<followers_count>1366685</followers_count>
<id>816653</id>
<lang>en</lang>
<utc_offset>-28800</utc_offset>
<profile_text_color>333333</profile_text_color>
</user>
<favorited></favorited>
<id>12468685711</id>
<in_reply_to_screen_name></in_reply_to_screen_name>
<text>Bill Gates Talks About How To Change The World - http://tcrn.ch/aXhQtZ</text>
<related_count>0</related_count>
<comment_count>0</comment_count>
</status>
... and so on ...
</statuses>
{"error":true,"code":xxx}
myCallbackFunction({"error":true,"code":xxx});
<?xml version="1.0" encoding="UTF-8"?>
<response>
<error>true</error>
<code>xxx</code>
</response>
Below are the error codes and their descriptions, that are thrown in case something goes wrong. The appropriate HTTP headers are set as well.
400
The request parameters are invalid. Please check the parameters that are being passed in.
401
The API key given is invalid. You can get the right API key from here.
404
The API resource does not exist. Check the API URL for typos.
500
Sorry, something went wrong on our end. In all likelihood we have been emailed about it and are looking into it. You can send me an email or contact me via Twitter for further details.
You can try the examples below in your terminal using cURL or simply put in the URL in your browser and try it out. The '******....' value needs to be replaced with your real API key, which you can find here.
curl http://thecadmus.com/api/twitter/comments/1000000000?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
curl http://thecadmus.com/api/twitter/comments/1000000000?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&count=10
curl http://thecadmus.com/api/twitter/comments/1000000000?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&page=2
curl http://thecadmus.com/api/twitter/comments/1000000000?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&callback=showPostsFunction
curl http://thecadmus.com/api/twitter/comments/1000000000?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&format=xml
curl http://thecadmus.com/api/twitter/comments/1000000000?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&count=20&page=1&format=json&callback=showPostsFunction
Using the Twitter Personal Trends API you can get a list of all your personal trending topics.
http://thecadmus.com/api/twitter/trends
key
The API key. You can get your API key from here.
count
The number of trends to return. Defaults to 10. Restricted to a maximum of 20.
format
The format of the response (xml or json). Defaults to json.
callback
The JSON callback function. Defaults to no value.
{
"trends":
[
{
"name":"iPhone",
"query":"iPhone",
"url":"http://thecadmus.com/#search?q=iPhone"
},
{
"name":"Twitter",
"query":"Twitter",
"url":"http://thecadmus.com/#search?q=Twitter"
},
... and so on ...
],
"as_of":"Tue, 22 Jun 2010 17:19:03 +0000"
}
myCallbackFunction({
"trends":[trend, trend,...],
"as_of":"Tue, 22 Jun 2010 17:19:03 +0000"
});
<?xml version="1.0" encoding="UTF-8"?>
<trends as_of="Tue, 22 Jun 2010 17:19:03 +0000">
<trend>
<name>iPhone</name>
<query>iPhone</query>
<url>http://thecadmus.com/#search?q=iPhone</url>
</trend>
<trend>
<name>Twitter</name>
<query>Twitter</query>
<url>http://thecadmus.com/#search?q=Twitter</url>
</trend>
... and so on ...
</trends>
{"error":true,"code":xxx}
myCallbackFunction({"error":true,"code":xxx});
<?xml version="1.0" encoding="UTF-8"?>
<response>
<error>true</error>
<code>xxx</code>
</response>
Below are the error codes and their descriptions, that are thrown in case something goes wrong. The appropriate HTTP headers are set as well.
400
The request parameters are invalid. Please check the parameters that are being passed in.
401
The API key given is invalid. You can get the right API key from here.
404
The API resource does not exist. Check the API URL for typos.
500
Sorry, something went wrong on our end. In all likelihood we have been emailed about it and are looking into it. You can send me an email or contact me via Twitter for further details.
You can try the examples below in your terminal using cURL or simply put in the URL in your browser and try it out. The '******....' value needs to be replaced with your real API key, which you can find here.
curl http://thecadmus.com/api/twitter/trends?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
curl http://thecadmus.com/api/twitter/trends?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&count=10
curl http://thecadmus.com/api/twitter/trends?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&callback=showTrendsFunction
curl http://thecadmus.com/api/twitter/trends?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&format=xml
curl http://thecadmus.com/api/twitter/trends?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&count=10&format=json&callback=showTrendsFunction
Using the Twitter Personal Search API you can get your Twitter Statuses for a given query. Currently, we do not return results for queries that are not personal trending topics.
http://thecadmus.com/api/twitter/search
key
The API key. You can get your API key from here.
query
The search query. This has to be one of the personal trending topics as returned by twitter/trends.
count
The number of posts to return. Defaults to 30. Restricted to a maximum of 50.
page
The page number of the results. Defaults to 1 (the first page of posts).
format
The format of the response (xml or json). Defaults to json.
callback
The JSON callback function. Defaults to no value.
Note: The related_count and comment_count values are added to the status.
[
{
"created_at":"Tue Oct 27 18:02:00 +0000 2009",
"geo":null,
"in_reply_to_status_id":null,
"place":null,
"truncated":false,
"source":"",
"in_reply_to_user_id":null,
"contributors":null,
"coordinates":null,
"user":{
"profile_background_tile":false,
"created_at":"Wed Mar 07 01:27:09 +0000 2007",
"friends_count":699,
"description":"Breaking Technology News And Opinions From TechCrunch",
"statuses_count":16144,
"profile_link_color":"0084B4",
"following":null,
"favourites_count":29,
"contributors_enabled":false,
"profile_sidebar_fill_color":"DDFFCC",
"url":"http://www.techcrunch.com",
"profile_image_url":"http://a3.twimg.com/bigger_normal.png",
"geo_enabled":false,
"notifications":false,
"time_zone":"Pacific Time (US & Canada)",
"profile_sidebar_border_color":"BDDCAD",
"location":"Silicon Valley",
"screen_name":"TechCrunch",
"verified":false,
"protected":false,
"profile_background_color":"9AE4E8",
"name":"TechCrunch",
"profile_background_image_url":"http://twimg.com/bg.png",
"followers_count":1366685,
"id":816653,
"lang":"en",
"utc_offset":-28800,
"profile_text_color":"333333"
},
"favorited":false,
"id":12468685711,
"in_reply_to_screen_name":null,
"text":"Bill Gates Talks About How To Change The World - http://tcrn.ch/aXhQtZ",
"related_count":0,
"comment_count":0
},
... and so on ...
]
myCallbackFunction([status, status,...]);
<?xml version="1.0" encoding="UTF-8"?>
<statuses>
<status>
<created_at>Mon Apr 19 18:11:29 +0000 2010</created_at>
<geo></geo>
<in_reply_to_status_id></in_reply_to_status_id>
<place></place>
<truncated></truncated>
<source></source>
<in_reply_to_user_id></in_reply_to_user_id>
<contributors></contributors>
<coordinates></coordinates>
<user>
<profile_background_tile></profile_background_tile>
<created_at>Wed Mar 07 01:27:09 +0000 2007</created_at>
<friends_count>699</friends_count>
<description>Breaking Technology News And Opinions From TechCrunch</description>
<statuses_count>16144</statuses_count>
<profile_link_color>0084B4</profile_link_color>
<following></following>
<favourites_count>29</favourites_count>
<contributors_enabled></contributors_enabled>
<profile_sidebar_fill_color>DDFFCC</profile_sidebar_fill_color>
<url>http://www.techcrunch.com</url>
<profile_image_url>http://a3.twimg.com/bigger_normal.png</profile_image_url>
<geo_enabled></geo_enabled>
<notifications></notifications>
<time_zone>Pacific Time (US & Canada)</time_zone>
<profile_sidebar_border_color>BDDCAD</profile_sidebar_border_color>
<location>Silicon Valley</location>
<screen_name>TechCrunch</screen_name>
<verified></verified>
<protected></protected>
<profile_background_color>9AE4E8</profile_background_color>
<name>TechCrunch</name>
<profile_background_image_url>http://twimg.com/bg.png</profile_background_image_url>
<followers_count>1366685</followers_count>
<id>816653</id>
<lang>en</lang>
<utc_offset>-28800</utc_offset>
<profile_text_color>333333</profile_text_color>
</user>
<favorited></favorited>
<id>12468685711</id>
<in_reply_to_screen_name></in_reply_to_screen_name>
<text>Bill Gates Talks About How To Change The World - http://tcrn.ch/aXhQtZ</text>
<related_count>0</related_count>
<comment_count>0</comment_count>
</status>
... and so on ...
</statuses>
{"error":true,"code":xxx}
myCallbackFunction({"error":true,"code":xxx});
<?xml version="1.0" encoding="UTF-8"?>
<response>
<error>true</error>
<code>xxx</code>
</response>
Below are the error codes and their descriptions, that are thrown in case something goes wrong. The appropriate HTTP headers are set as well.
400
The request parameters are invalid. Please check the parameters that are being passed in.
401
The API key given is invalid. You can get the right API key from here.
404
The API resource does not exist. Check the API URL for typos.
500
Sorry, something went wrong on our end. In all likelihood we have been emailed about it and are looking into it. You can send me an email or contact me via Twitter for further details.
You can try the examples below in your terminal using cURL or simply put in the URL in your browser and try it out. The '******....' value needs to be replaced with your real API key, which you can find here.
curl http://thecadmus.com/api/twitter/search?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
curl http://thecadmus.com/api/twitter/search?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&count=10&query=iPhone
curl http://thecadmus.com/api/twitter/search?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&page=2&query=iPhone
curl http://thecadmus.com/api/twitter/search?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&callback=showPostsFunction&query=iPhone
curl http://thecadmus.com/api/twitter/search?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&format=xml&query=iPhone
curl http://thecadmus.com/api/twitter/search?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&count=20&page=1&query=iPhone&format=json&callback=showPostsFunction
Using the Twitter List Statuses API you can get the Twitter timeline for the lists you are subscribed to sorted by relevance. The URL is made up of the Twitter username (:user) and the list name (:list).
http://thecadmus.com/api/twitter/lists/statuses/:user/:list
key
The API key. You can get your API key from here.
count
The number of posts to return. Defaults to 30. Restricted to a maximum of 50.
page
The page number of the results. Defaults to 1 (the first page of posts).
timespan
The posts in the past number of hours; capped at 168 (1 week). Defaults to 24 (the past day of posts).
format
The format of the response (xml or json). Defaults to json.
callback
The JSON callback function. Defaults to no value.
Note: The related_count and comment_count values are added to the status.
[
{
"created_at":"Tue Oct 27 18:02:00 +0000 2009",
"geo":null,
"in_reply_to_status_id":null,
"place":null,
"truncated":false,
"source":"",
"in_reply_to_user_id":null,
"contributors":null,
"coordinates":null,
"user":{
"profile_background_tile":false,
"created_at":"Wed Mar 07 01:27:09 +0000 2007",
"friends_count":699,
"description":"Breaking Technology News And Opinions From TechCrunch",
"statuses_count":16144,
"profile_link_color":"0084B4",
"following":null,
"favourites_count":29,
"contributors_enabled":false,
"profile_sidebar_fill_color":"DDFFCC",
"url":"http://www.techcrunch.com",
"profile_image_url":"http://a3.twimg.com/bigger_normal.png",
"geo_enabled":false,
"notifications":false,
"time_zone":"Pacific Time (US & Canada)",
"profile_sidebar_border_color":"BDDCAD",
"location":"Silicon Valley",
"screen_name":"TechCrunch",
"verified":false,
"protected":false,
"profile_background_color":"9AE4E8",
"name":"TechCrunch",
"profile_background_image_url":"http://twimg.com/bg.png",
"followers_count":1366685,
"id":816653,
"lang":"en",
"utc_offset":-28800,
"profile_text_color":"333333"
},
"favorited":false,
"id":12468685711,
"in_reply_to_screen_name":null,
"text":"Bill Gates Talks About How To Change The World - http://tcrn.ch/aXhQtZ",
"related_count":9,
"comment_count":0
},
... and so on ...
]
myCallbackFunction([status, status,...]);
<?xml version="1.0" encoding="UTF-8"?>
<statuses>
<status>
<created_at>Mon Apr 19 18:11:29 +0000 2010</created_at>
<geo></geo>
<in_reply_to_status_id></in_reply_to_status_id>
<place></place>
<truncated></truncated>
<source></source>
<in_reply_to_user_id></in_reply_to_user_id>
<contributors></contributors>
<coordinates></coordinates>
<user>
<profile_background_tile></profile_background_tile>
<created_at>Wed Mar 07 01:27:09 +0000 2007</created_at>
<friends_count>699</friends_count>
<description>Breaking Technology News And Opinions From TechCrunch</description>
<statuses_count>16144</statuses_count>
<profile_link_color>0084B4</profile_link_color>
<following></following>
<favourites_count>29</favourites_count>
<contributors_enabled></contributors_enabled>
<profile_sidebar_fill_color>DDFFCC</profile_sidebar_fill_color>
<url>http://www.techcrunch.com</url>
<profile_image_url>http://a3.twimg.com/bigger_normal.png</profile_image_url>
<geo_enabled></geo_enabled>
<notifications></notifications>
<time_zone>Pacific Time (US & Canada)</time_zone>
<profile_sidebar_border_color>BDDCAD</profile_sidebar_border_color>
<location>Silicon Valley</location>
<screen_name>TechCrunch</screen_name>
<verified></verified>
<protected></protected>
<profile_background_color>9AE4E8</profile_background_color>
<name>TechCrunch</name>
<profile_background_image_url>http://twimg.com/bg.png</profile_background_image_url>
<followers_count>1366685</followers_count>
<id>816653</id>
<lang>en</lang>
<utc_offset>-28800</utc_offset>
<profile_text_color>333333</profile_text_color>
</user>
<favorited></favorited>
<id>12468685711</id>
<in_reply_to_screen_name></in_reply_to_screen_name>
<text>Bill Gates Talks About How To Change The World - http://tcrn.ch/aXhQtZ</text>
<related_count>9</related_count>
<comment_count>0</comment_count>
</status>
... and so on ...
</statuses>
{"error":true,"code":xxx}
myCallbackFunction({"error":true,"code":xxx});
<?xml version="1.0" encoding="UTF-8"?>
<response>
<error>true</error>
<code>xxx</code>
</response>
Below are the error codes and their descriptions, that are thrown in case something goes wrong. The appropriate HTTP headers are set as well.
400
The request parameters are invalid. Please check the parameters that are being passed in.
401
The API key given is invalid. You can get the right API key from here.
404
The API resource does not exist. Check the API URL for typos.
500
Sorry, something went wrong on our end. In all likelihood we have been emailed about it and are looking into it. You can send me an email or contact me via Twitter for further details.
You can try the examples below in your terminal using cURL or simply put in the URL in your browser and try it out. The '******....' value needs to be replaced with your real API key, which you can find here.
curl http://thecadmus.com/api/twitter/lists/statuses/thecadmus/technology?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
curl http://thecadmus.com/api/twitter/lists/statuses/thecadmus/technology?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&count=10
curl http://thecadmus.com/api/twitter/lists/statuses/thecadmus/technology?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx×pan=10
curl http://thecadmus.com/api/twitter/lists/statuses/thecadmus/technology?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&page=2
curl http://thecadmus.com/api/twitter/lists/statuses/thecadmus/technology?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&callback=showPostsFunction
curl http://thecadmus.com/api/twitter/lists/statuses/thecadmus/technology?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&format=xml
curl http://thecadmus.com/api/twitter/lists/statuses/thecadmus/technology?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&count=20&page=1×pan=48&format=json&callback=showPostsFunction
Using the Twitter List Trends API you can get a the trending topics from a list. The URL is made up of the Twitter username (:user) and the list name (:list).
http://thecadmus.com/api/twitter/lists/trends/:user/:list
key
The API key. You can get your API key from here.
count
The number of trends to return. Defaults to 10. Restricted to a maximum of 20
format
The format of the response (xml or json). Defaults to json.
callback
The JSON callback function. Defaults to no value.
{
"trends":
[
{
"name":"iPhone",
"query":"iPhone",
"url":"http://thecadmus.com/lists/thecadmus/technology#search?q=iPhone"
},
{
"name":"Twitter",
"query":"Twitter",
"url":"http://thecadmus.com/lists/thecadmus/technology#search?q=Twitter"
},
... and so on ...
],
"as_of":"Tue, 22 Jun 2010 17:19:03 +0000"
}
myCallbackFunction({
"trends":[trend, trend,...],
"as_of":"Tue, 22 Jun 2010 17:19:03 +0000"
});
<?xml version="1.0" encoding="UTF-8"?>
<trends as_of="Tue, 22 Jun 2010 17:19:03 +0000">
<trend>
<name>iPhone</name>
<query>iPhone</query>
<url>http://thecadmus.com/lists/thecadmus/technology#search?q=iPhone</url>
</trend>
<trend>
<name>Twitter</name>
<query>Twitter</query>
<url>http://thecadmus.com/lists/thecadmus/technology#search?q=Twitter</url>
</trend>
... and so on ...
</trends>
{"error":true,"code":xxx}
myCallbackFunction({"error":true,"code":xxx});
<?xml version="1.0" encoding="UTF-8"?>
<response>
<error>true</error>
<code>xxx</code>
</response>
Below are the error codes and their descriptions, that are thrown in case something goes wrong. The appropriate HTTP headers are set as well.
400
The request parameters are invalid. Please check the parameters that are being passed in.
401
The API key given is invalid. You can get the right API key from here.
404
The API resource does not exist. Check the API URL for typos.
500
Sorry, something went wrong on our end. In all likelihood we have been emailed about it and are looking into it. You can send me an email or contact me via Twitter for further details.
You can try the examples below in your terminal using cURL or simply put in the URL in your browser and try it out. The '******....' value needs to be replaced with your real API key, which you can find here.
curl http://thecadmus.com/api/twitter/lists/trends/thecadmus/technology?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
curl http://thecadmus.com/api/twitter/lists/trends/thecadmus/technology?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&count=10
curl http://thecadmus.com/api/twitter/lists/trends/thecadmus/technology?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&callback=showTrendsFunction
curl http://thecadmus.com/api/twitter/lists/trends/thecadmus/technology?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&format=xml
curl http://thecadmus.com/api/twitter/lists/trends/thecadmus/technology?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&count=10&format=json&callback=showTrendsFunction
Using the Twitter List Search API you can get your Twitter Statuses for a given query. Currently, we do not return results for queries that are not list trending topics. The URL is made up of the Twitter username (:user) and the list name (:list).
http://thecadmus.com/api/twitter/lists/search/:user/:list
key
The API key. You can get your API key from here.
query
The search query. This has to be one of the list trending topics as returned by twitter/lists/trends.
count
The number of posts to return. Defaults to 30. Restricted to a maximum of 50.
page
The page number of the results. Defaults to 1 (the first page of posts).
format
The format of the response (xml or json). Defaults to json.
callback
The JSON callback function. Defaults to no value.
Note: The related_count and comment_count values are added to the status.
[
{
"created_at":"Tue Oct 27 18:02:00 +0000 2009",
"geo":null,
"in_reply_to_status_id":null,
"place":null,
"truncated":false,
"source":"",
"in_reply_to_user_id":null,
"contributors":null,
"coordinates":null,
"user":{
"profile_background_tile":false,
"created_at":"Wed Mar 07 01:27:09 +0000 2007",
"friends_count":699,
"description":"Breaking Technology News And Opinions From TechCrunch",
"statuses_count":16144,
"profile_link_color":"0084B4",
"following":null,
"favourites_count":29,
"contributors_enabled":false,
"profile_sidebar_fill_color":"DDFFCC",
"url":"http://www.techcrunch.com",
"profile_image_url":"http://a3.twimg.com/bigger_normal.png",
"geo_enabled":false,
"notifications":false,
"time_zone":"Pacific Time (US & Canada)",
"profile_sidebar_border_color":"BDDCAD",
"location":"Silicon Valley",
"screen_name":"TechCrunch",
"verified":false,
"protected":false,
"profile_background_color":"9AE4E8",
"name":"TechCrunch",
"profile_background_image_url":"http://twimg.com/bg.png",
"followers_count":1366685,
"id":816653,
"lang":"en",
"utc_offset":-28800,
"profile_text_color":"333333"
},
"favorited":false,
"id":12468685711,
"in_reply_to_screen_name":null,
"text":"Bill Gates Talks About How To Change The World - http://tcrn.ch/aXhQtZ",
"related_count":0,
"comment_count":0
},
... and so on ...
]
myCallbackFunction([status, status,...]);
<?xml version="1.0" encoding="UTF-8"?>
<statuses>
<status>
<created_at>Mon Apr 19 18:11:29 +0000 2010</created_at>
<geo></geo>
<in_reply_to_status_id></in_reply_to_status_id>
<place></place>
<truncated></truncated>
<source></source>
<in_reply_to_user_id></in_reply_to_user_id>
<contributors></contributors>
<coordinates></coordinates>
<user>
<profile_background_tile></profile_background_tile>
<created_at>Wed Mar 07 01:27:09 +0000 2007</created_at>
<friends_count>699</friends_count>
<description>Breaking Technology News And Opinions From TechCrunch</description>
<statuses_count>16144</statuses_count>
<profile_link_color>0084B4</profile_link_color>
<following></following>
<favourites_count>29</favourites_count>
<contributors_enabled></contributors_enabled>
<profile_sidebar_fill_color>DDFFCC</profile_sidebar_fill_color>
<url>http://www.techcrunch.com</url>
<profile_image_url>http://a3.twimg.com/bigger_normal.png</profile_image_url>
<geo_enabled></geo_enabled>
<notifications></notifications>
<time_zone>Pacific Time (US & Canada)</time_zone>
<profile_sidebar_border_color>BDDCAD</profile_sidebar_border_color>
<location>Silicon Valley</location>
<screen_name>TechCrunch</screen_name>
<verified></verified>
<protected></protected>
<profile_background_color>9AE4E8</profile_background_color>
<name>TechCrunch</name>
<profile_background_image_url>http://twimg.com/bg.png</profile_background_image_url>
<followers_count>1366685</followers_count>
<id>816653</id>
<lang>en</lang>
<utc_offset>-28800</utc_offset>
<profile_text_color>333333</profile_text_color>
</user>
<favorited></favorited>
<id>12468685711</id>
<in_reply_to_screen_name></in_reply_to_screen_name>
<text>Bill Gates Talks About How To Change The World - http://tcrn.ch/aXhQtZ</text>
<related_count>0</related_count>
<comment_count>0</comment_count>
</status>
... and so on ...
</statuses>
{"error":true,"code":xxx}
myCallbackFunction({"error":true,"code":xxx});
<?xml version="1.0" encoding="UTF-8"?>
<response>
<error>true</error>
<code>xxx</code>
</response>
Below are the error codes and their descriptions, that are thrown in case something goes wrong. The appropriate HTTP headers are set as well.
400
The request parameters are invalid. Please check the parameters that are being passed in.
401
The API key given is invalid. You can get the right API key from here.
404
The API resource does not exist. Check the API URL for typos.
500
Sorry, something went wrong on our end. In all likelihood we have been emailed about it and are looking into it. You can send me an email or contact me via Twitter for further details.
You can try the examples below in your terminal using cURL or simply put in the URL in your browser and try it out. The '******....' value needs to be replaced with your real API key, which you can find here.
curl http://thecadmus.com/api/twitter/lists/search/thecadmus/technology?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
curl http://thecadmus.com/api/twitter/lists/search/thecadmus/technology?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&count=10&query=iPhone
curl http://thecadmus.com/api/twitter/lists/search/thecadmus/technology?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&page=2&query=iPhone
curl http://thecadmus.com/api/twitter/lists/search/thecadmus/technology?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&callback=showPostsFunction&query=iPhone
curl http://thecadmus.com/api/twitter/lists/search/thecadmus/technology?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&format=xml&query=iPhone
curl http://thecadmus.com/api/twitter/lists/search/thecadmus/technology?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&count=20&page=1&query=iPhone&format=json&callback=showPostsFunction
This page was last updated on July 26, 2010.