Google DMCA Messages API

For some searches, Google search results includes a DMCA (Digital Millennium Copyright Act) messages block. SerpApi is able to scrape, extract and make sense of this information.

API Examples

JSON structure overview

{
  ...
  "dmca_messages": {
    "title": "String - Title of the DMCA messages",
    "messages": [
      {
        "content": "String - Content of the message",
        "highlighted_words": [
          {
            "text": "String - Highlighted text in the message",
            "link": "String - Link of the highlighted text in the message"
          },
        ]
      },
    ]
  },
  ...
}

Results for: free avatar 2 online

Results for: free avatar 2 online

Code to integrate

  • require 'google_search_results' 
    
    params = {
      q: "free avatar 2 online",
      device: "desktop",
      api_key: "secret_api_key"
    }
    
    search = GoogleSearch.new(params)
    dmca_messages = search.get_hash[:dmca_messages]
    

JSON Example

{
  ...
  "dmca_messages": {
    "title": "Notices about Filtered Results",
    "messages": [
      {
        "content": "In response to multiple complaints we received under the US Digital Millennium Copyright Act, we have removed 2 results from this page. If you wish, you may read the DMCA complaints that caused the removals at LumenDatabase.org: Complaint, Complaint.",
        "highlighted_words": [
          {
            "link": "https://www.google.com/support/answer/1386831",
            "text": "US Digital Millennium Copyright Act"
          },
          {
            "link": "https://lumendatabase.org/notices/34114295",
            "text": "Complaint"
          },
          {
            "link": "https://lumendatabase.org/notices/34283729",
            "text": "Complaint"
          }
        ]
      }
    ]
  },
  ...
}

SerpApi results for ""