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

You can also request specific fields, here’s an example where I’m asking only for the name and a link of each bot:

https://botwiki.org/wp-json/wp/v2/bot?per_page=20&_fields=title,link

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'
]

Searching by bot URL

You can pass the URL of a bot as the bot_url argument. For example, for @emoji__polls you could make the following request:

https://botwiki.org/wp-json/wp/v2/bot?bot_url=https://twitter.com/emoji__polls

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

Random bot with a specific tag

This example fetches one random bot tagged with emoji.

https://botwiki.org/wp-json/wp/v2/bot?tag=emoji&filter[orderby]=rand&filter[posts_per_page]=1

More projects

"Submit to Botwiki" bookmarklets

Making it easier to submit bots to Botwiki.

Botwiki Browser Extension

A browser extension that adds a link to a bot's Botwiki entry on relevant pages.

Glitch-hosted fediverse bot

Bringing art bots back to the open web.

Sidekick

Sidekick makes Slack groups easier to manage and more enjoyable to be in.

Browse all

Latest from the blog

Cheap Bots, Done Quick suspended, this time for good

So long, and thanks for all the bots.

Twitter shutting down free access to their API on February 9

I keep saying it's an end of an era quite often these days.

How do folks get into creative botmaking?

Sharing the stories of our early botmaking days.

What kind of bots are posting in the fediverse?

Exploring the bots people make and follow in the fediverse.

Visit the blog

Enjoying Botwiki?

Consider supporting the project!

.