🎙️ Delay Delay... Do Not Inform Me!

🎙️ Delay Delay... Do Not Inform Me! · Ações GPT

AP News Oddities Extractor

API to fetch and extract news headlines and stories from AP News Oddities section.

  • GET /fetchFetch and Extract News Content

    Retrieve headlines and stories from the AP News Oddities section using specific selectors.

Esquema API original
{
  "openapi": "3.1.0",
  "info": {
    "title": "AP News Oddities Extractor",
    "description": "API to fetch and extract news headlines and stories from AP News Oddities section.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://lab.alexandriaredmon.com"
    }
  ],
  "paths": {
    "/fetch": {
      "get": {
        "operationId": "fetchOddStories",
        "summary": "Fetch and Extract News Content",
        "description": "Retrieve headlines and stories from the AP News Oddities section using specific selectors.",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "URL of the target news page - must ALWAYS be \"https://apnews.com/oddities\"",
            "schema": {
              "type": "string",
              "example": "https://apnews.com/oddities"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "description": "API key for authentication - must ALWAYS be \"nuffsaidtruebelievers\"",
            "schema": {
              "type": "string",
              "example": "nuffsaidtruebelievers"
            }
          },
          {
            "name": "selectors",
            "in": "query",
            "required": true,
            "description": "CSS selectors to extract specific content - must ALWAYS be \"bsp-custom-headline .PagePromoContentIcons-text,.PageList-items .PagePromo-description\"",
            "schema": {
              "type": "string",
              "example": "bsp-custom-headline .PagePromoContentIcons-text,.PageList-items .PagePromo-description"
            }
          },
          {
            "name": "modes",
            "in": "query",
            "required": true,
            "description": "Modes of data extraction - must ALWAYS be \"get_text,get_text\"",
            "schema": {
              "type": "string",
              "example": "get_text,get_text"
            }
          },
          {
            "name": "keys",
            "in": "query",
            "required": true,
            "description": "Keys to label extracted data - must ALWAYS be \"headlines,stories\"",
            "schema": {
              "type": "string",
              "example": "headlines,stories"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully fetched and extracted content.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "example": "https://apnews.com/oddities"
                    },
                    "elapsed": {
                      "type": "number",
                      "format": "float",
                      "example": 0.04086589813232422
                    },
                    "extracted_content": {
                      "type": "object",
                      "properties": {
                        "bsp-custom-headline .PagePromoContentIcons-text": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "example": [
                            "It’s Christmas for the elephants as unsold trees are fed to the animals at Berlin Zoo",
                            "Want some mayo with that? A behind-the-scenes look at the Duke’s Mayo Bowl mayonnaise bath"
                          ]
                        },
                        ".PageList-items .PagePromo-description": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "example": [
                            "For the elephants and others at the Berlin Zoo, it’s finally time to unwrap their Christmas presents.",
                            "NORAD’s Santa tracker is a Christmas tradition that’s become nearly global in scope. Each year, at least 100,000 kids call into the North American Aerospace Defense Command in Colorado."
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request due to missing or incorrect parameters."
          },
          "401": {
            "description": "Unauthorized access."
          },
          "500": {
            "description": "Internal server error."
          }
        }
      }
    }
  }
}