Botwiki Site API

Botwiki offers access to its data with a free public API, utilizing the WordPress REST API. You can refer to the WP REST API documentation for more detailed information. Check out the tutorial section on Botwiki if you’re new to web APIs.

We’d love to see how you use our API, and welcome feedback and suggestions!

Documentation

Bots

The base URL for getting bot information is:

https://botwiki.org/wp-json/wp/v2/bot

Here’s a condensed example of the returned data:

{
    "id":37,
    "date": "2018-01-23T14:22:56",
    "slug": "bartleby_scrvnr",
    "type": "bot",
    "link": "https://botwiki.org/bot/bartleby_scrvnr/",
    "title":{
        "rendered": "@bartleby_scrvnr"
    },
    "content":{ /* ... */ },
    "excerpt":{
        "rendered": "I would prefer not to.",
        "protected":false
    },
    "tags_full": [
        "literature",
        "books",
        "book character"
    ],
    "featured_image_url": "https://botwiki.org/wp-content/uploads/2018/01/bartleby_scrvnr.png",
    "bot_urls": [
        "https://twitter.com/bartleby_scrvnr"
    ],
    "bot_source_urls": [
        "https://github.com/fourtonfish/bartleby_scrvnr"
    ],
    "source_languages": [ /* ... */ ],
    "bot_author_info": [
        "Stefan Bohacek, https://twitter.com/fourtonfish"
    ]
}

By default, you will get 10 results, and you can go up to 100 by specifying the per_page attribute.

https://botwiki.org/wp-json/wp/v2/bot?per_page=20

Then, to get the next page, use page, for example:

https://botwiki.org/wp-json/wp/v2/bot?per_page=20&page=2

On top of the standard fields that WordPress shows, you will also find the following information:

tags_full

WordPress returns the tags field as an array of tag IDs, but here you will also get the tag names with tags_full.

"tags_full": [
  "literature",
  "opensource"
],

This is the URL of the bot page thumbnail. Example value:

https://botwiki.org/wp-content/uploads/2018/09/angry-scribbles.png

bot_urls

An array of URLs where the bot is posting. Example value:

[
    'https://twitter.com/restroomgender',
    'https://botsin.space/@restroomgender'
]

bot_source_urls

An array of URLs with the source code and/or the data used by the bot.

[
    'https://cheapbotstootsweet.com/source/?url=https://botsin.space/@angry_scribbles'
]

source_languages

An array of WordPress terms designating the languages used in the bot’s source code. Here’s an example:

[
    {
        term_id: 2223,
        name: 'Javascript',
        slug: 'javascript',
        term_group: 0,
        term_taxonomy_id: 2223,
        taxonomy: 'programing_language',
        description: '',
        parent: 0,
        count: 24,
        filter: 'raw'
    },
    {
        term_id: 1727,
        name: 'Tracery',
        slug: 'tracery',
        term_group: '0',
        term_taxonomy_id: 1727,
        taxonomy: 'programing_language',
        description: null  ,
        parent: 0,
        count: 120,
        filter: 'raw'
    }
]

bot_author_info

An array of authors with the format name, URL, where the URL is optional.

[
    'Stefan Bohacek, https://twitter.com/fourtonfish'
]

Filtering by tags

Use the tag attribute to filter bots by tags. Note that WordPress uses tags, which only accept numerical tag IDs.

https://botwiki.org/wp-json/wp/v2/bot?per_page=30&tag=gif

You can also filter for multiple tags.

https://botwiki.org/wp-json/wp/v2/bot?per_page=30&tag=gif,iot

Filtering open source bots

You can pass opensource=true in the URL to filter bots with a link to their source code.

https://botwiki.org/wp-json/wp/v2/bot?per_page=30&tag=gif&opensource=true