The Socialbel API provides a simple way to request data from Socialbel.com via HTTP requests.
This is a beta version of the API. All methods, data formats, error codes and outputs can be changed in the future
| Property | Type | Description |
id |
String | Term id |
text |
String | Term contents |
description |
String | Description about the term |
thumbsup |
Number | Number of positive votes |
thumbsdown |
Number | Number of negative votes |
parent |
String | When it's a translation, parent has the parent term id |
istranslation |
Boolean | Is it a Term or a Translation? |
created |
Date | Created date on ISO 8601 format |
updated |
Date | Updated date on ISO 8601 format |
language |
Object | What language this term was created. See Language for more information |
user |
Object | Who create this. See User for more information |
| Property | Type | Description |
id |
String | username |
name |
String | Real name |
profile |
String | User's Profile URL |
avatar |
String | Photo or image |
language |
String | Native language. See Language for more information |
| Property | Type | Description |
code |
String | Language code like "en", "pt_BR" or "es" |
name |
String | Language name like "English", "Brazilian Portuguese" or "Spanish" |
All API requests output data on these formats ("json" is default):
| Name | Key | Description | Site |
| JSON | json |
JSON (JavaScript Object Notation) is a lightweight data-interchange format | json.org |
| XML | xml |
Extensible Markup Language (XML) is a simple, very flexible text format derived from SGML
|
w3.org/XML |
http://socialbel.com/api/user/socialbel?format=json
| Name | Key | Description |
| Format | format |
Data format. See Result Data Formats for more information |
| Page | page |
Current page (default 1) |
| Count | count |
Items per page (default 20, max 100) |
| Callback | callback |
When callback is defined and format is equal to "json", all output is returned like a funciton call, example: http://socialbel.com/api/search/?query=socialbel&callback=myFunctionName
|
http://socialbel.com/api/user/socialbel?count=2&page=5
| Code | Name |
| 0 | An unknown error occurred |
| 1 | Invalid format |
| 2 | No method specified |
| 3 | Missing required argument for this method |
| 4 | No results were returned |
/api/search/ - SearchSearch for terms and translations. Parameters:
| Name | Key | Description |
| Query (required) | query |
Query string |
| Username | user |
Restrict your search for only terms from user |
| Language | language |
Restrict your search for only terms in that language. Use only language code for now. |
http://socialbel.com/api/search/?query=i+love+you
/api/user/[USERNAME] - Fetch user informationReplace [USERNAME] with the user's username to retrieve him/her information and translations
user {} User Data Typetranslations [] Array of Termshttp://socialbel.com/api/user/socialbel