Skip to content
Daniel Ramsay edited this page Mar 19, 2023 · 3 revisions

API Endpoints - categories

GET /1.2/category/

Navigate DMOZ category tree within the Middleware database.

GET parameters

Field Example Payload
email API user's email account
signature User Private Key

hex_hmac($categoryid, $secret)

Response

{

    "success": true,
    "block_count": 3,
    "blocked_url_count": 2,
    "parent": 537,
    "name": "Top/Arts/Animation/Anime/Titles/D/Dragon_Ball_Series/Dragon_Ball_Z/Image_Galleries",
    "block_count_total": 7,
    "blocked_url_count_total": 4,
    "categories": [
        {
         "block_count": "0",
         "fullname": "Top/Arts/Animation/Anime/Titles/D/Dragon_Ball_Series/Dragon_Ball_Z/Image_Galleries/U",
         "blocked_url_count": "0",
         "id": "558",
         "name": "U"
        }        
    ] 
}

fields

blocked_url_count: number of unique blocked URLs within the category

block_count: number of blocks for URLs within the category (a URL can be blocked by multiple ISPs)

blocked_url_count_total: number of unique blocked URLs within this category and its subcategories

block_count_total: number of blocks for URLs within this category and its subcategories

Subcategories can be navigated by making subsequent calls to /category/<id> using the id: field in the subcategories list. See example-client/example-category.php

GET /1.2/category/sites/

Retrieve the list of URLs contained within a category

GET data

Field Example Payload
email API user's email account
signature User Private Key

hex_hmac($categoryid, $secret)

Response

{

 "category": "Top/Arts/Animation/Anime/Titles/M",
 "sites": [
   {
     "url": "http://anime-site.example.com",
     "block_count": "3"
   }
 ],
 "success": true

}